BR 3392218: Disassemble 82h opcodes
[nasm/sigaren-mirror.git] / macros / altreg.mac
blob16134cdc78e11eed3b4bd21a2cb8696012d3eee6
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:
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.
32 ;; --------------------------------------------------------------------------
35 ;; altreg.mac
37 ;; Alternate register names for 64-bit mode
40 USE: altreg
43 ;; Intel documents R8L-R15L instead of R8B-R15B
44 ;; (Warning: this may confuse people with an AT&T-style assembly
45 ;; background, where "r8l" means R8D, etc.)
47 %idefine r8l  r8b
48 %idefine r9l  r9b
49 %idefine r10l r10b
50 %idefine r11l r11b
51 %idefine r12l r12b
52 %idefine r13l r13b
53 %idefine r14l r14b
54 %idefine r15l r15b
57 ;; Numeric register names for the lower 8 registers
59 %idefine r0  rax
60 %idefine r1  rcx
61 %idefine r2  rdx
62 %idefine r3  rbx
63 %idefine r4  rsp
64 %idefine r5  rbp
65 %idefine r6  rsi
66 %idefine r7  rdi
68 %idefine r0d eax
69 %idefine r1d ecx
70 %idefine r2d edx
71 %idefine r3d ebx
72 %idefine r4d esp
73 %idefine r5d ebp
74 %idefine r6d esi
75 %idefine r7d edi
77 %idefine r0w ax
78 %idefine r1w cx
79 %idefine r2w dx
80 %idefine r3w bx
81 %idefine r4w sp
82 %idefine r5w bp
83 %idefine r6w si
84 %idefine r7w di
86 %idefine r0b al
87 %idefine r1b cl
88 %idefine r2b dl
89 %idefine r3b bl
90 %idefine r4b spl
91 %idefine r5b bpl
92 %idefine r6b sil
93 %idefine r7b dil
95 %idefine r0l al
96 %idefine r1l cl
97 %idefine r2l dl
98 %idefine r3l bl
99 %idefine r4l spl
100 %idefine r5l bpl
101 %idefine r6l sil
102 %idefine r7l dil
104 %idefine r0h ah
105 %idefine r1h ch
106 %idefine r2h dh
107 %idefine r3h bh