Overview
Comment: | Add forwardingTargetForSelector: for x86/Win32. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c0f224df8a2ac73a154f9d5219e3f476 |
User & Date: | js on 2013-12-06 02:36:01 |
Other Links: | manifest | tags |
Context
2013-12-06
| ||
03:06 | configure.ac: Remove -fno-objc-nonfragile-abi. check-in: 808de50cca user: js tags: trunk | |
02:36 | Add forwardingTargetForSelector: for x86/Win32. check-in: c0f224df8a user: js tags: trunk | |
02:35 | Add x86/Win32 assembly lookup implementation. check-in: b527914a91 user: js tags: trunk | |
Changes
Modified src/OFObject.h from [650e4bd8f2] to [6c65e9c570].
︙ | ︙ | |||
107 108 109 110 111 112 113 | #ifdef OF_APPLE_RUNTIME # if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \ defined(__ppc__) # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET # endif #else | | > > > > > | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | #ifdef OF_APPLE_RUNTIME # if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \ defined(__ppc__) # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET # endif #else # if defined(__ELF__) # if defined(__amd64__) || defined(__x86_64__) || defined(__i386__) || \ defined(__arm__) || defined(__ARM__) || defined(__ppc__) || defined(__PPC__) # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR # if __OBJFW_RUNTIME_ABI__ >= 800 # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET # endif # endif # if (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) || \ (defined(__mips_eabi) && _MIPS_SZPTR == 32) # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR # if __OBJFW_RUNTIME_ABI__ >= 800 # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET # endif # endif # elif defined(_WIN32) && defined(__i386__) # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR # if __OBJFW_RUNTIME_ABI__ >= 800 # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET # endif # endif #endif #if __has_feature(objc_arc) # define OF_RETURNS_RETAINED __attribute__((ns_returns_retained)) # define OF_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) # define OF_RETURNS_INNER_POINTER __attribute__((objc_returns_inner_pointer)) |
︙ | ︙ |
Added src/forwarding/forwarding-x86-win32.S version [de84be08d5].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | /* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 * Jonathan Schleifer <js@webkeks.org> * * 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. */ .globl _of_forward .globl _of_forward_stret .section .text _of_forward: pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp call get_eip .L0: movl 8(%ebp), %eax movl %eax, (%esp) leal sel_forwardingTargetForSelector_-.L0(%ebx), %eax movl %eax, 4(%esp) leal _objc_msg_lookup-.L0(%ebx), %eax call *%eax movl 8(%ebp), %edx movl %edx, (%esp) leal sel_forwardingTargetForSelector_-.L0(%ebx), %edx movl %edx, 4(%esp) movl 12(%ebp), %edx movl %edx, 8(%esp) call *%eax movl %eax, 8(%ebp) movl %eax, (%esp) movl 12(%ebp), %eax movl %eax, 4(%esp) leal _objc_msg_lookup-.L0(%ebx), %eax call *%eax addl $20, %esp popl %ebx popl %ebp jmp *%eax _of_forward_stret: pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp call get_eip .L1: movl 12(%ebp), %eax movl %eax, (%esp) leal sel_forwardingTargetForSelector_-.L1(%ebx), %eax movl %eax, 4(%esp) leal _objc_msg_lookup-.L1(%ebx), %eax call *%eax movl 12(%ebp), %edx movl %edx, (%esp) leal sel_forwardingTargetForSelector_-.L1(%ebx), %edx movl %edx, 4(%esp) movl 16(%ebp), %edx movl %edx, 8(%esp) call *%eax movl %eax, 12(%ebp) movl %eax, (%esp) movl 16(%ebp), %eax movl %eax, 4(%esp) leal _objc_msg_lookup_stret-.L1(%ebx), %eax call *%eax addl $20, %esp popl %ebx popl %ebp jmp *%eax init: pushl %ebp movl %esp, %ebp pushl %ebx subl $4, %esp call get_eip .L2: leal module-.L2(%ebx), %eax movl %eax, (%esp) leal ___objc_exec_class-.L2(%ebx), %eax call *%eax addl $4, %esp popl %ebx popl %ebp ret get_eip: movl (%esp), %ebx ret .section .ctors, "a" .long init .section .rodata str_forwardingTargetForSelector_: .asciz "forwardingTargetForSelector:" .section .data sel_forwardingTargetForSelector_: .long str_forwardingTargetForSelector_, 0 .long 0, 0 symtab: .long 0, sel_forwardingTargetForSelector_ .short 0, 0 .long 0 .long 0 module: .long 8, 16, 0, symtab |
Modified src/forwarding/forwarding.S from [4eb0272be1] to [fb4a9e7114].
︙ | ︙ | |||
23 24 25 26 27 28 29 | # include "apple-forwarding-i386.S" # elif defined(__arm__) # include "apple-forwarding-arm.S" # elif defined(__ppc__) # include "apple-forwarding-ppc.S" # endif #else | | > > | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # include "apple-forwarding-i386.S" # elif defined(__arm__) # include "apple-forwarding-arm.S" # elif defined(__ppc__) # include "apple-forwarding-ppc.S" # endif #else # if defined(__ELF__) # if defined(__amd64__) || defined(__x86_64__) # include "forwarding-amd64-elf.S" # elif defined(__i386__) # include "forwarding-x86-elf.S" # elif defined(__arm__) || defined(__ARM__) # include "forwarding-arm-elf.S" # elif defined(__ppc__) || defined(__PPC__) # include "forwarding-ppc-elf.S" # elif (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) || \ (defined(__mips_eabi) && _MIPS_SZPTR == 32) # include "forwarding-mips-elf.S" # endif # elif defined(_WIN32) && defined(__i386__) # include "forwarding-x86-win32.S" # endif #endif |