I've put the implementation into config/arm/aarch-common.c, so that it can be shared between the two targets. This required a little bit of cleanup to the CC modes and constraints to get the two targets to match up.
I really should have done more than just x86 years ago, so that it would be done now and I could just use it in the kernel... ;-) r~ Richard Henderson (6): aarch64: Add "c" constraint arm: Fix the "c" constraint arm: Rename CC_NOOVmode to CC_NZmode arm, aarch64: Add support for __GCC_ASM_FLAG_OUTPUTS__ arm: Add testsuite checks for asm-flag aarch64: Add testsuite checks for asm-flag gcc/config/arm/aarch-common-protos.h | 6 + gcc/config/aarch64/aarch64-c.c | 2 + gcc/config/aarch64/aarch64.c | 3 + gcc/config/arm/aarch-common.c | 131 ++++++++++++ gcc/config/arm/arm-c.c | 1 + gcc/config/arm/arm.c | 15 +- gcc/testsuite/gcc.target/aarch64/asm-flag-1.c | 34 ++++ gcc/testsuite/gcc.target/aarch64/asm-flag-3.c | 36 ++++ gcc/testsuite/gcc.target/aarch64/asm-flag-5.c | 30 +++ gcc/testsuite/gcc.target/aarch64/asm-flag-6.c | 43 ++++ gcc/testsuite/gcc.target/arm/asm-flag-1.c | 35 ++++ gcc/testsuite/gcc.target/arm/asm-flag-3.c | 36 ++++ gcc/testsuite/gcc.target/arm/asm-flag-5.c | 30 +++ gcc/testsuite/gcc.target/arm/asm-flag-6.c | 43 ++++ gcc/config/aarch64/constraints.md | 4 + gcc/config/arm/arm-modes.def | 4 +- gcc/config/arm/arm.md | 186 +++++++++--------- gcc/config/arm/constraints.md | 5 +- gcc/config/arm/predicates.md | 2 +- gcc/config/arm/thumb1.md | 8 +- gcc/config/arm/thumb2.md | 34 ++-- gcc/doc/extend.texi | 33 ++++ 22 files changed, 596 insertions(+), 125 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/asm-flag-1.c create mode 100644 gcc/testsuite/gcc.target/aarch64/asm-flag-3.c create mode 100644 gcc/testsuite/gcc.target/aarch64/asm-flag-5.c create mode 100644 gcc/testsuite/gcc.target/aarch64/asm-flag-6.c create mode 100644 gcc/testsuite/gcc.target/arm/asm-flag-1.c create mode 100644 gcc/testsuite/gcc.target/arm/asm-flag-3.c create mode 100644 gcc/testsuite/gcc.target/arm/asm-flag-5.c create mode 100644 gcc/testsuite/gcc.target/arm/asm-flag-6.c -- 2.17.1