summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-04-19 04:56:16 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-04-19 04:56:16 -0700
commitcfb289ebebe18f75e464bc32fe54c535a3c9370a (patch)
tree3cf82f953980be0c97911556ccd1da38ff361825
parent789b3191b93dc78713c0ae80e592b4d2c43676d8 (diff)
downloadgem5-cfb289ebebe18f75e464bc32fe54c535a3c9370a.tar.xz
X86: Implement a locking version of SUB.
-rw-r--r--src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py b/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py
index 10c06efb6..c8a2d1d1c 100644
--- a/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py
+++ b/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py
@@ -183,6 +183,23 @@ def macroop SUB_P_I
st t1, seg, riprel, disp
};
+def macroop SUB_LOCKED_M_I
+{
+ limm t2, imm
+ ldstl t1, seg, sib, disp
+ sub t1, t1, t2, flags=(OF,SF,ZF,AF,PF,CF)
+ stul t1, seg, sib, disp
+};
+
+def macroop SUB_LOCKED_P_I
+{
+ rdip t7
+ limm t2, imm
+ ldstl t1, seg, riprel, disp
+ sub t1, t1, t2, flags=(OF,SF,ZF,AF,PF,CF)
+ stul t1, seg, riprel, disp
+};
+
def macroop SUB_M_R
{
ldst t1, seg, sib, disp
@@ -198,6 +215,21 @@ def macroop SUB_P_R
st t1, seg, riprel, disp
};
+def macroop SUB_LOCKED_M_R
+{
+ ldstl t1, seg, sib, disp
+ sub t1, t1, reg, flags=(OF,SF,ZF,AF,PF,CF)
+ stul t1, seg, sib, disp
+};
+
+def macroop SUB_LOCKED_P_R
+{
+ rdip t7
+ ldstl t1, seg, riprel, disp
+ sub t1, t1, reg, flags=(OF,SF,ZF,AF,PF,CF)
+ stul t1, seg, riprel, disp
+};
+
def macroop ADC_R_R
{
adc reg, reg, regm, flags=(OF,SF,ZF,AF,PF,CF)