Andrea Corallo <andrea.cora...@arm.com> writes: > Hi all, > > second and last patch of the two reworking FPCR and FPSR builtins. > > This rework __builtin_aarch64_set_fpcr (unsigned) and > __builtin_aarch64_set_fpsr (unsigned) to emit a read-modify-sequences > as: > > mrs x1, fpsr > bfi x1, x0, 0, 32 > msr fpsr, x1 > > This in order to preserve the original high 32 bits of the system > register. Both FPSR and FPCR became 64bit regs with armv8.1. > > Bootstrapped on aarch64-linux-gnu, does not introduce regressions. > > Regards > > Andrea > > gcc/ChangeLog: > > 2020-??-?? Andrea Corallo <andrea.cora...@arm.com> > > * config/aarch64/aarch64.md (insv_reg<mode>): Pattern renamed. > (set_fpcr, set_fpsr): Pattern modified for read-modify-write > sequence respecting high 32bit register content. > > gcc/testsuite/ChangeLog: > > 2020-??-?? Andrea Corallo <andrea.cora...@arm.com> > > * gcc.target/aarch64/set_fpcr.c: New test. > * gcc.target/aarch64/get_fpcr.c: New test. > * gcc.target/aarch64/set_fpsr.c: New test. > * gcc.target/aarch64/get_fpsr.c: New test.
Ping, please let me know if these are okay for trunk. Thanks Andrea