-
Notifications
You must be signed in to change notification settings - Fork 13k
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
global register variables not supported #2894
Comments
Please attach reproducible testcase |
GHC probably depends on the GNU extension to pin global variables to physregs. This is not fully supported by llvm-gcc at this time. Please do include a testcase though. |
haskell source and makefile to repeat issue I checked this out a little further today, and GHC does allow me to work around the register issue by defining 'NO_REGS'. |
Forgot to mention. The makefile requires a variable. 'GHC_HOME=path/to/ghc-6.8.3/installation' |
Preprocessed .c source |
This is basically: register StgUnion R1 asm("%" "esi"); where StgUnion is a big and scary thing. Putting a union in a register is vaguely wierd, but I can see why you'd want to do it. :) |
This is also an issue if you try to build a 32-bit Linux kernel (ARCH=i386): |
Edwin's example works for me with dragonegg. The preprocessed source for the |
mentioned in issue llvm/llvm-bugzilla-archive#4068 |
Extended Description
While attempting to compile a C file generated by GHC. llvm-gcc chocked with the error message "sorry, unimplemented: LLVM cannot register variable 'R1'." and requested I report a bug.
The GHC version was ghc-6.8.3.
From the root of the GHC installation the path to the header llvm-gcc was parsing is "include/Regs.h" and the error occured at line 220.
David
The text was updated successfully, but these errors were encountered: