[PATCH, GCC/ARM] Fix PR85261: ICE with FPSCR setter builtin
Thomas Preudhomme
thomas.preudhomme@foss.arm.com
Fri Apr 6 15:54:00 GMT 2018
Instruction pattern for setting the FPSCR expects the input value to be
in a register. However, __builtin_arm_set_fpscr expander does not ensure
that this is the case and as a result GCC ICEs when the builtin is
called with a constant literal.
This commit fixes the builtin to force the input value into a register.
It also remove the unneeded volatile in the existing fpscr test and
fixes the function prototype.
ChangeLog entries are as follows:
*** gcc/ChangeLog ***
2018-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR target/85261
* config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
into register.
*** gcc/testsuite/ChangeLog ***
2018-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR target/85261
* gcc.target/arm/fpscr.c: Add call to __builtin_arm_set_fpscr with
literal value. Expect 2 MCR instruction. Fix function prototype.
Remove volatile keyword.
Testing: Built an arm-none-eabi GCC cross-compiler and testsuite shows
no regression.
Is this ok for stage4?
Best regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_pr85261.patch
Type: text/x-patch
Size: 1334 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180406/e2bab77a/attachment.bin>
More information about the Gcc-patches
mailing list