x86_cpu.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
  3. *
  4. * This file is part of FFmpeg.
  5. *
  6. * FFmpeg is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * FFmpeg is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with FFmpeg; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifndef FFMPEG_X86CPU_H
  21. #define FFMPEG_X86CPU_H
  22. #include "config.h"
  23. #ifdef ARCH_X86_64
  24. # define REG_a "rax"
  25. # define REG_b "rbx"
  26. # define REG_c "rcx"
  27. # define REG_d "rdx"
  28. # define REG_D "rdi"
  29. # define REG_S "rsi"
  30. # define PTR_SIZE "8"
  31. # define REG_SP "rsp"
  32. # define REG_BP "rbp"
  33. # define REGBP rbp
  34. # define REGa rax
  35. # define REGb rbx
  36. # define REGc rcx
  37. # define REGd rdx
  38. # define REGSP rsp
  39. #else
  40. # define REG_a "eax"
  41. # define REG_b "ebx"
  42. # define REG_c "ecx"
  43. # define REG_d "edx"
  44. # define REG_D "edi"
  45. # define REG_S "esi"
  46. # define PTR_SIZE "4"
  47. # define REG_SP "esp"
  48. # define REG_BP "ebp"
  49. # define REGBP ebp
  50. # define REGa eax
  51. # define REGb ebx
  52. # define REGc ecx
  53. # define REGd edx
  54. # define REGSP esp
  55. #endif
  56. #if defined(ARCH_X86_64) || (defined(ARCH_X86_32) && defined(HAVE_EBX_AVAILABLE) && defined(HAVE_EBP_AVAILABLE))
  57. # define HAVE_7REGS 1
  58. #endif
  59. #if defined(ARCH_X86_64) && defined(PIC)
  60. # define BROKEN_RELOCATIONS 1
  61. #endif
  62. #endif /* FFMPEG_X86CPU_H */