-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fixed stack alignment for 32-bit OS's. Closes #31 #17
Conversation
I would prefer another way of testing 32 bit Linux since it might break on Windows, is there no flag in Makefile ? |
I'm afraid there isn't. Will 'os' be always mingw on Windows when using the Makefile? |
might be cygwin or mingw, and also, are we sure that "shell" command is available on OSX? |
I'll check on OSX, and will update the pull with cygwin or mingw tests. However this problem shouldn't happen only on Linux, so we might need to find a way to know if we're compiling to 64-bits on windows as well. |
Just to ping back on this issue : I think that using shell command will fail when using the makefile on windows, so we need to fix this before merging the PR. Can you look into it ? |
(This seems to be linked to the wrong issue #31). |
Fixed stack alignment for 32-bit OS's. Closes #31
This will break with Clang, the flag is only supported by GCC. I will see what can be done though. UPD: I mean it breaks with Clang :) |
Does anyone know what the correct issue for this is? That would help a lot |
The issue is because of the ABI for system calls. Before, it was valid to call any function using an alignment of 2bytes (32 bits), but some compilers requires now an alignment of 4 bytes (64 bits) even on 32 bits systems. The Neko JIT does perform 32 bits alignement, not 64 bits (which is the reason why it's disabled on OSX BTW, since the OSX ABI is 64 bits aligned from the start). Using |
Clang has -mstack-alignment= argument, not sure if that would work (I am guessing it might work if it is similar to GCC's -mpreferred-stack-alignment), need to experiment. |
@ppenzin could you check it ? You only need to enable JIT in vm/jit_x86.c (remove the && !defined(NEKO_MAC) |
@ncannasse I'll try. Are there any extra tests that you would recommend On Tue, Jan 19, 2016 at 3:27 AM, Nicolas Cannasse [email protected]
|
Finally were able to test it. -mstackrealign didn't work, but this one did it!