Libav
|
00001 /* 00002 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> 00003 * 00004 * This file is part of FFmpeg. 00005 * 00006 * FFmpeg is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * FFmpeg is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with FFmpeg; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 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 #else 00066 typedef int x86_reg; 00067 #endif 00068 00069 #define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE)) 00070 #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE)) 00071 00072 #if ARCH_X86_64 && defined(PIC) 00073 # define BROKEN_RELOCATIONS 1 00074 #endif 00075 00076 #endif /* AVUTIL_X86_CPU_H */