00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVUTIL_X86_CPU_H
00022 #define AVUTIL_X86_CPU_H
00023
00024 #include <stdint.h>
00025 #include "config.h"
00026
00027 #if ARCH_X86_64
00028 # define REG_a "rax"
00029 # define REG_b "rbx"
00030 # define REG_c "rcx"
00031 # define REG_d "rdx"
00032 # define REG_D "rdi"
00033 # define REG_S "rsi"
00034 # define PTR_SIZE "8"
00035 typedef int64_t x86_reg;
00036
00037 # define REG_SP "rsp"
00038 # define REG_BP "rbp"
00039 # define REGBP rbp
00040 # define REGa rax
00041 # define REGb rbx
00042 # define REGc rcx
00043 # define REGd rdx
00044 # define REGSP rsp
00045
00046 #elif ARCH_X86_32
00047
00048 # define REG_a "eax"
00049 # define REG_b "ebx"
00050 # define REG_c "ecx"
00051 # define REG_d "edx"
00052 # define REG_D "edi"
00053 # define REG_S "esi"
00054 # define PTR_SIZE "4"
00055 typedef int32_t x86_reg;
00056
00057 # define REG_SP "esp"
00058 # define REG_BP "ebp"
00059 # define REGBP ebp
00060 # define REGa eax
00061 # define REGb ebx
00062 # define REGc ecx
00063 # define REGd edx
00064 # define REGSP esp
00065 #endif
00066
00067 #define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
00068 #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
00069
00070 #if ARCH_X86_64 && defined(PIC)
00071 # define BROKEN_RELOCATIONS 1
00072 #endif
00073
00074 #endif