IBM Z: Handle hard registers in s390_md_asm_adjust()
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 26 Apr 2021 12:12:08 +0000 (14:12 +0200)
committerIlya Leoshkevich <iii@linux.ibm.com>
Mon, 3 May 2021 10:34:55 +0000 (12:34 +0200)
commit4f48c335d36674f90046b2823f0ac1c0545dc082
tree8d6060f2619e402e06814f13b5eac163ff833219
parent80bbb7ff83d81544b09820428bdd7db9f50fe362
IBM Z: Handle hard registers in s390_md_asm_adjust()

gen_fprx2_to_tf() and gen_tf_to_fprx2() cannot handle hard registers,
since the subregs they create do not pass validation.  Change
s390_md_asm_adjust() to manually copy between hard VRs and FPRs instead
of using these two functions.

gcc/ChangeLog:

PR target/100217
* config/s390/s390.c (s390_hard_fp_reg_p): New function.
(s390_md_asm_adjust): Handle hard registers.

gcc/testsuite/ChangeLog:

PR target/100217
* gcc.target/s390/vector/long-double-asm-in-out-hard-fp-reg.c: New test.
* gcc.target/s390/vector/long-double-asm-inout-hard-fp-reg.c: New test.
gcc/config/s390/s390.c
gcc/testsuite/gcc.target/s390/vector/long-double-asm-in-out-hard-fp-reg.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/vector/long-double-asm-inout-hard-fp-reg.c [new file with mode: 0644]