|
From: Jean-Pierre <cho...@fr...> - 2009-11-03 12:10:27
|
Hi,
I continue my monologue...
Here's a more complete patch for dyngen.c.
This version correctly deals with mach-o 64-bit object files built by
gcc-4.2.1 as well as gcc-4.0.
Note that there's actually a bug in Apple's gcc 4.2.1 which seems to
ignore the -fomit-frame-pointer for 64 bit x86_64 code.
i.e.:
With gcc-4.0, the following tiny source code:
// tst.cpp
register unsigned int *A0 asm("ebx");
void op_mov_ad_A0_im(void)
{
asm volatile ("movabsq $___op_A0,%0" : "=r" (A0));
}
compiled using:
gcc-4.0 -arch x86_64 -fomit-frame-pointer -c tst.cpp
produces this otool result:
tst.o:
(__TEXT,__text) section
__Z15op_mov_ad_A0_imv:
0000000000000000 movq $0x0000000000000000,%rbx
000000000000000a ret
But when compiled using gcc-4.2.1 from Snow Leopard:
gcc -arch x86_64 -fomit-frame-pointer -c tst.cpp
produces this otool result:
tst.o:
(__TEXT,__text) section
__Z15op_mov_ad_A0_imv:
0000000000000000 pushq %rbx
0000000000000001 movq $0x0000000000000000,%rbx
000000000000000b popq %rbx
000000000000000c ret
my gcc version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc.
build 5646) (dot 1)
I filed a bug at Apple about this.
I also have a few other patches available:
One for clip_macosx.cpp to deal with ne new Pasteboard functions since
GetCurrentScrap/PutScrapFlavor etc.. have disappeared in Snow
Leopard's APIs.
One for video_blit.cpp to accept the new GBRA format returned by the
latest SLD-1.2.14, and a patch for this SDL to remove a memory leak
(bug filed at libsdl.org).
Let me know if you want them or if you don't care...
Regards,
- Jean-Pierre.
|