diff options
author | Ben Rudiak-Gould <benrudiak@gmail.com> | 2013-03-01 10:28:32 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2013-03-01 10:28:32 +0400 |
commit | 4e8396b5cf3981f0746ed815ce8b6fb89146821e (patch) | |
tree | a97cc2910461cab626c554e09729ea44ba07f747 /opflags.h | |
parent | 57162eb084ee80c2f024663c1bfc10c82bb83b20 (diff) | |
download | nasm-4e8396b5cf3981f0746ed815ce8b6fb89146821e.tar.gz nasm-4e8396b5cf3981f0746ed815ce8b6fb89146821e.tar.bz2 nasm-4e8396b5cf3981f0746ed815ce8b6fb89146821e.zip |
Remove +s
It doesn't seem worth >200 lines of C and Perl to save ~50 lines in insns.dat.
In order to make this work I had to rename sbyte16/sbyte32 so that
they can take an ordinary size suffix (their size suffix was formerly
treated specially).
This fixes one disassembly bug: 48C7C000000080 disassembles to mov
rax,0x80000000, which reassembles to B800000080, which loads a
different value.
Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'opflags.h')
-rw-r--r-- | opflags.h | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -226,17 +226,12 @@ typedef uint64_t opflags_t; /* memory which matches any type of r/m operand */ #define MEMORY_ANY (MEMORY | RM_GPR | RM_MMX | RM_XMM | RM_YMM) -/* special type of immediate operand */ -#define UNITY (GEN_SUBCLASS(1) | IMMEDIATE) /* for shift/rotate instructions */ -#define SBYTE16 (GEN_SUBCLASS(2) | IMMEDIATE) /* for op r16,immediate instrs. */ -#define SBYTE32 (GEN_SUBCLASS(3) | IMMEDIATE) /* for op r32,immediate instrs. */ -#define SBYTE64 (GEN_SUBCLASS(4) | IMMEDIATE) /* for op r64,immediate instrs. */ -#define SDWORD64 (GEN_SUBCLASS(5) | IMMEDIATE) /* for op r64,simm32 instrs. */ -#define UDWORD64 (GEN_SUBCLASS(0) | IMMEDIATE) /* for op r64,uimm32 instrs. */ - -#define BYTENESS (GEN_SUBCLASS(2) | \ - GEN_SUBCLASS(3) | \ - GEN_SUBCLASS(4)) /* for testing for byteness */ +/* special immediate values */ +#define UNITY (GEN_SUBCLASS(0) | IMMEDIATE) /* operand equals 1 */ +#define SBYTEWORD (GEN_SUBCLASS(1) | IMMEDIATE) /* operand is in the range -128..127 mod 2^16 */ +#define SBYTEDWORD (GEN_SUBCLASS(2) | IMMEDIATE) /* operand is in the range -128..127 mod 2^32 */ +#define SDWORD (GEN_SUBCLASS(3) | IMMEDIATE) /* operand is in the range -0x80000000..0x7FFFFFFF */ +#define UDWORD (GEN_SUBCLASS(4) | IMMEDIATE) /* operand is in the range 0..0xFFFFFFFF */ /* special flags */ #define SAME_AS GEN_SPECIAL(0) |