summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microasm.isa
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/isa/microasm.isa')
-rw-r--r--src/arch/x86/isa/microasm.isa9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/arch/x86/isa/microasm.isa b/src/arch/x86/isa/microasm.isa
index 213468b0b..5c567a30c 100644
--- a/src/arch/x86/isa/microasm.isa
+++ b/src/arch/x86/isa/microasm.isa
@@ -84,6 +84,7 @@ let {{
"regm" : "env.regm",
"imm" : "IMMEDIATE",
"disp" : "DISPLACEMENT",
+ "seg" : "env.seg",
"scale" : "env.scale",
"index" : "env.index",
"base" : "env.base",
@@ -91,10 +92,16 @@ let {{
"osz" : "env.operandSize",
"ssz" : "env.stackSize"
}
+ assembler.symbols.update(symbols)
+
+ # Short hand for common scale-index-base combinations.
+ assembler.symbols["sib"] = \
+ [symbols["scale"], symbols["index"], symbols["base"]]
+ assembler.symbols["riprel"] = \
+ ["1", assembler.symbols["t0"], assembler.symbols["t7"]]
for reg in ('ax', 'bx', 'cx', 'dx', 'sp', 'bp', 'si', 'di'):
assembler.symbols["r%s" % reg] = "INTREG_R%s" % reg.upper()
- assembler.symbols.update(symbols)
for flag in ('CF', 'PF', 'ECF', 'AF', 'EZF', 'ZF', 'SF', 'OF'):
assembler.symbols[flag] = flag + "Bit"