x86: Replace getDoubleBits with floatToBits64.
authorGabe Black <gabeblack@google.com>
Wed, 19 Aug 2020 09:46:49 +0000 (02:46 -0700)
committerGabe Black <gabeblack@google.com>
Thu, 20 Aug 2020 05:02:47 +0000 (05:02 +0000)
The getDoubleBits function was used exactly once to find the bit
representation of a double floating point value, which is the same thing
the common floatToBits64 function does. Eliminate x86's one off version,
and use the common one instead.

Change-Id: Icb0cec5a55d81a6eacf1bb5a3c2b8f16c414d0d9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32927
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/x86/isa/microops/limmop.isa
src/arch/x86/utility.hh

index 1fdbcf4bcbc426ed449ec1d0454afc185a3f8604..9333c0072000989a52135a187664f6f52ba98f1f 100644 (file)
@@ -144,7 +144,7 @@ let {{
             if isinstance(imm, (int, long)):
                 imm = "ULL(%d)" % imm
             elif isinstance(imm, float):
-                imm = "getDoubleBits(%.16f)" % imm
+                imm = "floatToBits64(%.16f)" % imm
             self.imm = imm
             self.dataSize = dataSize
 
index b311eefcdcd167c99efb6f3dc73e114f4da7949e..39a142c2ab658c46873714475664b5a6295895b1 100644 (file)
@@ -113,13 +113,6 @@ namespace X86ISA
      */
     void setRFlags(ThreadContext *tc, uint64_t val);
 
-    /**
-     * Extract the bit string representing a double value.
-     */
-    inline uint64_t getDoubleBits(double val) {
-        return *(uint64_t *)(&val);
-    }
-
     /**
      * Convert an x87 tag word to abridged tag format.
      *