From b8f81c62a29b59d8de18476726cf2b7ac7cea1f5 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 19 Apr 2009 04:56:22 -0700 Subject: [PATCH] X86: Implement a locking version of XCHG. --- .../insts/general_purpose/data_transfer/xchg.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py b/src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py index 3f243f5d8..521be95e5 100644 --- a/src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py +++ b/src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py @@ -95,4 +95,19 @@ def macroop XCHG_P_R st reg, seg, riprel, disp mov reg, reg, t1 }; + +def macroop XCHG_LOCKED_M_R +{ + ldstl t1, seg, sib, disp + stul reg, seg, sib, disp + mov reg, reg, t1 +}; + +def macroop XCHG_LOCKED_P_R +{ + rdip t7 + ldstl t1, seg, riprel, disp + stul reg, seg, riprel, disp + mov reg, reg, t1 +}; '''