westerndigitalcorporation / swerv-ISS

Western Digital’s Open Source RISC-V SweRV Instruction Set Simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default c++ build flag -mfma causing Illegal Instruction error

joeski65 opened this issue · comments

This flag makes the compiler generate code that takes advantage of the UltraSPARC Fused Multiply-Add Floating-point instructions.

This causes cryptic 'Illegal Instruction' errors on CPU's that don't support this (which has proved to be plentiful). Can this not be made default, please?

Thanks.

No problem. I will remove it. It seems to work on x86. On which processor does it not work?

Removed -fmfa from GNUmakefile

No problem. I will remove it. It seems to work on x86. On which processor does it not work?

Thanks!
The behaviour changes slightly depending on processor, some give illegal instructions when constructing static variables, others give it right at the end after successful execution of a program.
Two examples respectively:
Intel(R) Xeon(R) CPU E5-2650
Intel(R) Xeon(R) CPU X5670