summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2011-11-03 22:52:21 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2011-11-03 22:52:21 -0500
commit582ea4d5431f9fa9edbeb16835b04171647ea18b (patch)
treea9a3ae50ff09f7791525cf8313d8afec67f9f3e3 /src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py
parentfb5c095cd53f4f16e139d9e959c41e089ff79896 (diff)
downloadgem5-582ea4d5431f9fa9edbeb16835b04171647ea18b.tar.xz
x86: Add microop for fence
This patch adds a new microop for memory barrier. The microop itself does nothing, but since it is marked as a memory barrier, the O3 CPU should flush all the pending loads and stores before the fence to the memory system.
Diffstat (limited to 'src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py12
1 files changed, 12 insertions, 0 deletions
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 6504b5ab4..1518ce5e0 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
@@ -50,46 +50,58 @@ def macroop XCHG_R_R
def macroop XCHG_R_M
{
+ mfence
ldstl t1, seg, sib, disp
stul reg, seg, sib, disp
+ mfence
mov reg, reg, t1
};
def macroop XCHG_R_P
{
rdip t7
+ mfence
ldstl t1, seg, riprel, disp
stul reg, seg, riprel, disp
+ mfence
mov reg, reg, t1
};
def macroop XCHG_M_R
{
+ mfence
ldstl t1, seg, sib, disp
stul reg, seg, sib, disp
+ mfence
mov reg, reg, t1
};
def macroop XCHG_P_R
{
rdip t7
+ mfence
ldstl t1, seg, riprel, disp
stul reg, seg, riprel, disp
+ mfence
mov reg, reg, t1
};
def macroop XCHG_LOCKED_M_R
{
+ mfence
ldstl t1, seg, sib, disp
stul reg, seg, sib, disp
+ mfence
mov reg, reg, t1
};
def macroop XCHG_LOCKED_P_R
{
rdip t7
+ mfence
ldstl t1, seg, riprel, disp
stul reg, seg, riprel, disp
+ mfence
mov reg, reg, t1
};
'''