]> git.ipfire.org Git - thirdparty/gcc.git/commit
s390: implement flags output
authorJuergen Christ <jchrist@linux.ibm.com>
Mon, 20 Nov 2023 08:13:10 +0000 (09:13 +0100)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 23 Nov 2023 14:32:17 +0000 (15:32 +0100)
commit466b100e5fee808d77598e0f294654deec281150
tree68392e0d1683a25422c10694ca4fc51603cbe4d7
parent111b5555c7a37f0bcf41c27363bbe8acbb6eb238
s390: implement flags output

Implement flags output for inline assemblies.  Only use one output constraint
that captures the whole condition code.  No breakout into different condition
codes is allowed.  Also, only one condition code variable is allowed.

Add further logic to canonicalize various cases where we combine different
cases of possible condition codes.

gcc/ChangeLog:

* config/s390/s390-c.cc (s390_cpu_cpp_builtins): Define
__GCC_ASM_FLAG_OUTPUTS__.
* config/s390/s390.cc (s390_canonicalize_comparison): More
UNSPEC_CC_TO_INT cases.
(s390_md_asm_adjust): Implement flags output.
* config/s390/s390.md (ccstore4): Allow mask operands.
* doc/extend.texi: Document flags output.

gcc/testsuite/ChangeLog:

* gcc.target/s390/ccor.c: New test.

Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
gcc/config/s390/s390-c.cc
gcc/config/s390/s390.cc
gcc/config/s390/s390.md
gcc/doc/extend.texi
gcc/testsuite/gcc.target/s390/ccor.c [new file with mode: 0644]