diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-09-17 15:49:30 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-09-17 15:49:30 -0700 |
commit | 7eb4a387939955c1c0b41fbc8b1216419082321f (patch) | |
tree | 74cb142c9ba6f8cd82a07679e8f447dd726c6b7d /insns.h | |
parent | 3a7edd73a35ee09ee3cbf783f4d7b7148884603a (diff) | |
download | nasm-7eb4a387939955c1c0b41fbc8b1216419082321f.tar.gz nasm-7eb4a387939955c1c0b41fbc8b1216419082321f.tar.bz2 nasm-7eb4a387939955c1c0b41fbc8b1216419082321f.zip |
Initial support for four arguments per instruction
For SSE5, we will need to support four arguments per instruction.
Diffstat (limited to 'insns.h')
-rw-r--r-- | insns.h | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -9,7 +9,7 @@ #ifndef NASM_INSNS_H #define NASM_INSNS_H -#include "insnsi.h" /* instruction opcode enum */ +#include "nasm.h" /* max length of any instruction, register name etc. */ #if MAX_INSLEN > 9 /* MAX_INSLEN defined in insnsi.h */ @@ -21,7 +21,7 @@ struct itemplate { enum opcode opcode; /* the token, passed from "parser.c" */ int operands; /* number of operands */ - int32_t opd[3]; /* bit flags for operand types */ + int32_t opd[MAX_OPERANDS]; /* bit flags for operand types */ const char *code; /* the code it assembles to */ uint32_t flags; /* some flags */ }; @@ -66,12 +66,14 @@ extern const struct itemplate * const * const itable[]; #define IF_SM2 0x00000002UL /* size match first two operands */ #define IF_SB 0x00000004UL /* unsized operands can't be non-byte */ #define IF_SW 0x00000008UL /* unsized operands can't be non-word */ -#define IF_SD 0x00000010UL /* unsized operands can't be non-dword */ -#define IF_SQ 0x00000020UL /* unsized operands can't be non-qword */ -#define IF_AR0 0x00000040UL /* SB, SW, SD applies to argument 0 */ -#define IF_AR1 0x00000080UL /* SB, SW, SD applies to argument 1 */ -#define IF_AR2 0x000000C0UL /* SB, SW, SD applies to argument 2 */ -#define IF_ARMASK 0x000000C0UL /* mask for unsized argument spec */ +#define IF_SD 0x0000000CUL /* unsized operands can't be non-dword */ +#define IF_SQ 0x00000010UL /* unsized operands can't be non-qword */ +#define IF_SMASK 0x0000001CUL /* mask for unsized argument size */ +#define IF_AR0 0x00000020UL /* SB, SW, SD applies to argument 0 */ +#define IF_AR1 0x00000040UL /* SB, SW, SD applies to argument 1 */ +#define IF_AR2 0x00000060UL /* SB, SW, SD applies to argument 2 */ +#define IF_AR3 0x00000080UL /* SB, SW, SD applies to argument 2 */ +#define IF_ARMASK 0x000000E0UL /* mask for unsized argument spec */ #define IF_PRIV 0x00000100UL /* it's a privileged instruction */ #define IF_SMM 0x00000200UL /* it's only valid in SMM */ #define IF_PROT 0x00000400UL /* it's protected mode only */ |