From 62269b017de7f396d5be48e28d91326de6decfbc Mon Sep 17 00:00:00 2001 From: theraven Date: Tue, 18 Oct 2011 20:40:55 +0000 Subject: [PATCH] Fix arm asm syntax. --- block_trampolines.S | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/block_trampolines.S b/block_trampolines.S index 9d8a7a2..531de55 100644 --- a/block_trampolines.S +++ b/block_trampolines.S @@ -13,12 +13,22 @@ # argument (the first block argument) and the _cmd parameter excised .file "block_trampolines.S" +#if __arm__ +.syntax unified +.globl __objc_block_trampoline_sret + .type __objc_block_trampoline_sret, %function +.globl __objc_block_trampoline_end_sret +.globl __objc_block_trampoline + .type __objc_block_trampoline, %function +.globl __objc_block_trampoline_end +#else .globl __objc_block_trampoline_sret .type __objc_block_trampoline_sret, @function .globl __objc_block_trampoline_end_sret .globl __objc_block_trampoline .type __objc_block_trampoline, @function .globl __objc_block_trampoline_end +#endif #if __x86_64 __objc_block_trampoline: mov -15(%rip), %rsi # Load the block pointer into the second argument @@ -53,14 +63,14 @@ next_line2: __objc_block_trampoline_end_sret: #elif __arm__ __objc_block_trampoline: - mov r1, r0 # Move self over _cmd - ldr r0, [pc, #-16] # Load the block pointer over self - ldr pc, [pc, #-24] # Jump to the block function + mov r1, r0 // Move self over _cmd + ldr r0, [pc, #-16] // Load the block pointer over self + ldr pc, [pc, #-24] // Jump to the block function __objc_block_trampoline_end: __objc_block_trampoline_sret: - mov r2, r1 # Move self over _cmd - ldr r1, [pc, #-16] # Load the block pointer over self - ldr pc, [pc, #-24] # Jump to the block function + mov r2, r1 // Move self over _cmd + ldr r1, [pc, #-16] // Load the block pointer over self + ldr pc, [pc, #-24] // Jump to the block function __objc_block_trampoline_end_sret: #else #warning imp_implementationWithBlock() not implemented for your architecture