arm: Fixes for asm-flags vs thumb1 and ilp32
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 19 Nov 2019 13:14:20 +0000 (13:14 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 19 Nov 2019 13:14:20 +0000 (05:14 -0800)
commit35ba842f23769782d1b12f31aa2cdfce70ece031
tree1fe9113dde8e1c6c19097c649c50b8133605d7d1
parent5ecaaf98dc6678fab9607822ec083830c536eb68
arm: Fixes for asm-flags vs thumb1 and ilp32

Thumb1 cannot support asm-flags currently, because we don't expose the
flags register to the compiler.  Disable the support for that case.

Adjust the asm-flag-6 test for aarch64 ilp32 correctness.

gcc/
* config/arm/arm-c.c (arm_cpu_builtins): Use def_or_undef_macro
to define __GCC_ASM_FLAG_OUTPUTS__.
* config/arm/arm.c (thumb1_md_asm_adjust): New function.
(arm_option_params_internal): Swap out targetm.md_asm_adjust
depending on TARGET_THUMB1.
* doc/extend.texi (FlagOutputOperands): Document thumb1 restriction.

gcc/testsuite/
* testsuite/gcc.target/arm/asm-flag-3.c: Skip for thumb1.
* testsuite/gcc.target/arm/asm-flag-5.c: Likewise.
* testsuite/gcc.target/arm/asm-flag-6.c: Likewise.
* testsuite/gcc.target/arm/asm-flag-4.c: New test.

* testsuite/gcc.target/aarch64/asm-flag-6.c: Use %w for
asm inputs to cmp instruction for ILP32.

From-SVN: r278443
gcc/ChangeLog
gcc/config/arm/arm-c.c
gcc/config/arm/arm.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/asm-flag-6.c
gcc/testsuite/gcc.target/arm/asm-flag-1.c
gcc/testsuite/gcc.target/arm/asm-flag-3.c
gcc/testsuite/gcc.target/arm/asm-flag-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/asm-flag-5.c
gcc/testsuite/gcc.target/arm/asm-flag-6.c