Revision 44965991

View differences:

configure
542 542
    bktr
543 543
    dc1394
544 544
    dv1394
545
    ebp_available
546
    ebx_available
545 547
    ffmpeg
546 548
    ffplay
547 549
    ffserver
......
1190 1192
ranlib="${cross_prefix}${ranlib}"
1191 1193
strip="${cross_prefix}${strip}"
1192 1194

  
1195
# Disable core dumps so that intentional execution of broken apps doesn't
1196
# pollute the current directory.
1197
ulimit -c 0
1198

  
1193 1199
# we need to build at least one lib type
1194 1200
if disabled_all static shared; then
1195 1201
    cat <<EOF
......
1391 1397
    die "C compiler test failed."
1392 1398
fi
1393 1399

  
1400
if test $arch = "x86_32" -o $arch = "x86_64"; then
1401
    if test "$targetos" = "mingw32" -o "$targetos" = "CYGWIN"; then
1402
        cat <<EOF
1403
WARNING: The following test might cause a testapp to crash (intentionally)
1404
resulting in the appearance of a dialog box. Please click "Don't send" and
1405
ignore it.
1406
EOF
1407
    fi
1408

  
1409
    # check whether EBP is available on x86
1410
    # As 'i' is stored on the stack, this program will crash
1411
    # if the base pointer is used to access it because the
1412
    # base pointer is cleared in the inline assembly code.
1413
    check_exec <<EOF && enable ebp_available
1414
int main(){
1415
    volatile int i=0;
1416
    asm volatile (
1417
        "xorl %%ebp, %%ebp"
1418
    ::: "%ebp");
1419
    return i;
1420
}
1421
EOF
1422

  
1423
    # check wether EBX is available on x86
1424
    check_cc <<EOF && enable ebx_available
1425
int main(){
1426
    asm volatile ("":::"%ebx");
1427
}
1428
EOF
1429
fi
1430

  
1394 1431
# check for assembler specific support
1395 1432

  
1396 1433
if test $arch = "powerpc"; then
libavcodec/cabac.h
376 376
#define BYTE        "16"
377 377
#define BYTEEND     "20"
378 378
#endif
379
#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
379
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE)
380 380
    int bit;
381 381

  
382 382
#ifndef BRANCHLESS_CABAC_DECODER
......
680 680

  
681 681
//FIXME the x86 code from this file should be moved into i386/h264 or cabac something.c/h (note ill kill you if you move my code away from under my fingers before iam finished with it!)
682 682
//FIXME use some macros to avoid duplicatin get_cabac (cant be done yet as that would make optimization work hard)
683
#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
683
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE)
684 684
static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index){
685 685
    void *end= significant_coeff_ctx_base + max_coeff - 1;
686 686
    int minusstart= -(int)significant_coeff_ctx_base;
libavcodec/h264.c
6111 6111
            index[coeff_count++] = last;\
6112 6112
        }
6113 6113
        const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
6114
#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
6114
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE)
6115 6115
        coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
6116 6116
    } else {
6117 6117
        coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);
libavutil/x86_cpu.h
57 57
#  define REGSP   esp
58 58
#endif
59 59

  
60
#if defined(ARCH_X86_64) || (defined(ARCH_X86_32) && defined(CONFIG_EBX_AVAILABLE) && defined(CONFIG_EBP_AVAILABLE))
61
#  define CONFIG_7REGS 1
62
#endif
63

  
60 64
#endif /* AVUTIL_X86CPU_H */

Also available in: Unified diff