summaryrefslogtreecommitdiff
path: root/src/arch/arm/insts
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-10-29 16:55:26 -0700
committerGabe Black <gabeblack@google.com>2019-11-13 23:41:41 +0000
commit14025f0ffe28c274a9880e595a9194231d911922 (patch)
tree3e374c04ebf57d5a9c2adfb6e6dc9392c2799a4a /src/arch/arm/insts
parent6a2961d81b532d2a69c9b7c10eae1d617cd0e3d4 (diff)
downloadgem5-14025f0ffe28c274a9880e595a9194231d911922.tar.xz
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 <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/arch/arm/insts')
-rw-r--r--src/arch/arm/insts/static_inst.hh12
1 files changed, 6 insertions, 6 deletions
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.