altreg.mac 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. ;; --------------------------------------------------------------------------
  2. ;;
  3. ;; Copyright 1996-2009 The NASM Authors - All Rights Reserved
  4. ;; See the file AUTHORS included with the NASM distribution for
  5. ;; the specific copyright holders.
  6. ;;
  7. ;; Redistribution and use in source and binary forms, with or without
  8. ;; modification, are permitted provided that the following
  9. ;; conditions are met:
  10. ;;
  11. ;; * Redistributions of source code must retain the above copyright
  12. ;; notice, this list of conditions and the following disclaimer.
  13. ;; * Redistributions in binary form must reproduce the above
  14. ;; copyright notice, this list of conditions and the following
  15. ;; disclaimer in the documentation and/or other materials provided
  16. ;; with the distribution.
  17. ;;
  18. ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  19. ;; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  20. ;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  21. ;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  23. ;; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24. ;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  25. ;; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  26. ;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. ;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  28. ;; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  29. ;; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  30. ;; EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. ;;
  32. ;; --------------------------------------------------------------------------
  33. ;;
  34. ;; altreg.mac
  35. ;;
  36. ;; Alternate register names for 64-bit mode
  37. ;;
  38. USE: altreg
  39. ;;
  40. ;; Intel documents R8L-R15L instead of R8B-R15B
  41. ;; (Warning: this may confuse people with an AT&T-style assembly
  42. ;; background, where "r8l" means R8D, etc.)
  43. ;;
  44. %idefine r8l r8b
  45. %idefine r9l r9b
  46. %idefine r10l r10b
  47. %idefine r11l r11b
  48. %idefine r12l r12b
  49. %idefine r13l r13b
  50. %idefine r14l r14b
  51. %idefine r15l r15b
  52. ;;
  53. ;; Numeric register names for the lower 8 registers
  54. ;;
  55. %idefine r0 rax
  56. %idefine r1 rcx
  57. %idefine r2 rdx
  58. %idefine r3 rbx
  59. %idefine r4 rsp
  60. %idefine r5 rbp
  61. %idefine r6 rsi
  62. %idefine r7 rdi
  63. %idefine r0d eax
  64. %idefine r1d ecx
  65. %idefine r2d edx
  66. %idefine r3d ebx
  67. %idefine r4d esp
  68. %idefine r5d ebp
  69. %idefine r6d esi
  70. %idefine r7d edi
  71. %idefine r0w ax
  72. %idefine r1w cx
  73. %idefine r2w dx
  74. %idefine r3w bx
  75. %idefine r4w sp
  76. %idefine r5w bp
  77. %idefine r6w si
  78. %idefine r7w di
  79. %idefine r0b al
  80. %idefine r1b cl
  81. %idefine r2b dl
  82. %idefine r3b bl
  83. %idefine r4b spl
  84. %idefine r5b bpl
  85. %idefine r6b sil
  86. %idefine r7b dil
  87. %idefine r0l al
  88. %idefine r1l cl
  89. %idefine r2l dl
  90. %idefine r3l bl
  91. %idefine r4l spl
  92. %idefine r5l bpl
  93. %idefine r6l sil
  94. %idefine r7l dil
  95. %idefine r0h ah
  96. %idefine r1h ch
  97. %idefine r2h dh
  98. %idefine r3h bh