summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/general_purpose/arithmetic/increment_and_decrement.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/arithmetic/increment_and_decrement.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/arithmetic/increment_and_decrement.py')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/arithmetic/increment_and_decrement.py8
1 files changed, 8 insertions, 0 deletions
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 f27cd7008..515082d64 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
@@ -58,17 +58,21 @@ def macroop INC_P
def macroop INC_LOCKED_M
{
+ mfence
ldstl t1, seg, sib, disp
addi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
stul t1, seg, sib, disp
+ mfence
};
def macroop INC_LOCKED_P
{
rdip t7
+ mfence
ldstl t1, seg, riprel, disp
addi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
stul t1, seg, riprel, disp
+ mfence
};
def macroop DEC_R
@@ -93,16 +97,20 @@ def macroop DEC_P
def macroop DEC_LOCKED_M
{
+ mfence
ldstl t1, seg, sib, disp
subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
stul t1, seg, sib, disp
+ mfence
};
def macroop DEC_LOCKED_P
{
rdip t7
+ mfence
ldstl t1, seg, riprel, disp
subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
stul t1, seg, riprel, disp
+ mfence
};
'''