From 36bba253483cab2fbdcd11807d2dd96c6ae5d2d2 Mon Sep 17 00:00:00 2001 From: theraven Date: Tue, 18 Oct 2011 14:51:00 +0000 Subject: [PATCH] Shorter versions of ARM trampolines. --- block_trampolines.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/block_trampolines.S b/block_trampolines.S index b89182d..9d8a7a2 100644 --- a/block_trampolines.S +++ b/block_trampolines.S @@ -53,16 +53,14 @@ next_line2: __objc_block_trampoline_end_sret: #elif __arm__ __objc_block_trampoline: - mov r12, pc # Save entry program counter mov r1, r0 # Move self over _cmd - ldr r0, [r12, #-12] # Load the block pointer over self - ldr pc, [r12, #-16] # Jump to the block function + 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 r12, pc # Save the program counter mov r2, r1 # Move self over _cmd - ldr r1, [r12, #-12] # Load the block pointer over self - ldr pc, [r12, #-16] # Jump to the block function + 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