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 @@ -92,20 +92,27 @@ 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 $t0, %got(objc_tagged_pointer_secret)($gp) +#else + la $t0, objc_tagged_pointer_secret +#endif + lw $t0, 0($t0) + xor $t0, $a0, $t0 + and $t0, $t0, 0xE + sll $t0, $t0, 1 + +#ifdef OF_PIC lw $t1, %got(objc_tagged_pointer_classes)($gp) #else la $t1, objc_tagged_pointer_classes #endif addu $t0, $t1, $t0