summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microops/mediaop.isa
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-05-22 11:29:53 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2012-05-22 11:29:53 -0500
commit4d4d212ae974b3a3ad6d185902d4896c0233a8d9 (patch)
tree4a8203c6677714b5996b6dc22178c61bdb07dec9 /src/arch/x86/isa/microops/mediaop.isa
parent16a559c9c66b3e810860b59c4099527b38a5337e (diff)
downloadgem5-4d4d212ae974b3a3ad6d185902d4896c0233a8d9.tar.xz
X86: Split Condition Code register
This patch moves the ECF and EZF bits to individual registers (ecfBit and ezfBit) and the CF and OF bits to cfofFlag registers. This is being done so as to lower the read after write dependencies on the the condition code register. Ultimately we will have the following registers [ZAPS], [OF], [CF], [ECF], [EZF] and [DF]. Note that this is only one part of the solution for lowering the dependencies. The other part will check whether or not the condition code register needs to be actually read. This would be done through a separate patch.
Diffstat (limited to 'src/arch/x86/isa/microops/mediaop.isa')
-rw-r--r--src/arch/x86/isa/microops/mediaop.isa13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/arch/x86/isa/microops/mediaop.isa b/src/arch/x86/isa/microops/mediaop.isa
index 0c4827990..7178f1f52 100644
--- a/src/arch/x86/isa/microops/mediaop.isa
+++ b/src/arch/x86/isa/microops/mediaop.isa
@@ -1490,12 +1490,15 @@ let {{
// Less than 0 0 1
// Equal 1 0 0
// OF = SF = AF = 0
- ccFlagBits = ccFlagBits & ~(OFBit | SFBit | AFBit |
- ZFBit | PFBit | CFBit);
- if (std::isnan(arg1) || std::isnan(arg2))
- ccFlagBits = ccFlagBits | (ZFBit | PFBit | CFBit);
+ ccFlagBits = ccFlagBits & ~(SFBit | AFBit | ZFBit | PFBit);
+ cfofBits = cfofBits & ~(OFBit | CFBit);
+
+ if (std::isnan(arg1) || std::isnan(arg2)) {
+ ccFlagBits = ccFlagBits | (ZFBit | PFBit);
+ cfofBits = cfofBits | CFBit;
+ }
else if(arg1 < arg2)
- ccFlagBits = ccFlagBits | CFBit;
+ cfofBits = cfofBits | CFBit;
else if(arg1 == arg2)
ccFlagBits = ccFlagBits | ZFBit;
'''