From 197018f090e28ff4b5de0eca10dd88c51cdc33c9 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 27 Dec 2015 15:39:16 +0100 Subject: [PATCH] Fix objc_msgSend on ARM. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When loading the slot, it’s quite important to load it into the register where you’re going to use it! --- objc_msgSend.arm.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objc_msgSend.arm.S b/objc_msgSend.arm.S index bde50f3..e6daaff 100644 --- a/objc_msgSend.arm.S +++ b/objc_msgSend.arm.S @@ -48,7 +48,7 @@ 2: // dtable8 uxtb r6, r5 // Low byte of sel id into r5 add r6, r4, r6, lsl #2 // r6 = dtable address + dtable data offset - ldr r4, [r6, #DATA_OFFSET] // Load, adding in the data offset + ldr ip, [r6, #DATA_OFFSET] // Load, adding in the data offset teq ip, #0 // If the slot is nil beq 5f // Go to the slow path and do the forwarding stuff