summaryrefslogtreecommitdiff
path: root/src/arch/arm/insts/static_inst.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:10 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:10 -0500
commitfaf6c727f6f206238eb6cbd4f6c84f6136c739a2 (patch)
treeb1f0149a9a310b058bcf17d1b03cd5001f1100e2 /src/arch/arm/insts/static_inst.hh
parentb6cb6f1874184c72bcf97e7156c5c650be85a7fe (diff)
downloadgem5-faf6c727f6f206238eb6cbd4f6c84f6136c739a2.tar.xz
ARM: Respect the E bit of the CPSR when doing loads and stores.
Diffstat (limited to 'src/arch/arm/insts/static_inst.hh')
-rw-r--r--src/arch/arm/insts/static_inst.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh
index c0d313680..c26053cef 100644
--- a/src/arch/arm/insts/static_inst.hh
+++ b/src/arch/arm/insts/static_inst.hh
@@ -231,6 +231,17 @@ class ArmStaticInst : public StaticInst
(val & ~PcModeMask));
}
+ template<class T>
+ static T
+ cSwap(T val, bool big)
+ {
+ if (big) {
+ return gtobe(val);
+ } else {
+ return gtole(val);
+ }
+ }
+
// Perform an interworking branch.
template<class XC>
static void