graalvm / sulong

Obsolete repository. Moved to oracle/graal.
Other
628 stars 63 forks source link

Dragonegg, SSE and GCC builtins #842

Open jdenheen opened 6 years ago

jdenheen commented 6 years ago

I have some Dragonegg-derived C code that used extensive GCC features and has some SSE instructions. Is there generally any way around the following without re-writing?

Caused by: org.graalvm.polyglot.PolyglotException: com.oracle.truffle.llvm.runtime.SulongRuntimeException: IllegalStateException Missing GCC builtin: @__builtin_ia32_ldmxcsr

pekd commented 6 years ago

MXCSR contains flags which control SSE floating point operations, and it also contains exception flags which allow the program to check if certain exceptions occured. SSE is not implemented at all and floating point exceptions/rounding modes/… are also not implemented. There is no way around the error without re-writing your code. If the code relies on something like floating point exceptions, then it's impossible to run that on Sulong (at least for now).