x86: Disallow MMX and 80387 in no_caller_saved_registers function
commit
9804b23198b39f85a7258be556c5e8aed44b9efc
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Apr 13 11:38:24 2025 -0700
x86: Add preserve_none and update no_caller_saved_registers attributes
allowed MMX/80387 instructions in functions with no_caller_saved_registers
attribute by accident. Update ix86_set_current_function to properly
check if MMX and 80387 are enabled.
gcc/
PR target/121540
* config/i386/i386-options.cc (ix86_set_current_function):
Properly check if MMX and 80387 are enabled.
gcc/testsuite/
PR target/121540
* gcc.target/i386/no-callee-saved-19a.c (dg-options): Add
"-mno-avx -mno-mmx -mno-80387"
* gcc.target/i386/no-callee-saved-19b.c: Likewise.
* gcc.target/i386/no-callee-saved-19c.c: Likewise.
* gcc.target/i386/no-callee-saved-19d.c: Likewise.
* gcc.target/i386/no-callee-saved-19e.c: Likewise.
* gcc.target/i386/pr121208-1a.c: Likewise.
* gcc.target/i386/pr121208-1b.c: Likewise.
* gcc.target/i386/pr121540-1.c: New test.
* gcc.target/i386/pr121540-2.c: Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>