From 14025f0ffe28c274a9880e595a9194231d911922 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 29 Oct 2019 16:55:26 -0700 Subject: arm: Replace most htog and gtoh with htole and letoh. We already know what endianness to use when with ARM. In places where a ISA was being supplied through an argument, those were left as htog or gtoh. Change-Id: Iff01e8b09a061d9a72e657cdd4570836e0da933f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22372 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini Tested-by: kokoro --- src/arch/arm/insts/static_inst.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/arch/arm/insts') diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh index 9caf016dd..c58aca452 100644 --- a/src/arch/arm/insts/static_inst.hh +++ b/src/arch/arm/insts/static_inst.hh @@ -314,9 +314,9 @@ class ArmStaticInst : public StaticInst cSwap(T val, bool big) { if (big) { - return gtobe(val); + return letobe(val); } else { - return gtole(val); + return val; } } @@ -329,17 +329,17 @@ class ArmStaticInst : public StaticInst T tVal; E eVals[count]; } conv; - conv.tVal = htog(val); + conv.tVal = htole(val); if (big) { for (unsigned i = 0; i < count; i++) { - conv.eVals[i] = gtobe(conv.eVals[i]); + conv.eVals[i] = letobe(conv.eVals[i]); } } else { for (unsigned i = 0; i < count; i++) { - conv.eVals[i] = gtole(conv.eVals[i]); + conv.eVals[i] = conv.eVals[i]; } } - return gtoh(conv.tVal); + return letoh(conv.tVal); } // Perform an interworking branch. -- cgit v1.2.3