From 2394f73f908c86488341625963a792382baeff78 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 19 Apr 2009 04:56:28 -0700 Subject: [PATCH] X86: Implement a locking version of NEG. --- .../arithmetic/add_and_subtract.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 c8a2d1d1c..fbef20dc1 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 @@ -425,4 +425,19 @@ def macroop NEG_P sub t1, t0, t1, flags=(CF,OF,SF,ZF,AF,PF) st t1, seg, riprel, disp }; + +def macroop NEG_LOCKED_M +{ + ldstl t1, seg, sib, disp + sub t1, t0, t1, flags=(CF,OF,SF,ZF,AF,PF) + stul t1, seg, sib, disp +}; + +def macroop NEG_LOCKED_P +{ + rdip t7 + ldstl t1, seg, riprel, disp + sub t1, t0, t1, flags=(CF,OF,SF,ZF,AF,PF) + stul t1, seg, riprel, disp +}; ''' -- 2.30.2