From 62ffc71faba7f2cf05ab7e3fc0624a2c12bf6486 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 17 Jul 2007 16:50:13 -0700 Subject: [PATCH] Use limm to set up immediate value for subtract instruction. --HG-- extra : convert_revision : f94e391e36a47c2f5222f30d7e28f48f7875db58 --- src/arch/x86/isa/insts/arithmetic/add_and_subtract.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py b/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py index 809b9ac7c..fbfe4be7e 100644 --- a/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py +++ b/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py @@ -56,21 +56,24 @@ microcode = ''' def macroop SUB_R_I { - subi reg, reg, imm + limm t1, imm + sub reg, reg, t1 }; def macroop SUB_M_I { + limm t2, imm ld t1, ds, [scale, index, base], disp - subi t1, t1, imm + sub t1, t1, t2 st t1, ds, [scale, index, base], disp }; def macroop SUB_P_I { rdip t7 + limm t2, imm ld t1, ds, [scale, index, base], disp - subi t1, t1, imm + sub t1, t1, t2 st t1, ds, [scale, index, base], disp }; '''