summaryrefslogtreecommitdiff
path: root/nasm.h
diff options
context:
space:
mode:
authorJin Kyu Song <jin.kyu.song@intel.com>2013-12-10 16:24:45 -0800
committerJin Kyu Song <jin.kyu.song@intel.com>2013-12-11 16:56:19 -0800
commit4360ba28f0e4767ffe28ef3a037aaa103b5660b6 (patch)
treed66cad3a8c786b4291c28879d038caaffd53a897 /nasm.h
parent478f2dafff5b58c7c965cfe2277ff71e1492815a (diff)
downloadnasm-4360ba28f0e4767ffe28ef3a037aaa103b5660b6.tar.gz
mib: Handle MIB EA in a different way from regular EA's
In mib operands, users' intention should be preserved. e.g.) [eax + eax*1] and [eax*2] must be distinguished and encoded differently. So a new EA flag EAF_MIB for mib operands is added. And a new EA hint EAH_SUMMED for the case of [eax+eax*4] being parsed as [eax*5] is also added. NOSPLIT specifier does not have an effect in mib, so [nosplit eax + eax*1] will be encoded as [eax, eax] rather than [eax*2] as in a regular EA. Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Diffstat (limited to 'nasm.h')
-rw-r--r--nasm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/nasm.h b/nasm.h
index 736c290e..18de37c8 100644
--- a/nasm.h
+++ b/nasm.h
@@ -584,13 +584,15 @@ enum ea_flags { /* special EA flags */
EAF_TIMESTWO = 4, /* really do EAX*2 not EAX+EAX */
EAF_REL = 8, /* IP-relative addressing */
EAF_ABS = 16, /* non-IP-relative addressing */
- EAF_FSGS = 32 /* fs/gs segment override present */
+ EAF_FSGS = 32, /* fs/gs segment override present */
+ EAF_MIB = 64, /* mib operand */
};
enum eval_hint { /* values for `hinttype' */
EAH_NOHINT = 0, /* no hint at all - our discretion */
EAH_MAKEBASE = 1, /* try to make given reg the base */
- EAH_NOTBASE = 2 /* try _not_ to make reg the base */
+ EAH_NOTBASE = 2, /* try _not_ to make reg the base */
+ EAH_SUMMED = 3, /* base and index are summed into index */
};
typedef struct operand { /* operand to an instruction */