mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
specify 4-byte alignment of functions defined in ARM assembly code
Apple's assembler, at least, won't automatically align these properly for us, so we need to explicitly specify the required alignment.
This commit is contained in:
parent
d29513c653
commit
222b357089
@ -20,6 +20,7 @@
|
||||
#endif
|
||||
|
||||
.globl GLOBAL(vmNativeCall)
|
||||
.align 2
|
||||
GLOBAL(vmNativeCall):
|
||||
/*
|
||||
arguments:
|
||||
@ -57,6 +58,7 @@ LOCAL(loop):
|
||||
ldmfd sp!, {r4-r6, pc} // restore non-volatile regs and return
|
||||
|
||||
.globl GLOBAL(vmJump)
|
||||
.align 2
|
||||
GLOBAL(vmJump):
|
||||
mov lr, r0
|
||||
ldr r0, [sp]
|
||||
@ -69,6 +71,7 @@ GLOBAL(vmJump):
|
||||
#define CHECKPOINT_STACK 24
|
||||
|
||||
.globl GLOBAL(vmRun)
|
||||
.align 2
|
||||
GLOBAL(vmRun):
|
||||
// r0: function
|
||||
// r1: arguments
|
||||
@ -85,6 +88,7 @@ GLOBAL(vmRun):
|
||||
blx r12
|
||||
|
||||
.globl GLOBAL(vmRun_returnAddress)
|
||||
.align 2
|
||||
GLOBAL(vmRun_returnAddress):
|
||||
add sp, sp, #12
|
||||
ldmfd sp!, {r4-r11, lr}
|
||||
|
@ -38,6 +38,7 @@
|
||||
#define CONTINUATION_BODY 32
|
||||
|
||||
.globl GLOBAL(vmInvoke)
|
||||
.align 2
|
||||
GLOBAL(vmInvoke):
|
||||
/*
|
||||
arguments
|
||||
@ -84,6 +85,7 @@ LOCAL(vmInvoke_argumentTest):
|
||||
blx r1
|
||||
|
||||
.globl GLOBAL(vmInvoke_returnAddress)
|
||||
.align 2
|
||||
GLOBAL(vmInvoke_returnAddress):
|
||||
// restore stack pointer
|
||||
ldr sp, [r8, #THREAD_SCRATCH]
|
||||
@ -97,6 +99,7 @@ GLOBAL(vmInvoke_returnAddress):
|
||||
str r5, [r8, #THREAD_STACK]
|
||||
|
||||
.globl GLOBAL(vmInvoke_safeStack)
|
||||
.align 2
|
||||
GLOBAL(vmInvoke_safeStack):
|
||||
|
||||
#ifdef AVIAN_CONTINUATIONS
|
||||
@ -174,6 +177,7 @@ LOCAL(vmInvoke_return):
|
||||
bx lr
|
||||
|
||||
.globl GLOBAL(vmJumpAndInvoke)
|
||||
.align 2
|
||||
GLOBAL(vmJumpAndInvoke):
|
||||
#ifdef AVIAN_CONTINUATIONS
|
||||
// r0: thread
|
||||
|
Loading…
Reference in New Issue
Block a user