DELETED src/runtime/lookup-amd64-elf.S Index: src/runtime/lookup-amd64-elf.S ================================================================== --- src/runtime/lookup-amd64-elf.S +++ src/runtime/lookup-amd64-elf.S @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -.globl objc_msg_lookup -.globl objc_msg_lookup_super - -.section .text -objc_msg_lookup: - testq %rdi, %rdi - jz ret_nil - - movq (%rdi), %r8 - movq 64(%r8), %r8 - -lookup: - movq (%rsi), %rax - movzbl %ah, %ecx - movzbl %al, %edx -#ifdef OF_SELUID24 - shrl $16, %eax - - movq (%r8,%rax,8), %r8 -#endif - movq (%r8,%rcx,8), %r8 - movq (%r8,%rdx,8), %rax - - testq %rax, %rax - jz objc_not_found_handler@PLT - - ret -.type objc_msg_lookup, %function -.size objc_msg_lookup, .-objc_msg_lookup - -objc_msg_lookup_super: - movq (%rdi), %rax - testq %rax, %rax - jz ret_nil - - movq 8(%rdi), %r8 - movq 64(%r8), %r8 - movq %rdi, %rax - jmp lookup -.type objc_msg_lookup_super, %function -.size objc_msg_lookup_super, .-objc_msg_lookup_super - -ret_nil: - leaq nil_method(%rip), %rax - ret - -nil_method: - movq %rdi, %rax - ret - -#ifdef __linux__ -.section .note.GNU-stack, "", %progbits -#endif DELETED src/runtime/lookup-amd64-macho.S Index: src/runtime/lookup-amd64-macho.S ================================================================== --- src/runtime/lookup-amd64-macho.S +++ src/runtime/lookup-amd64-macho.S @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -.globl _objc_msg_lookup -.globl _objc_msg_lookup_super - -.section __TEXT, __text, regular, pure_instructions -_objc_msg_lookup: - testq %rdi, %rdi - jz ret_nil - - movq (%rdi), %r8 - movq 64(%r8), %r8 - -lookup: - movq (%rsi), %rax - movzbl %ah, %ecx - movzbl %al, %edx -#ifdef OF_SELUID24 - shrl $16, %eax - - movq (%r8,%rax,8), %r8 -#endif - movq (%r8,%rcx,8), %r8 - movq (%r8,%rdx,8), %rax - - testq %rax, %rax - jz forward - - ret - -forward: - jmp _objc_not_found_handler - -_objc_msg_lookup_super: - movq (%rdi), %rax - testq %rax, %rax - jz ret_nil - - movq 8(%rdi), %r8 - movq 64(%r8), %r8 - movq %rdi, %rax - jmp lookup - -ret_nil: - leaq nil_method(%rip), %rax - ret - -nil_method: - movq %rdi, %rax - ret DELETED src/runtime/lookup-arm-elf.S Index: src/runtime/lookup-arm-elf.S ================================================================== --- src/runtime/lookup-arm-elf.S +++ src/runtime/lookup-arm-elf.S @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -.globl objc_msg_lookup -.globl objc_msg_lookup_super - -.section .text -objc_msg_lookup: - cmp r0, #0 - beq ret_nil - - ldr r2, [r0, #0] - ldr r2, [r2, #32] - -lookup: -#ifdef OF_SELUID24 - ldrb r3, [r1, #2] - ldr r2, [r2, r3, lsl #2] -#endif - ldrb r3, [r1, #1] - ldr r2, [r2, r3, lsl #2] - ldrb r3, [r1, #0] - ldr r2, [r2, r3, lsl #2] - - cmp r2, #0 - beq objc_not_found_handler(PLT) - - mov r0, r2 - bx lr -.type objc_msg_lookup, %function -.size objc_msg_lookup, .-objc_msg_lookup - -objc_msg_lookup_super: - ldr r2, [r0, #0] - cmp r0, #0 - beq ret_nil - - ldr r2, [r0, #4] - ldr r2, [r2, #32] - - b lookup -.type objc_msg_lookup_super, %function -.size objc_msg_lookup_super, .-objc_msg_lookup_super - -ret_nil: - adr r0, nil_method - bx lr - -nil_method: - mov r0, #0 - bx lr - -#ifdef __linux__ -.section .note.GNU-stack, "", %progbits -#endif ADDED src/runtime/lookup-asm-amd64-elf.S Index: src/runtime/lookup-asm-amd64-elf.S ================================================================== --- src/runtime/lookup-asm-amd64-elf.S +++ src/runtime/lookup-asm-amd64-elf.S @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +.globl objc_msg_lookup +.globl objc_msg_lookup_super + +.section .text +objc_msg_lookup: + testq %rdi, %rdi + jz ret_nil + + movq (%rdi), %r8 + movq 64(%r8), %r8 + +lookup: + movq (%rsi), %rax + movzbl %ah, %ecx + movzbl %al, %edx +#ifdef OF_SELUID24 + shrl $16, %eax + + movq (%r8,%rax,8), %r8 +#endif + movq (%r8,%rcx,8), %r8 + movq (%r8,%rdx,8), %rax + + testq %rax, %rax + jz objc_not_found_handler@PLT + + ret +.type objc_msg_lookup, %function +.size objc_msg_lookup, .-objc_msg_lookup + +objc_msg_lookup_super: + movq (%rdi), %rax + testq %rax, %rax + jz ret_nil + + movq 8(%rdi), %r8 + movq 64(%r8), %r8 + movq %rdi, %rax + jmp lookup +.type objc_msg_lookup_super, %function +.size objc_msg_lookup_super, .-objc_msg_lookup_super + +ret_nil: + leaq nil_method(%rip), %rax + ret + +nil_method: + movq %rdi, %rax + ret + +#ifdef __linux__ +.section .note.GNU-stack, "", %progbits +#endif ADDED src/runtime/lookup-asm-amd64-macho.S Index: src/runtime/lookup-asm-amd64-macho.S ================================================================== --- src/runtime/lookup-asm-amd64-macho.S +++ src/runtime/lookup-asm-amd64-macho.S @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +.globl _objc_msg_lookup +.globl _objc_msg_lookup_super + +.section __TEXT, __text, regular, pure_instructions +_objc_msg_lookup: + testq %rdi, %rdi + jz ret_nil + + movq (%rdi), %r8 + movq 64(%r8), %r8 + +lookup: + movq (%rsi), %rax + movzbl %ah, %ecx + movzbl %al, %edx +#ifdef OF_SELUID24 + shrl $16, %eax + + movq (%r8,%rax,8), %r8 +#endif + movq (%r8,%rcx,8), %r8 + movq (%r8,%rdx,8), %rax + + testq %rax, %rax + jz forward + + ret + +forward: + jmp _objc_not_found_handler + +_objc_msg_lookup_super: + movq (%rdi), %rax + testq %rax, %rax + jz ret_nil + + movq 8(%rdi), %r8 + movq 64(%r8), %r8 + movq %rdi, %rax + jmp lookup + +ret_nil: + leaq nil_method(%rip), %rax + ret + +nil_method: + movq %rdi, %rax + ret ADDED src/runtime/lookup-asm-arm-elf.S Index: src/runtime/lookup-asm-arm-elf.S ================================================================== --- src/runtime/lookup-asm-arm-elf.S +++ src/runtime/lookup-asm-arm-elf.S @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +.globl objc_msg_lookup +.globl objc_msg_lookup_super + +.section .text +objc_msg_lookup: + cmp r0, #0 + beq ret_nil + + ldr r2, [r0, #0] + ldr r2, [r2, #32] + +lookup: +#ifdef OF_SELUID24 + ldrb r3, [r1, #2] + ldr r2, [r2, r3, lsl #2] +#endif + ldrb r3, [r1, #1] + ldr r2, [r2, r3, lsl #2] + ldrb r3, [r1, #0] + ldr r2, [r2, r3, lsl #2] + + cmp r2, #0 + beq objc_not_found_handler(PLT) + + mov r0, r2 + bx lr +.type objc_msg_lookup, %function +.size objc_msg_lookup, .-objc_msg_lookup + +objc_msg_lookup_super: + ldr r2, [r0, #0] + cmp r0, #0 + beq ret_nil + + ldr r2, [r0, #4] + ldr r2, [r2, #32] + + b lookup +.type objc_msg_lookup_super, %function +.size objc_msg_lookup_super, .-objc_msg_lookup_super + +ret_nil: + adr r0, nil_method + bx lr + +nil_method: + mov r0, #0 + bx lr + +#ifdef __linux__ +.section .note.GNU-stack, "", %progbits +#endif ADDED src/runtime/lookup-asm-mips-elf.S Index: src/runtime/lookup-asm-mips-elf.S ================================================================== --- src/runtime/lookup-asm-mips-elf.S +++ src/runtime/lookup-asm-mips-elf.S @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +.globl objc_msg_lookup +.globl objc_msg_lookup_super + +.section .text +objc_msg_lookup: + beqz $a0, ret_nil + + lw $t0, 0($a0) + lw $t0, 32($t0) + +lookup: +#if defined(_MIPSEL) +# ifdef OF_SELUID24 + lbu $t1, 2($a1) +# endif + lbu $t2, 1($a1) + lbu $t3, 0($a1) +#elif defined(_MIPSEB) +# ifdef OF_SELUID24 + lbu $t1, 1($a1) +# endif + lbu $t2, 2($a1) + lbu $t3, 3($a1) +#else +# error Neither _MIPSEL nor _MIPSEB defined! +#endif + +#ifdef OF_SELUID24 + sll $t1, $t1, 2 +#endif + sll $t2, $t2, 2 + sll $t3, $t3, 2 + +#ifdef OF_SELUID24 + addu $t0, $t0, $t1 + lw $t0, 0($t0) +#endif + addu $t0, $t0, $t2 + lw $t0, 0($t0) + addu $t0, $t0, $t3 + lw $t0, 0($t0) + + beqz $t0, objc_not_found_handler + + move $v0, $t0 + j $ra +.type objc_msg_lookup, %function +.size objc_msg_lookup, .-objc_msg_lookup + +objc_msg_lookup_super: + lw $t0, 0($a0) + beqz $t0, ret_nil + + lw $t0, 4($a0) + lw $t0, 32($t0) + + b lookup +.type objc_msg_lookup_super, %function +.size objc_msg_lookup_super, .-objc_msg_lookup_super + +ret_nil: + lui $v0, %hi(nil_method) + addiu $v0, %lo(nil_method) + j $ra + +nil_method: + move $v0, $zero + j $ra + +#ifdef __linux__ +.section .note.GNU-stack, "", %progbits +#endif ADDED src/runtime/lookup-asm-ppc-elf.S Index: src/runtime/lookup-asm-ppc-elf.S ================================================================== --- src/runtime/lookup-asm-ppc-elf.S +++ src/runtime/lookup-asm-ppc-elf.S @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +.globl objc_msg_lookup +.globl objc_msg_lookup_super + +.section .text +objc_msg_lookup: + cmpwi %r3, 0 + beq- ret_nil + + lwz %r5, 0(%r3) + lwz %r5, 32(%r5) + +lookup: +#ifdef OF_SELUID24 + lbz %r6, 1(%r4) +#endif + lbz %r7, 2(%r4) + lbz %r8, 3(%r4) + +#ifdef OF_SELUID24 + slwi %r6, %r6, 2 +#endif + slwi %r7, %r7, 2 + slwi %r8, %r8, 2 + +#ifdef OF_SELUID24 + lwzx %r5, %r5, %r6 +#endif + lwzx %r5, %r5, %r7 + lwzx %r5, %r5, %r8 + + cmpwi %r5, 0 + beq- forward + + mr %r3, %r5 + blr +.type objc_msg_lookup, %function +.size objc_msg_lookup, .-objc_msg_lookup + +forward: + b objc_not_found_handler@plt + +objc_msg_lookup_super: + lwz %r5, 0(%r3) + cmpwi %r5, 0 + beq- ret_nil + + lwz %r5, 4(%r3) + lwz %r5, 32(%r5) + + b lookup +.type objc_msg_lookup_super, %function +.size objc_msg_lookup_super, .-objc_msg_lookup_super + +ret_nil: + mflr %r0 + bl get_pc + mtlr %r0 +.L1: + addi %r3, %r3, nil_method-.L1 + blr + +nil_method: + li %r3, 0 + blr + +get_pc: + mflr %r3 + blr + +#ifdef __linux__ +.section .note.GNU-stack, "", %progbits +#endif ADDED src/runtime/lookup-asm-x86-elf.S Index: src/runtime/lookup-asm-x86-elf.S ================================================================== --- src/runtime/lookup-asm-x86-elf.S +++ src/runtime/lookup-asm-x86-elf.S @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +.globl objc_msg_lookup +.globl objc_msg_lookup_super + +.section .text +objc_msg_lookup: + movl 4(%esp), %edx + testl %edx, %edx + jz ret_nil + + movl (%edx), %edx + movl 32(%edx), %edx + +lookup: + movl 8(%esp), %eax + +#ifdef OF_SELUID24 + movzbl 2(%eax), %ecx + movl (%edx,%ecx,4), %edx +#endif + movzbl 1(%eax), %ecx + movl (%edx,%ecx,4), %edx + movzbl (%eax), %ecx + movl (%edx,%ecx,4), %eax + + testl %eax, %eax + jz forward + + ret +.type objc_msg_lookup, %function +.size objc_msg_lookup, .-objc_msg_lookup + +forward: + call get_eip +.L1: + addl $objc_not_found_handler-.L1, %eax + jmp *%eax + +objc_msg_lookup_super: + movl 4(%esp), %edx + cmpl $0, (%edx) + je ret_nil + + movl 4(%edx), %edx + movl 32(%edx), %edx + jmp lookup +.type objc_msg_lookup_super, %function +.size objc_msg_lookup_super, .-objc_msg_lookup_super + +ret_nil: + call get_eip +.L2: + addl $nil_method-.L2, %eax + ret + +nil_method: + movl 4(%esp), %eax + ret + +get_eip: + movl (%esp), %eax + ret + +#ifdef __linux__ +.section .note.GNU-stack, "", %progbits +#endif Index: src/runtime/lookup-asm.S ================================================================== --- src/runtime/lookup-asm.S +++ src/runtime/lookup-asm.S @@ -16,20 +16,20 @@ #include "config.h" #if defined(__ELF__) # if defined(__amd64__) || defined(__x86_64__) -# include "lookup-amd64-elf.S" +# include "lookup-asm-amd64-elf.S" # elif defined(__i386__) -# include "lookup-x86-elf.S" +# include "lookup-asm-x86-elf.S" # elif defined(__ppc__) || defined(__PPC__) -# include "lookup-ppc-elf.S" +# include "lookup-asm-ppc-elf.S" # elif defined(__arm__) || defined(__ARM__) -# include "lookup-arm-elf.S" +# include "lookup-asm-arm-elf.S" # elif defined(__mips) && __mips < 64 -# include "lookup-mips-elf.S" +# include "lookup-asm-mips-elf.S" # endif #elif defined(__MACH__) # if defined(__amd64__) || defined(__x86_64__) -# include "lookup-amd64-macho.S" +# include "lookup-asm-amd64-macho.S" # endif #endif DELETED src/runtime/lookup-mips-elf.S Index: src/runtime/lookup-mips-elf.S ================================================================== --- src/runtime/lookup-mips-elf.S +++ src/runtime/lookup-mips-elf.S @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -.globl objc_msg_lookup -.globl objc_msg_lookup_super - -.section .text -objc_msg_lookup: - beqz $a0, ret_nil - - lw $t0, 0($a0) - lw $t0, 32($t0) - -lookup: -#if defined(_MIPSEL) -# ifdef OF_SELUID24 - lbu $t1, 2($a1) -# endif - lbu $t2, 1($a1) - lbu $t3, 0($a1) -#elif defined(_MIPSEB) -# ifdef OF_SELUID24 - lbu $t1, 1($a1) -# endif - lbu $t2, 2($a1) - lbu $t3, 3($a1) -#else -# error Neither _MIPSEL nor _MIPSEB defined! -#endif - -#ifdef OF_SELUID24 - sll $t1, $t1, 2 -#endif - sll $t2, $t2, 2 - sll $t3, $t3, 2 - -#ifdef OF_SELUID24 - addu $t0, $t0, $t1 - lw $t0, 0($t0) -#endif - addu $t0, $t0, $t2 - lw $t0, 0($t0) - addu $t0, $t0, $t3 - lw $t0, 0($t0) - - beqz $t0, objc_not_found_handler - - move $v0, $t0 - j $ra -.type objc_msg_lookup, %function -.size objc_msg_lookup, .-objc_msg_lookup - -objc_msg_lookup_super: - lw $t0, 0($a0) - beqz $t0, ret_nil - - lw $t0, 4($a0) - lw $t0, 32($t0) - - b lookup -.type objc_msg_lookup_super, %function -.size objc_msg_lookup_super, .-objc_msg_lookup_super - -ret_nil: - lui $v0, %hi(nil_method) - addiu $v0, %lo(nil_method) - j $ra - -nil_method: - move $v0, $zero - j $ra - -#ifdef __linux__ -.section .note.GNU-stack, "", %progbits -#endif DELETED src/runtime/lookup-ppc-elf.S Index: src/runtime/lookup-ppc-elf.S ================================================================== --- src/runtime/lookup-ppc-elf.S +++ src/runtime/lookup-ppc-elf.S @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -.globl objc_msg_lookup -.globl objc_msg_lookup_super - -.section .text -objc_msg_lookup: - cmpwi %r3, 0 - beq- ret_nil - - lwz %r5, 0(%r3) - lwz %r5, 32(%r5) - -lookup: -#ifdef OF_SELUID24 - lbz %r6, 1(%r4) -#endif - lbz %r7, 2(%r4) - lbz %r8, 3(%r4) - -#ifdef OF_SELUID24 - slwi %r6, %r6, 2 -#endif - slwi %r7, %r7, 2 - slwi %r8, %r8, 2 - -#ifdef OF_SELUID24 - lwzx %r5, %r5, %r6 -#endif - lwzx %r5, %r5, %r7 - lwzx %r5, %r5, %r8 - - cmpwi %r5, 0 - beq- forward - - mr %r3, %r5 - blr -.type objc_msg_lookup, %function -.size objc_msg_lookup, .-objc_msg_lookup - -forward: - b objc_not_found_handler@plt - -objc_msg_lookup_super: - lwz %r5, 0(%r3) - cmpwi %r5, 0 - beq- ret_nil - - lwz %r5, 4(%r3) - lwz %r5, 32(%r5) - - b lookup -.type objc_msg_lookup_super, %function -.size objc_msg_lookup_super, .-objc_msg_lookup_super - -ret_nil: - mflr %r0 - bl get_pc - mtlr %r0 -.L1: - addi %r3, %r3, nil_method-.L1 - blr - -nil_method: - li %r3, 0 - blr - -get_pc: - mflr %r3 - blr - -#ifdef __linux__ -.section .note.GNU-stack, "", %progbits -#endif DELETED src/runtime/lookup-x86-elf.S Index: src/runtime/lookup-x86-elf.S ================================================================== --- src/runtime/lookup-x86-elf.S +++ src/runtime/lookup-x86-elf.S @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -.globl objc_msg_lookup -.globl objc_msg_lookup_super - -.section .text -objc_msg_lookup: - movl 4(%esp), %edx - testl %edx, %edx - jz ret_nil - - movl (%edx), %edx - movl 32(%edx), %edx - -lookup: - movl 8(%esp), %eax - -#ifdef OF_SELUID24 - movzbl 2(%eax), %ecx - movl (%edx,%ecx,4), %edx -#endif - movzbl 1(%eax), %ecx - movl (%edx,%ecx,4), %edx - movzbl (%eax), %ecx - movl (%edx,%ecx,4), %eax - - testl %eax, %eax - jz forward - - ret -.type objc_msg_lookup, %function -.size objc_msg_lookup, .-objc_msg_lookup - -forward: - call get_eip -.L1: - addl $objc_not_found_handler-.L1, %eax - jmp *%eax - -objc_msg_lookup_super: - movl 4(%esp), %edx - cmpl $0, (%edx) - je ret_nil - - movl 4(%edx), %edx - movl 32(%edx), %edx - jmp lookup -.type objc_msg_lookup_super, %function -.size objc_msg_lookup_super, .-objc_msg_lookup_super - -ret_nil: - call get_eip -.L2: - addl $nil_method-.L2, %eax - ret - -nil_method: - movl 4(%esp), %eax - ret - -get_eip: - movl (%esp), %eax - ret - -#ifdef __linux__ -.section .note.GNU-stack, "", %progbits -#endif