diff libavutil/x86_cpu.h @ 2:897f711a7157

rearrange to work with autoconf
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 25 Sep 2012 15:55:33 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libavutil/x86_cpu.h	Tue Sep 25 15:55:33 2012 +0200
     1.3 @@ -0,0 +1,73 @@
     1.4 +/*
     1.5 + * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
     1.6 + *
     1.7 + * This file is part of FFmpeg.
     1.8 + *
     1.9 + * FFmpeg is free software; you can redistribute it and/or
    1.10 + * modify it under the terms of the GNU Lesser General Public
    1.11 + * License as published by the Free Software Foundation; either
    1.12 + * version 2.1 of the License, or (at your option) any later version.
    1.13 + *
    1.14 + * FFmpeg is distributed in the hope that it will be useful,
    1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.17 + * Lesser General Public License for more details.
    1.18 + *
    1.19 + * You should have received a copy of the GNU Lesser General Public
    1.20 + * License along with FFmpeg; if not, write to the Free Software
    1.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    1.22 + */
    1.23 +
    1.24 +#ifndef AVUTIL_X86_CPU_H
    1.25 +#define AVUTIL_X86_CPU_H
    1.26 +
    1.27 +#include <stdint.h>
    1.28 +#include "config.h"
    1.29 +
    1.30 +#if ARCH_X86_64
    1.31 +#    define REG_a "rax"
    1.32 +#    define REG_b "rbx"
    1.33 +#    define REG_c "rcx"
    1.34 +#    define REG_d "rdx"
    1.35 +#    define REG_D "rdi"
    1.36 +#    define REG_S "rsi"
    1.37 +#    define PTR_SIZE "8"
    1.38 +typedef int64_t x86_reg;
    1.39 +
    1.40 +#    define REG_SP "rsp"
    1.41 +#    define REG_BP "rbp"
    1.42 +#    define REGBP   rbp
    1.43 +#    define REGa    rax
    1.44 +#    define REGb    rbx
    1.45 +#    define REGc    rcx
    1.46 +#    define REGd    rdx
    1.47 +#    define REGSP   rsp
    1.48 +
    1.49 +#elif ARCH_X86_32
    1.50 +
    1.51 +#    define REG_a "eax"
    1.52 +#    define REG_b "ebx"
    1.53 +#    define REG_c "ecx"
    1.54 +#    define REG_d "edx"
    1.55 +#    define REG_D "edi"
    1.56 +#    define REG_S "esi"
    1.57 +#    define PTR_SIZE "4"
    1.58 +typedef int32_t x86_reg;
    1.59 +
    1.60 +#    define REG_SP "esp"
    1.61 +#    define REG_BP "ebp"
    1.62 +#    define REGBP   ebp
    1.63 +#    define REGa    eax
    1.64 +#    define REGb    ebx
    1.65 +#    define REGc    ecx
    1.66 +#    define REGd    edx
    1.67 +#    define REGSP   esp
    1.68 +#else
    1.69 +typedef int x86_reg;
    1.70 +#endif
    1.71 +
    1.72 +// #if ARCH_X86_64 && defined(PIC)
    1.73 +// #    define BROKEN_RELOCATIONS 1
    1.74 +// #endif
    1.75 +
    1.76 +#endif /* AVUTIL_X86_CPU_H */