From 7f7f2f04888248471e7fe19415dfdf6e0ae301ef Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 19 Aug 2020 02:46:49 -0700 Subject: [PATCH] x86: Replace getDoubleBits with floatToBits64. 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 Maintainer: Gabe Black Tested-by: kokoro --- src/arch/x86/isa/microops/limmop.isa | 2 +- src/arch/x86/utility.hh | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/arch/x86/isa/microops/limmop.isa b/src/arch/x86/isa/microops/limmop.isa index 1fdbcf4bc..9333c0072 100644 --- a/src/arch/x86/isa/microops/limmop.isa +++ b/src/arch/x86/isa/microops/limmop.isa @@ -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 diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh index b311eefcd..39a142c2a 100644 --- a/src/arch/x86/utility.hh +++ b/src/arch/x86/utility.hh @@ -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. * -- 2.30.2