Alan Green has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32887 )
Change subject: Makefile: Turn off SSE instructions for x86_32 architecture ......................................................................
Patch Set 5:
(4 comments)
Patch Set 2: Code-Review+1
(3 comments)
https://review.coreboot.org/#/c/32887/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32887/2//COMMIT_MSG@14 PS2, Line 14: it's code generation appears unaffected.
GCC has CFLAGS -march=i686 for coreboot proper and this simply keeps both SSE/SSE2 disabled. […]
I see. That sounds more like the reason that no SSE instructions are being emitted by GCC. I found these lines in util/xcompile/xcompile
ifneq ($(CONFIG_USE_MARCH_586)$(CONFIG_LP_USE_MARCH_586),) GCC_CFLAGS_${TARCH} += -march=i586 else GCC_CFLAGS_${TARCH} += -march=i686 endif
Given that, probably a better fix than this adding a -mno-sse is to add the same -march flag for Clang compiles as we do for GCC compiles.
I'll get that changeset ready in the next few days..
https://review.coreboot.org/#/c/32887/2//COMMIT_MSG@18 PS2, Line 18: code : code
Failing QEMU command line? If the emulated CPU is without SSE support, invalid opcode is the expecte […]
Clang compiled coreboot fails at this point with both qemu-system-x86_64 and qemu-system-i386. I have checked in the QEMU console and I can see that the bits in CR4 have not been set to enable SSE.
Therefore failing on an SSE instruction is correct behaviour for the emulator.
https://review.coreboot.org/#/c/32887/2//COMMIT_MSG@26 PS2, Line 26: B. "Fix" Clang so that no-mmx implies no-sse (Will take a long time)
Why would you want no-mmx imply no-sse? Separate sets of registers (mmx vs xmm, afair).
Looking into this further, for GCC no-mmx does not imply no-sse. As Kyösti wrote, they are independent.
See https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/x86-Options.html#index-mmmx
I have dropped this as a suggested solution.
https://review.coreboot.org/#/c/32887/2//COMMIT_MSG@28 PS2, Line 28:
One blank line should be enough.
Ack