mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +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
|
#endif
|
||||||
|
|
||||||
.globl GLOBAL(vmNativeCall)
|
.globl GLOBAL(vmNativeCall)
|
||||||
|
.align 2
|
||||||
GLOBAL(vmNativeCall):
|
GLOBAL(vmNativeCall):
|
||||||
/*
|
/*
|
||||||
arguments:
|
arguments:
|
||||||
@ -57,6 +58,7 @@ LOCAL(loop):
|
|||||||
ldmfd sp!, {r4-r6, pc} // restore non-volatile regs and return
|
ldmfd sp!, {r4-r6, pc} // restore non-volatile regs and return
|
||||||
|
|
||||||
.globl GLOBAL(vmJump)
|
.globl GLOBAL(vmJump)
|
||||||
|
.align 2
|
||||||
GLOBAL(vmJump):
|
GLOBAL(vmJump):
|
||||||
mov lr, r0
|
mov lr, r0
|
||||||
ldr r0, [sp]
|
ldr r0, [sp]
|
||||||
@ -69,6 +71,7 @@ GLOBAL(vmJump):
|
|||||||
#define CHECKPOINT_STACK 24
|
#define CHECKPOINT_STACK 24
|
||||||
|
|
||||||
.globl GLOBAL(vmRun)
|
.globl GLOBAL(vmRun)
|
||||||
|
.align 2
|
||||||
GLOBAL(vmRun):
|
GLOBAL(vmRun):
|
||||||
// r0: function
|
// r0: function
|
||||||
// r1: arguments
|
// r1: arguments
|
||||||
@ -85,6 +88,7 @@ GLOBAL(vmRun):
|
|||||||
blx r12
|
blx r12
|
||||||
|
|
||||||
.globl GLOBAL(vmRun_returnAddress)
|
.globl GLOBAL(vmRun_returnAddress)
|
||||||
|
.align 2
|
||||||
GLOBAL(vmRun_returnAddress):
|
GLOBAL(vmRun_returnAddress):
|
||||||
add sp, sp, #12
|
add sp, sp, #12
|
||||||
ldmfd sp!, {r4-r11, lr}
|
ldmfd sp!, {r4-r11, lr}
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#define CONTINUATION_BODY 32
|
#define CONTINUATION_BODY 32
|
||||||
|
|
||||||
.globl GLOBAL(vmInvoke)
|
.globl GLOBAL(vmInvoke)
|
||||||
|
.align 2
|
||||||
GLOBAL(vmInvoke):
|
GLOBAL(vmInvoke):
|
||||||
/*
|
/*
|
||||||
arguments
|
arguments
|
||||||
@ -84,6 +85,7 @@ LOCAL(vmInvoke_argumentTest):
|
|||||||
blx r1
|
blx r1
|
||||||
|
|
||||||
.globl GLOBAL(vmInvoke_returnAddress)
|
.globl GLOBAL(vmInvoke_returnAddress)
|
||||||
|
.align 2
|
||||||
GLOBAL(vmInvoke_returnAddress):
|
GLOBAL(vmInvoke_returnAddress):
|
||||||
// restore stack pointer
|
// restore stack pointer
|
||||||
ldr sp, [r8, #THREAD_SCRATCH]
|
ldr sp, [r8, #THREAD_SCRATCH]
|
||||||
@ -97,6 +99,7 @@ GLOBAL(vmInvoke_returnAddress):
|
|||||||
str r5, [r8, #THREAD_STACK]
|
str r5, [r8, #THREAD_STACK]
|
||||||
|
|
||||||
.globl GLOBAL(vmInvoke_safeStack)
|
.globl GLOBAL(vmInvoke_safeStack)
|
||||||
|
.align 2
|
||||||
GLOBAL(vmInvoke_safeStack):
|
GLOBAL(vmInvoke_safeStack):
|
||||||
|
|
||||||
#ifdef AVIAN_CONTINUATIONS
|
#ifdef AVIAN_CONTINUATIONS
|
||||||
@ -174,6 +177,7 @@ LOCAL(vmInvoke_return):
|
|||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
.globl GLOBAL(vmJumpAndInvoke)
|
.globl GLOBAL(vmJumpAndInvoke)
|
||||||
|
.align 2
|
||||||
GLOBAL(vmJumpAndInvoke):
|
GLOBAL(vmJumpAndInvoke):
|
||||||
#ifdef AVIAN_CONTINUATIONS
|
#ifdef AVIAN_CONTINUATIONS
|
||||||
// r0: thread
|
// r0: thread
|
||||||
|
Loading…
Reference in New Issue
Block a user