Merge pull request #62 from Microsoft/cherry-pick-acd3fcc

fix objc_msgSend.x86-32.S for win32
main
davidchisnall 8 years ago committed by GitHub
commit bdf7299af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
#if defined(__WIN32__) || defined(__APPLE__)
#if (defined(_WIN32) && defined(__i386__)) || defined(__APPLE__)
#define CDECL(symbol) _##symbol
#else
#define CDECL(symbol) symbol

@ -54,7 +54,7 @@
push %ecx # _cmd
push %eax # &self
.cfi_def_cfa_offset 12
call slowMsgLookup@PLT
call CDECL(slowMsgLookup)@PLT
add $8, %esp # restore the stack
@ -65,8 +65,14 @@
7:
popl %ebx;
8:
#if __ELF__
# ELF can support GOT-relative addressing;
# PE/COFF and Mach-O need a text relocation.
addl $_GLOBAL_OFFSET_TABLE_+(8b-7b), %ebx
leal SmallObjectClasses@GOTOFF(%ebx), %eax
#else
leal CDECL(SmallObjectClasses), %eax
#endif
mov (%eax), %eax
popl %ebx
jmp 1b

Loading…
Cancel
Save