Differences From Artifact [c3da6554d1]:
- File
src/forwarding/apple-forwarding-x86.S
— part of check-in
[54ee8929f0]
at
2023-10-28 17:05:55
on branch trunk
— Move x86/Mach-O assembly to Intel syntax
A workaround for the assembler bugs has been found. (user: js, size: 2577) [annotate] [blame] [check-ins using]
To Artifact [fe22007392]:
- File src/forwarding/apple-forwarding-x86.S — part of check-in [cb18f26404] at 2023-10-28 18:35:43 on branch trunk — Use more local labels in assembly (user: js, size: 2587) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
31 32 33 34 35 36 37 | .att_syntax /* Use uppercase instruction to avoid recursion. */ JMP $0 .intel_syntax noprefix .endmacro .section __TEXT, __cstring, cstring_literals | | | | | | | | 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 | .att_syntax /* Use uppercase instruction to avoid recursion. */ JMP $0 .intel_syntax noprefix .endmacro .section __TEXT, __cstring, cstring_literals Lstr_forwardingTargetForSelector_: .asciz "forwardingTargetForSelector:" .section __OBJC, __message_refs, literal_pointers, no_dead_strip Lsel_forwardingTargetForSelector_: .long Lstr_forwardingTargetForSelector_ .section __OBJC, __image_info .long 0, 0 .section __TEXT, __text, regular, pure_instructions _OFForward: push ebp mov ebp, esp push ebx sub esp, 20 call LgetEIP 0: mov eax, [ebp + 8] mov [esp], eax call _object_getClass mov [esp], eax mov eax, [ebx + Lsel_forwardingTargetForSelector_ - 0b] mov [esp + 4], eax call _class_respondsToSelector test eax, eax jz 0f mov eax, [ebp + 8] mov [esp], eax mov eax, [ebx + Lsel_forwardingTargetForSelector_ - 0b] mov [esp + 4], eax mov eax, [ebp + 12] mov [esp + 8], eax call _objc_msgSend test eax, eax jz 0f |
︙ | ︙ | |||
99 100 101 102 103 104 105 | _OFForward_stret: push ebp mov ebp, esp push ebx sub esp, 20 | | | | | 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 | _OFForward_stret: push ebp mov ebp, esp push ebx sub esp, 20 call LgetEIP 0: mov eax, [ebp + 12] mov [esp], eax call _object_getClass mov [esp], eax mov eax, [ebx + Lsel_forwardingTargetForSelector_ - 0b] mov [esp + 4], eax call _class_respondsToSelector test eax, eax jz 0f mov eax, [ebp + 12] mov [esp], eax mov eax, [ebx + Lsel_forwardingTargetForSelector_ - 0b] mov [esp + 4], eax mov eax, [ebp + 16] mov [esp + 8], eax call _objc_msgSend test eax, eax jz 0f |
︙ | ︙ | |||
142 143 144 145 146 147 148 | 0: add esp, 20 pop ebx pop ebp jmp _OFMethodNotFound_stret | | | 142 143 144 145 146 147 148 149 150 151 | 0: add esp, 20 pop ebx pop ebp jmp _OFMethodNotFound_stret LgetEIP: mov ebx, [esp] ret |