From: Vince Weaver Date: Tue, 10 Nov 2009 16:18:23 +0000 (-0500) Subject: X86: Remove double-cast in Cvtf2i micro-op X-Git-Tag: stable_2012_02_02~1575^2~79^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e81cc233a6fa82d2aec45bd9160db15df112f584;p=gem5.git X86: Remove double-cast in Cvtf2i micro-op This double cast led to rounding errors which caused some benchmarks to get the wrong values, most notably lucas which failed spectacularly due to CVTTSD2SI returning an off-by-one value. equake was also broken. --- diff --git a/src/arch/x86/isa/microops/mediaop.isa b/src/arch/x86/isa/microops/mediaop.isa index 9c53fa0fb..fa32583b0 100644 --- a/src/arch/x86/isa/microops/mediaop.isa +++ b/src/arch/x86/isa/microops/mediaop.isa @@ -1237,7 +1237,7 @@ let {{ } if (destSize == 4) { - argBits = (uint32_t)(float)arg; + argBits = (uint32_t)arg; } else { argBits = (uint64_t)arg; }