-
Notifications
You must be signed in to change notification settings - Fork 194
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
Frontend has not been implemented yet to support va_arg at present. #4
Comments
Just curious is it a clang problem or a crossbridge problem? Because as far as I know clang compiles FreeBSD 9 which sources are used in avm2_env |
Really? Most of files under avm2_evn look unchanged comparing to master. Have you compared them to the freebsd version 9? As an frontend, clang is different. It means you can not just switch to clang to make crossbridge work exactly as before unless you implement must-have parts. va_args is one of parts waiting to be added in. |
I've found interesting statement in emscripten FAQ. They say that problem is caused by LE32 clang frontend and everything is OK with X86 frontend. Is crossbridge forced to use LE32 frontend? |
I had investigated a bit further. And here are my thoughts what is the source of problem. |
Sorry for the misleading title. :'( |
Oh, now I get it. But how it worked for gcc? Can we just use X86ABI? Initiallly I thought that flascc just takes LLVM created for generic X86 target and than converts it to AVM2 assembler, but now I'm not so sure. Also as far as I understand EmitVAArg just fetches value from valist according to abi convention. But where values are stored to valist according to that convention? |
OK, I see you just copied a few lines as what I did. Though they are different under hood, but I guess X86ABI may work for this case, would you like to commit a more complete version by borrowing some code of X86_32? |
Yep, I just looked through different implementations of EmitVAArgs for different platforms and extracted lines that seem to be common for all implementations. Yes, suggested implementation lacks alignment support. But I simply don't know how it should be done for avm2 or will X86_32 code work for avm2. So this implementation is just a first iteration that will allow code to compile, and probably to work. |
Ok, just let it fly over the compilation and be fixed in future. |
When you use clang to compile libm, you have to comment out 2 lines in semctl.c.
FYI.
The text was updated successfully, but these errors were encountered: