[ARM] Fix PR85261: ICE with FPSCR setter builtin
commit7d24c3846c904b6e1ffea0bee0c58a9f7bcc23cb
authorthopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Apr 2018 10:07:25 +0000 (11 10:07 +0000)
committerthopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Apr 2018 10:07:25 +0000 (11 10:07 +0000)
tree895af22275d062d0cc9da1b374f5b5984846e6c6
parentb3ed066d3a5a0d0708e14217bfa79aa90e58c365
[ARM] Fix PR85261: ICE with FPSCR setter builtin

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.

2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR target/85261
    * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
    into register.

    gcc/testsuite/
    PR target/85261
    * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
    into register.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259310 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arm/arm-builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/fpscr.c