summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2013-05-14 15:03:45 +0200
committerAndreas Sandberg <andreas@sandberg.pp.se>2013-05-14 15:03:45 +0200
commite1cbe33c724f46b53ae1d4843883a848d6bb9d20 (patch)
treecce00d1dede64bf02a3d6d85b56756146186c60c
parent4153a76478e8cc0d0c09cf45c87d71f5d844e8bb (diff)
downloadgem5-e1cbe33c724f46b53ae1d4843883a848d6bb9d20.tar.xz
arm: Fix compilation error in m5 utility
Changeset 5ca6098b9560 accidentally broke the m5 utility. This changeset adds the missing co-processor call used to trigger the pseudo-op in ARM mode and fixes an alignment issue that caused some pseudo-ops to leave thumb mode.
-rw-r--r--util/m5/m5op_arm.S10
1 files changed, 7 insertions, 3 deletions
diff --git a/util/m5/m5op_arm.S b/util/m5/m5op_arm.S
index 83bef6a84..115c7a017 100644
--- a/util/m5/m5op_arm.S
+++ b/util/m5/m5op_arm.S
@@ -52,6 +52,7 @@
.text
.macro simple_op name, func, subfunc
+ .align 2
.globl \name
\name:
/* First, try to trap into m5 using the m5-kvm hypercall
@@ -59,7 +60,11 @@
* if it is executed in the normal m5 environment.
*/
push {lr}
- ldr lr, =1f
+#ifdef __thumb__
+ adr lr, 1f+1
+#else
+ adr lr, 1f
+#endif
ldr ip, =((((\func) & 0xFF) << 8) | ((\subfunc) & 0xFF))
bxj lr
pop {pc}
@@ -70,8 +75,7 @@
.short 0xEE00 | \func
.short 0x0110 | (\subfunc << 12)
#else
-#define INST(op, ra, rb, func) \
- .long (0xEE000110 | (\func << 16) | (\subfunc << 12)
+ .long (0xEE000110 | (\func << 16) | (\subfunc << 12))
#endif
pop {pc}
.endm