sebastianbiallas / pearpc

PearPC - PowerPC Architecture Emulator
GNU General Public License v2.0
389 stars 70 forks source link

JIT does not compile on Mac OS X 10.10 #1

Closed claunia closed 9 years ago

claunia commented 9 years ago

JIT is unable to compile on Mac OS X 10.10 using Xcode 6.3 with SDK 10.10. Fails on several assembly lines.

gcc -DHAVE_CONFIG_H -I. -I../../.. -I ../..    -DPREFIX=_ -MT jitc_tools.o -MD -MP -MF .deps/jitc_tools.Tpo -c -o jitc_tools.o jitc_tools.S
jitc_tools.S:274:13: error: unknown token in expression
 test eax, ~((1<<30)|(1<<27)|(1<<25)|(1<<18)|(1<<15)|(1<<14)|(1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<8)|(1<<5)|(1<<4)|(1<<1))
            ^
jitc_tools.S:299:12: error: unknown token in expression
 and eax, ~(1<<18)
           ^
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

Using "generic" interpreter compiles perfectly.

sebastianbiallas commented 9 years ago

Get you pull the current master? Line 299 look differently: https://github.com/sebastianbiallas/pearpc/blob/master/src/cpu/cpu_jitc_x86_64/jitc_tools.S#L299

claunia commented 9 years ago

Hi @sebastianbiallas,

Yes, I'm on master, and the file is the same.

The error is indeed in https://github.com/sebastianbiallas/pearpc/blob/master/src/cpu/cpu_jitc_x86_64/jitc_tools.S#L297 but why it complies about line 299 I don't know. Preprocessing?

sebastianbiallas commented 9 years ago

You're right, I forgot to "make clean" after the 10.10.3 update :) I commited some changes.

claunia commented 9 years ago

Pulled master again

gcc -DHAVE_CONFIG_H -I. -I../../.. -I ../..    -DPREFIX=_ -MT jitc_tools.o -MD -MP -MF .deps/jitc_tools.Tpo -c -o jitc_tools.o jitc_tools.S
jitc_tools.S:274:21: error: unexpected token in argument list
 test eax, ASM_NEG32((1<<30)|(1<<27)|(1<<25)|(1<<18)|(1<<15)|(1<<14)|(1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<8)|(1<<5)|(1<<4)|(1<<1))
                    ^
jitc_tools.S:299:20: error: unexpected token in argument list
 and eax, ASM_NEG32(1<<18)
                   ^

Strange...

sebastianbiallas commented 9 years ago

Sorry, forget to commit an header, please try again

claunia commented 9 years ago

Perfect! Now it compiles (with warnings). Next step, testing.