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.
This commit is contained in:
parent
4153a76478
commit
e1cbe33c72
1 changed files with 7 additions and 3 deletions
|
@ -52,6 +52,7 @@
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.macro simple_op name, func, subfunc
|
.macro simple_op name, func, subfunc
|
||||||
|
.align 2
|
||||||
.globl \name
|
.globl \name
|
||||||
\name:
|
\name:
|
||||||
/* First, try to trap into m5 using the m5-kvm hypercall
|
/* First, try to trap into m5 using the m5-kvm hypercall
|
||||||
|
@ -59,7 +60,11 @@
|
||||||
* if it is executed in the normal m5 environment.
|
* if it is executed in the normal m5 environment.
|
||||||
*/
|
*/
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr lr, =1f
|
#ifdef __thumb__
|
||||||
|
adr lr, 1f+1
|
||||||
|
#else
|
||||||
|
adr lr, 1f
|
||||||
|
#endif
|
||||||
ldr ip, =((((\func) & 0xFF) << 8) | ((\subfunc) & 0xFF))
|
ldr ip, =((((\func) & 0xFF) << 8) | ((\subfunc) & 0xFF))
|
||||||
bxj lr
|
bxj lr
|
||||||
pop {pc}
|
pop {pc}
|
||||||
|
@ -70,8 +75,7 @@
|
||||||
.short 0xEE00 | \func
|
.short 0xEE00 | \func
|
||||||
.short 0x0110 | (\subfunc << 12)
|
.short 0x0110 | (\subfunc << 12)
|
||||||
#else
|
#else
|
||||||
#define INST(op, ra, rb, func) \
|
.long (0xEE000110 | (\func << 16) | (\subfunc << 12))
|
||||||
.long (0xEE000110 | (\func << 16) | (\subfunc << 12)
|
|
||||||
#endif
|
#endif
|
||||||
pop {pc}
|
pop {pc}
|
||||||
.endm
|
.endm
|
||||||
|
|
Loading…
Reference in a new issue