summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-04-19 04:56:49 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-04-19 04:56:49 -0700
commit61edc9ba66f4ce42c7cc4aab0f26d060470cdb14 (patch)
tree858b4cdda29b3202405d7683e451c0cf1f30b572 /src
parent209cfc89fdf7dc8775c2b1d0870d6610bae5ed21 (diff)
downloadgem5-61edc9ba66f4ce42c7cc4aab0f26d060470cdb14.tar.xz
X86: Implement a locking version of XADD.
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/semaphores.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/semaphores.py b/src/arch/x86/isa/insts/general_purpose/semaphores.py
index a34e2a3c7..a7da0720e 100644
--- a/src/arch/x86/isa/insts/general_purpose/semaphores.py
+++ b/src/arch/x86/isa/insts/general_purpose/semaphores.py
@@ -113,6 +113,21 @@ def macroop XADD_P_R {
mov reg, reg, t1
};
+def macroop XADD_LOCKED_M_R {
+ ldstl t1, seg, sib, disp
+ add t2, t1, reg, flags=(OF,SF,ZF,AF,PF,CF)
+ stul t2, seg, sib, disp
+ mov reg, reg, t1
+};
+
+def macroop XADD_LOCKED_P_R {
+ rdip t7
+ ldstl t1, seg, riprel, disp
+ add t2, t1, reg, flags=(OF,SF,ZF,AF,PF,CF)
+ stul t2, seg, riprel, disp
+ mov reg, reg, t1
+};
+
def macroop XADD_R_R {
add t2, regm, reg, flags=(OF,SF,ZF,AF,PF,CF)
mov regm, regm, reg