https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80799
Bug ID: 80799 Summary: [7 Regression] x86-32 bits generates MMX without EMMS Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: gregory.hainaut at gmail dot com Target Milestone: --- Created attachment 41373 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41373&action=edit MMX without EMMS instead of SSE2 Dear GCC developers, GCC7 breaks the build of the project PCSX2. We found that MMX opcodes are generated without any EMMS opcode on the 32 bits build (compiled from x86-64). Note: it would likely be better to use the SSE2 equivalent opcode. Please find a small example attached. Compiled with : g++ -msse -msse2 -O2 -m32 -g -c gcc7_mmx.cpp Here the generated code GIFRegHandlerTRXPOS(GIFRegTRXPOS const&): push ebx sub esp, 8 mov ebx, DWORD PTR [esp+16] movq xmm0, QWORD PTR TRXPOS movq mm0, QWORD PTR [ebx] movq2dq xmm1, mm0 pcmpeqd xmm0, xmm1 pmovmskb eax, xmm0 cmp eax, 65535 je .L2 call dummy_call() movq mm0, QWORD PTR [ebx] .L2: movq QWORD PTR TRXPOS, mm0 add esp, 8 pop ebx ret Best Regards, Gregory