From f6486a1bbe7714850980b9669d44ef8dec343a2a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 13 Dec 2017 00:53:34 -0800 Subject: arm,sparc,x86,base,cpu,sim: Replace the Twin(32|64)_t types with. Replace them with std::array<>s. Change-Id: I76624c87a1cd9b21c386a96147a18de92b8a8a34 Reviewed-on: https://gem5-review.googlesource.com/6602 Maintainer: Gabe Black Reviewed-by: Andreas Sandberg Reviewed-by: Jason Lowe-Power --- src/arch/arm/isa/insts/ldr64.isa | 29 +++++++++++++---------------- src/arch/arm/isa/insts/str64.isa | 6 +++--- src/arch/arm/isa/operands.isa | 2 +- 3 files changed, 17 insertions(+), 20 deletions(-) (limited to 'src/arch/arm') diff --git a/src/arch/arm/isa/insts/ldr64.isa b/src/arch/arm/isa/insts/ldr64.isa index eea925e66..e035e1d7e 100644 --- a/src/arch/arm/isa/insts/ldr64.isa +++ b/src/arch/arm/isa/insts/ldr64.isa @@ -198,14 +198,11 @@ let {{ ''' elif self.size == 16: accCode = ''' - Twin64_t data = cSwap(Mem%s, - isBigEndian64(xc->tcBase())); - - - AA64FpDestP0_uw = (uint32_t)data.a; - AA64FpDestP1_uw = (data.a >> 32); - AA64FpDestP2_uw = (uint32_t)data.b; - AA64FpDestP3_uw = (data.b >> 32); + auto data = cSwap(Mem%s, isBigEndian64(xc->tcBase())); + AA64FpDestP0_uw = (uint32_t)data[0]; + AA64FpDestP1_uw = (data[0] >> 32); + AA64FpDestP2_uw = (uint32_t)data[1]; + AA64FpDestP3_uw = (data[1] >> 32); ''' elif self.flavor == "widen" or self.size == 8: accCode = "XDest = cSwap(Mem%s, isBigEndian64(xc->tcBase()));" @@ -242,12 +239,12 @@ let {{ ''' elif self.size == 8: accCode = ''' - AA64FpDestP0_uw = (uint32_t)Mem_tud.a; - AA64FpDestP1_uw = (uint32_t)(Mem_tud.a >> 32); + AA64FpDestP0_uw = (uint32_t)Mem_tud[0]; + AA64FpDestP1_uw = (uint32_t)(Mem_tud[0] >> 32); AA64FpDestP2_uw = 0; AA64FpDestP3_uw = 0; - AA64FpDest2P0_uw = (uint32_t)Mem_tud.b; - AA64FpDest2P1_uw = (uint32_t)(Mem_tud.b >> 32); + AA64FpDest2P0_uw = (uint32_t)Mem_tud[1]; + AA64FpDest2P1_uw = (uint32_t)(Mem_tud[1] >> 32); AA64FpDest2P2_uw = 0; AA64FpDest2P3_uw = 0; ''' @@ -262,8 +259,8 @@ let {{ ''' elif self.size == 8: accCode = ''' - XDest = Mem_tud.a; - XDest2 = Mem_tud.b; + XDest = Mem_tud[0]; + XDest2 = Mem_tud[1]; ''' else: if self.size == 4: @@ -275,8 +272,8 @@ let {{ ''' elif self.size == 8: accCode = ''' - XDest = Mem_tud.a; - XDest2 = Mem_tud.b; + XDest = Mem_tud[0]; + XDest2 = Mem_tud[1]; ''' self.codeBlobs["memacc_code"] = accCode diff --git a/src/arch/arm/isa/insts/str64.isa b/src/arch/arm/isa/insts/str64.isa index 0b153c1ec..324d1fc69 100644 --- a/src/arch/arm/isa/insts/str64.isa +++ b/src/arch/arm/isa/insts/str64.isa @@ -226,9 +226,9 @@ let {{ accCode = ''' // This temporary needs to be here so that the parser // will correctly identify this instruction as a store. - Twin64_t temp; - temp.a = XDest_ud; - temp.b = XDest2_ud; + std::array temp; + temp[0] = XDest_ud; + temp[1] = XDest2_ud; Mem_tud = temp; ''' self.codeBlobs["memacc_code"] = accCode diff --git a/src/arch/arm/isa/operands.isa b/src/arch/arm/isa/operands.isa index 2e2955a80..babf0accf 100644 --- a/src/arch/arm/isa/operands.isa +++ b/src/arch/arm/isa/operands.isa @@ -47,7 +47,7 @@ def operand_types {{ 'sw' : 'int32_t', 'uw' : 'uint32_t', 'ud' : 'uint64_t', - 'tud' : 'Twin64_t', + 'tud' : 'std::array', 'sf' : 'float', 'df' : 'double', 'vc' : 'TheISA::VecRegContainer', -- cgit v1.2.3