From 985d959ea64dbfab142c2cb338c88641e2bcfc96 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 19 Apr 2009 04:56:34 -0700 Subject: [PATCH] X86: Implement a locking version of DEC. --- .../arithmetic/increment_and_decrement.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/arch/x86/isa/insts/general_purpose/arithmetic/increment_and_decrement.py b/src/arch/x86/isa/insts/general_purpose/arithmetic/increment_and_decrement.py index b85dc6328..184b9da72 100644 --- a/src/arch/x86/isa/insts/general_purpose/arithmetic/increment_and_decrement.py +++ b/src/arch/x86/isa/insts/general_purpose/arithmetic/increment_and_decrement.py @@ -108,4 +108,19 @@ def macroop DEC_P subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF) st t1, seg, riprel, disp }; + +def macroop DEC_LOCKED_M +{ + ldstl t1, seg, sib, disp + subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF) + stul t1, seg, sib, disp +}; + +def macroop DEC_LOCKED_P +{ + rdip t7 + ldstl t1, seg, riprel, disp + subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF) + stul t1, seg, riprel, disp +}; ''' -- 2.30.2