From: Gabe Black Date: Sun, 19 Apr 2009 11:56:49 +0000 (-0700) Subject: X86: Implement a locking version of XADD. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61edc9ba66f4ce42c7cc4aab0f26d060470cdb14;p=gem5.git X86: Implement a locking version of XADD. --- 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