Index: src/runtime/lookup-asm/lookup-asm-arm64-elf.S ================================================================== --- src/runtime/lookup-asm/lookup-asm-arm64-elf.S +++ src/runtime/lookup-asm/lookup-asm-arm64-elf.S @@ -28,11 +28,11 @@ .macro generate_lookup name not_found \name: cbz x0, ret_nil tst x0, #1 - bne .Ltagged_pointer_\name + b.ne .Ltagged_pointer_\name ldr x2, [x0] ldr x2, [x2, #64] .Lmain_\name: Index: src/runtime/lookup-asm/lookup-asm-mips-elf.S ================================================================== --- src/runtime/lookup-asm/lookup-asm-mips-elf.S +++ src/runtime/lookup-asm/lookup-asm-mips-elf.S @@ -27,10 +27,13 @@ .section .text .macro generate_lookup name not_found \name: beqz $a0, 0f + andi $t0, $a0, 1 + bnez $t0, .Ltagged_pointer_\name + lw $t0, 0($a0) lw $t0, 32($t0) .Lmain_\name: #ifdef OF_BIG_ENDIAN @@ -87,10 +90,31 @@ addiu $gp, $gp, 1b-\name lw $t9, %call16(\not_found)($gp) jr $t9 #endif + +.Ltagged_pointer_\name: + and $t0, $a0, 0xE + sll $t0, $t0, 1 + +#ifdef OF_PIC +0: + lui $gp, %hi(_gp_disp) + addiu $gp, $gp, %lo(_gp_disp) + addu $gp, $gp, $t9 + addiu $gp, $gp, 0b-\name + + lw $t1, %got(objc_tagged_pointer_classes)($gp) +#else + la $t1, objc_tagged_pointer_classes +#endif + addu $t0, $t1, $t0 + ld $t0, ($t0) + ld $t0, 32($t0) + + b .Lmain_\name .type \name, %function .size \name, .-\name .endm .macro generate_lookup_super name lookup