X86: Remove double-cast in Cvtf2i micro-op
authorVince Weaver <vince@csl.cornell.edu>
Tue, 10 Nov 2009 16:18:23 +0000 (11:18 -0500)
committerVince Weaver <vince@csl.cornell.edu>
Tue, 10 Nov 2009 16:18:23 +0000 (11:18 -0500)
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.

src/arch/x86/isa/microops/mediaop.isa

index 9c53fa0fbd464a77a39394d8427fd6288bd7ba5e..fa32583b08a5fadeaa47a8bdcaaebf6896b75d47 100644 (file)
@@ -1237,7 +1237,7 @@ let {{
                 }
 
                 if (destSize == 4) {
-                    argBits = (uint32_t)(float)arg;
+                    argBits = (uint32_t)arg;
                 } else {
                     argBits = (uint64_t)arg;
                 }