summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/isa/insts/arithmetic/add_and_subtract.py')
-rw-r--r--src/arch/x86/isa/insts/arithmetic/add_and_subtract.py14
1 files changed, 13 insertions, 1 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 283152f30..349c2bb46 100644
--- a/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py
+++ b/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py
@@ -53,7 +53,19 @@
#
# Authors: Gabe Black
-microcode = ""
+microcode = '''
+def macroop SUB_R_I
+{
+ subi "env.reg", "env.reg", "IMMEDIATE"
+};
+
+def macroop SUB_M_I
+{
+ #Load into t1
+ subi "NUM_INTREGS+1", "NUM_INTREGS+1", "IMMEDIATE"
+ #save from t1
+};
+'''
#let {{
# class ADC(Inst):
# "Adc ^0 ^0 ^1"