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 OPSIZE "q"
00029 # define REG_a "rax"
00030 # define REG_b "rbx"
00031 # define REG_c "rcx"
00032 # define REG_d "rdx"
00033 # define REG_D "rdi"
00034 # define REG_S "rsi"
00035 # define PTR_SIZE "8"
00036 typedef int64_t x86_reg;
00037
00038 # define REG_SP "rsp"
00039 # define REG_BP "rbp"
00040 # define REGBP rbp
00041 # define REGa rax
00042 # define REGb rbx
00043 # define REGc rcx
00044 # define REGd rdx
00045 # define REGSP rsp
00046
00047 #elif ARCH_X86_32
00048
00049 # define OPSIZE "l"
00050 # define REG_a "eax"
00051 # define REG_b "ebx"
00052 # define REG_c "ecx"
00053 # define REG_d "edx"
00054 # define REG_D "edi"
00055 # define REG_S "esi"
00056 # define PTR_SIZE "4"
00057 typedef int32_t x86_reg;
00058
00059 # define REG_SP "esp"
00060 # define REG_BP "ebp"
00061 # define REGBP ebp
00062 # define REGa eax
00063 # define REGb ebx
00064 # define REGc ecx
00065 # define REGd edx
00066 # define REGSP esp
00067 #else
00068 typedef int x86_reg;
00069 #endif
00070
00071 #define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
00072 #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
00073
00074 #if ARCH_X86_64 && defined(PIC)
00075 # define BROKEN_RELOCATIONS 1
00076 #endif
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 #if HAVE_XMM_CLOBBERS
00091 # define XMM_CLOBBERS(...) __VA_ARGS__
00092 # define XMM_CLOBBERS_ONLY(...) : __VA_ARGS__
00093 #else
00094 # define XMM_CLOBBERS(...)
00095 # define XMM_CLOBBERS_ONLY(...)
00096 #endif
00097
00098 #endif