-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
d8 does not run on G4 Mac #120
Comments
Oh yeah, this was compiled from the g4compat branch. I should have added that. |
Other knowledgeable folks should check me on this, but ... The PowerPC 74xx family of processors don't support the Book E floating point instructions, including fcfid (floating point convert from int) which triggered the exception you encountered. The full list of unsupported instructions for this processor is in "Appendix B - Instructions Not Implemented" in http://www.freescale.com/files/32bit/doc/ref_manual/MPC7410UM.pdf I'm working on a similar issue for Freescale's e500v2 - #119 The e500v2 has a set of closely related double-precision floating point instructions. These can be used by lithium (the v8 machine code generator) as substitutes for the standard book E FPU instructions currently implemented in v8ppc. These "e500v2-only" instructions are described in section 10.4 - Double-Precision Floating-Point APU (e500 v2 Only) of the PowerPC e500 Core Family Reference Manual, Rev. 1 - http://cache.freescale.com/files/32bit/doc/ref_manual/E500CORERM.pdf Unfortunately Freescale only implemented these "alternate" FP instructions in the e500v2. The solution will be a bit more complicated if no alternate DPFP instructions exist. We should implement the e500v2 support in a way that can extend to other Freescale cores which don't support the Book E FP implementation. |
I'm not on OS X right now (linux is faster) but with Xcode 3.2, they have an instruction reference book. I don't think it's legal to share it but it has some important tips and usage things. |
I was thinking the issue was as outlined by Gary (turneyj) I had just not confirmed that fcfid was one of the unsupported instructions which it looks like he already has. |
Ok so we need a workaround? |
Yes, according to my book fcfid is 64-bit, whereas mine is 32 bit. |
Hmmm - I wonder why a 32 bit v8ppc implementation emits a 64 bit instruction. But even if you built a 64 bit v8ppc, the 74xx core will generate an illegal instruction exception for fcfid, since it has no register support for DPFP. I'm wondering what is the minimum double-precision floating-point (DPFP) support for a embedded network device (i.e. Freescale core) running node on v8ppc. I'm not familiar with the node test cases beyond just running them but if there was a way to identify which node APIs depend on the unsupported DPFP instructions, the Freescale porting effort could be reduced to accommodate what would be considered acceptable for an embedded network device running node. The unsupported DPFP instructions could be handled through the "not supported" exception which uses a different event notification than illegal instruction. The node tests hit 10 out of the 40 or so unsupported instructions. So the acceptable Freescale DPFP support may be something less than 10 instructions. |
I haven't run tests -- mostly because the Excuable itself won't run. However, I do agree about running something else, but I'm not an assembly expert. Sent from my iPad On Sun, Dec 28, 2014 at 4:05 PM, Gary Jones [email protected]
|
Caught me on a holiday break from the computer -- @tunniclm had done some hacking here and gotten most of the way to making it work on the G4 (under Linux). He captured most of the work in this branch https://github.com/andrewlow/v8ppc/tree/g4compat .. probably out of date at this point, but should have been in a working state. |
@andrewlow I did compile that from the g4compat branch, and it has an illegal instruction for me. |
@awesomebing1 Hi, fcfid is one of the instructions that the g4compat branch should be avoiding. It does attempt to detect incompatible processors, so it may be that the detection is not triggering. Can you run |
That's a pretty cool command. Yes, the platform is ppc7450. If it was compiled with clang and snapshot off, would that make a difference? Sent from my iPad On Mon, Jan 5, 2015 at 5:59 AM, Mike Tunnicliffe [email protected]
|
Next step would be to try to identify WHERE this fcfid is being emitted from. You could put a breakpoint into the src/ppc/assembler-ppc.cc code where it emits the instruction. I'm actually a bit suspicious of clang possibly sneaking it in, do you have proof that clang works ok? |
That chunk looks a lot like something that would be emitted by EmitVFPTruncate() [macro-assembler-ppc.cc:2370] if the call to EmitVFPTruncate_NoPPC64() was not taken. I can't recognise where the start of the chunk you posted comes from though. |
Yes. My clang does work. I have not encountered any errors. It's clang 3.5 compiled with clang 3, on Debian. I can add a breakpoint later. Sent from my iPad On Mon, Jan 5, 2015 at 10:08 AM, Mike Tunnicliffe
|
Weird - I just checked out the g4compat branch.
So code-stubs-ppc.cc and macro-assembler-ppc.cc would be the two locations where I'd expect to see this instruction. code-stubs-ppc.cc
macro-assembler-ppc.cc
Neither of them seem to be the sequence that matches the bad one.
Feels like I'm missing something here? |
Ok. I recompiled everything with gcc. I got the same Illegal instruction (and backtrace, except for the addresses) as the one with clang. I can add a hook, in a minute. |
So does it work on MacOS PowerPC in the current state or not? I need V8 for some R functionality. |
Yes, I've read lots of the other G4 related problems. But, I don't think this is related.
If you need other info, please ask.
The text was updated successfully, but these errors were encountered: