Index: src/runtime/lookup-asm/lookup-asm-x86-elf.S ================================================================== --- src/runtime/lookup-asm/lookup-asm-x86-elf.S +++ src/runtime/lookup-asm/lookup-asm-x86-elf.S @@ -61,19 +61,18 @@ add eax, offset _GLOBAL_OFFSET_TABLE_ lea eax, [eax+\not_found@GOTOFF] jmp eax .Ltagged_pointer_\name: - and dl, 0xF - shr dl, 1 + and dl, 0xE movzx edx, dl call get_eip add eax, offset _GLOBAL_OFFSET_TABLE_ lea eax, [eax+objc_tagged_pointer_classes@GOTOFF] - mov edx, [eax+edx*4] + mov edx, [eax+edx*2] mov edx, [edx+32] jmp short .Lmain_\name .type \name, %function .size \name, .-\name Index: src/runtime/lookup-asm/lookup-asm-x86-win32.S ================================================================== --- src/runtime/lookup-asm/lookup-asm-x86-win32.S +++ src/runtime/lookup-asm/lookup-asm-x86-win32.S @@ -53,16 +53,15 @@ jz \not_found ret .Ltagged_pointer_\name: - and dl, 0xF - shr dl, 1 + and dl, 0xE movzx edx, dl mov eax, offset _objc_tagged_pointer_classes - mov edx, [eax+edx*4] + mov edx, [eax+edx*2] mov edx, [edx+32] jmp short .Lmain_\name .endm Index: src/runtime/lookup-asm/lookup-asm-x86_64-elf.S ================================================================== --- src/runtime/lookup-asm/lookup-asm-x86_64-elf.S +++ src/runtime/lookup-asm/lookup-asm-x86_64-elf.S @@ -54,16 +54,15 @@ jz short \not_found@PLT ret .Ltagged_pointer_\name: - and dil, 0xF - shr dil, 1 + and dil, 0xE movzx r8, dil mov rax, [rip+objc_tagged_pointer_classes@GOTPCREL] - mov r8, [rax+r8*8] + mov r8, [rax+r8*4] mov r8, [r8+64] jmp short .Lmain_\name .type \name, %function .size \name, .-\name Index: src/runtime/lookup-asm/lookup-asm-x86_64-macho.S ================================================================== --- src/runtime/lookup-asm/lookup-asm-x86_64-macho.S +++ src/runtime/lookup-asm/lookup-asm-x86_64-macho.S @@ -52,16 +52,15 @@ jz $1 ret Ltagged_pointer_$0: - and dil, 0xF - shr dil, 1 + and dil, 0xE movzx r8, dil mov rax, [rip+_objc_tagged_pointer_classes] - mov r8, [rax+r8*8] + mov r8, [rax+r8*4] mov r8, [r8+64] jmp Lmain_$0 .endmacro Index: src/runtime/lookup-asm/lookup-asm-x86_64-win64.S ================================================================== --- src/runtime/lookup-asm/lookup-asm-x86_64-win64.S +++ src/runtime/lookup-asm/lookup-asm-x86_64-win64.S @@ -60,16 +60,15 @@ mov rcx, r10 mov rdx, r11 jmp \not_found .Ltagged_pointer_\name: - and cl, 0xF - shr cl, 1 + and cl, 0xE movzx r8, cl mov rax, offset objc_tagged_pointer_classes - mov r8, [rax+r8*8] + mov r8, [rax+r8*4] mov r8, [r8+56] jmp short .Lmain_\name .endm