From: Bill Schmidt Date: Sun, 21 Jan 2018 13:26:07 +0000 (+0000) Subject: re PR target/83946 (Safe Indirect Jumps broken on AIX) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8f63c51104a1e97754dd6d4d9dcd49307b850aa;p=gcc.git re PR target/83946 (Safe Indirect Jumps broken on AIX) [gcc] 2018-01-21 Bill Schmidt David Edelsohn PR target/83946 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv): Change "crset eq" to "crset 2". (*call_value_indirect_nonlocal_sysv): Likewise. (*call_indirect_aix_nospec): Likewise. (*call_value_indirect_aix_nospec): Likewise. (*call_indirect_elfv2_nospec): Likewise. (*call_value_indirect_elfv2_nospec): Likewise. (*sibcall_nonlocal_sysv): Change "crset eq" to "crset 2"; change assembly output from . to $. (*sibcall_value_nonlocal_sysv): Likewise. (indirect_jump_nospec): Change assembly output from . to $. (*tablejump_internal1_nospec): Likewise. [gcc/testsuite] 2018-01-21 Bill Schmidt David Edelsohn PR target/83946 * gcc.target/powerpc/safe-indirect-jump-1.c: Change expected assembly output from "crset eq" to "crset 2". * gcc.target/powerpc/safe-indirect-jump-2.c: Change expected assembly output from . to $. * gcc.target/powerpc/safe-indirect-jump-3.c: Likewise. * gcc.target/powerpc/safe-indirect-jump-1.c: Change expected assembly output from "crset eq" to "crset 2". * gcc.target/powerpc/safe-indirect-jump-8.c: Change expected assembly output from "crset eq" to "crset 2", and from . to $. Co-Authored-By: David Edelsohn From-SVN: r256931 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 25c0d814be4..4d56c473e68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2018-01-21 Bill Schmidt + David Edelsohn + + PR target/83946 + * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv): + Change "crset eq" to "crset 2". + (*call_value_indirect_nonlocal_sysv): Likewise. + (*call_indirect_aix_nospec): Likewise. + (*call_value_indirect_aix_nospec): Likewise. + (*call_indirect_elfv2_nospec): Likewise. + (*call_value_indirect_elfv2_nospec): Likewise. + (*sibcall_nonlocal_sysv): Change "crset eq" to "crset 2"; + change assembly output from . to $. + (*sibcall_value_nonlocal_sysv): Likewise. + (indirect_jump_nospec): Change assembly output from . to $. + (*tablejump_internal1_nospec): Likewise. + 2018-01-21 Oleg Endo PR target/80870 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 4cef5bbc799..757ec38084d 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -10457,7 +10457,7 @@ || which_alternative == 1 || which_alternative == 3) return "b%T0l"; else - return "crset eq\;beq%T0l-"; + return "crset 2\;beq%T0l-"; } [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg") (set (attr "length") @@ -10570,7 +10570,7 @@ || which_alternative == 1 || which_alternative == 3) return "b%T1l"; else - return "crset eq\;beq%T1l-"; + return "crset 2\;beq%T1l-"; } [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg") (set (attr "length") @@ -10731,7 +10731,7 @@ (set (reg:P TOC_REGNUM) (unspec:P [(match_operand:P 3 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) (clobber (reg:P LR_REGNO))] "DEFAULT_ABI == ABI_AIX && !rs6000_speculate_indirect_jumps" - "crset eq\; 2,%2\;beq%T0l-\; 2,%3(1)" + "crset 2\; 2,%2\;beq%T0l-\; 2,%3(1)" [(set_attr "type" "jmpreg") (set_attr "length" "16")]) @@ -10755,7 +10755,7 @@ (set (reg:P TOC_REGNUM) (unspec:P [(match_operand:P 4 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) (clobber (reg:P LR_REGNO))] "DEFAULT_ABI == ABI_AIX && !rs6000_speculate_indirect_jumps" - "crset eq\; 2,%3\;beq%T1l-\; 2,%4(1)" + "crset 2\; 2,%3\;beq%T1l-\; 2,%4(1)" [(set_attr "type" "jmpreg") (set_attr "length" "16")]) @@ -10780,7 +10780,7 @@ (set (reg:P TOC_REGNUM) (unspec:P [(match_operand:P 2 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) (clobber (reg:P LR_REGNO))] "DEFAULT_ABI == ABI_ELFv2 && !rs6000_speculate_indirect_jumps" - "crset eq\;beq%T0l-\; 2,%2(1)" + "crset 2\;beq%T0l-\; 2,%2(1)" [(set_attr "type" "jmpreg") (set_attr "length" "12")]) @@ -10803,7 +10803,7 @@ (set (reg:P TOC_REGNUM) (unspec:P [(match_operand:P 3 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) (clobber (reg:P LR_REGNO))] "DEFAULT_ABI == ABI_ELFv2 && !rs6000_speculate_indirect_jumps" - "crset eq\;beq%T1l-\; 2,%3(1)" + "crset 2\;beq%T1l-\; 2,%3(1)" [(set_attr "type" "jmpreg") (set_attr "length" "12")]) @@ -10987,7 +10987,7 @@ return \"b%T0\"; else /* Can use CR0 since it is volatile across sibcalls. */ - return \"crset eq\;beq%T0-\;b .\"; + return \"crset 2\;beq%T0-\;b $\"; } else if (DEFAULT_ABI == ABI_V4 && flag_pic) { @@ -11044,7 +11044,7 @@ return \"b%T1\"; else /* Can use CR0 since it is volatile across sibcalls. */ - return \"crset eq\;beq%T1-\;b .\"; + return \"crset 2\;beq%T1-\;b $\"; } else if (DEFAULT_ABI == ABI_V4 && flag_pic) { @@ -12566,7 +12566,7 @@ [(set (pc) (match_operand:P 0 "register_operand" "c,*l")) (clobber (match_operand:CC 1 "cc_reg_operand" "=y,y"))] "!rs6000_speculate_indirect_jumps" - "crset %E1\;beq%T0- %1\;b ." + "crset %E1\;beq%T0- %1\;b $" [(set_attr "type" "jmpreg") (set_attr "length" "12")]) @@ -12672,7 +12672,7 @@ (use (label_ref (match_operand 1))) (clobber (match_operand:CC 2 "cc_reg_operand" "=y,y"))] "!rs6000_speculate_indirect_jumps" - "crset %E2\;beq%T0- %2\;b ." + "crset %E2\;beq%T0- %2\;b $" [(set_attr "type" "jmpreg") (set_attr "length" "12")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eb68dde3307..7bde92d90e9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2018-01-21 Bill Schmidt + David Edelsohn + + PR target/83946 + * gcc.target/powerpc/safe-indirect-jump-1.c: Change expected + assembly output from "crset eq" to "crset 2". + * gcc.target/powerpc/safe-indirect-jump-2.c: Change expected + assembly output from . to $. + * gcc.target/powerpc/safe-indirect-jump-3.c: Likewise. + * gcc.target/powerpc/safe-indirect-jump-1.c: Change expected + assembly output from "crset eq" to "crset 2". + * gcc.target/powerpc/safe-indirect-jump-8.c: Change expected + assembly output from "crset eq" to "crset 2", and from . to $. + 2018-01-20 Steven G. Kargl PR fortran/83900 diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c index d66e9c3cdb9..99cfab29e6e 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c @@ -10,5 +10,5 @@ int bar () return (*f) (); } -/* { dg-final { scan-assembler "crset eq" } } */ +/* { dg-final { scan-assembler "crset 2" } } */ /* { dg-final { scan-assembler "beqctrl-" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c index b51034fa1b0..1c23a5d9add 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c @@ -30,4 +30,4 @@ int foo (int x) /* { dg-final { scan-assembler "crset 30" } } */ /* { dg-final { scan-assembler "beqctr- 7" } } */ -/* { dg-final { scan-assembler "b ." } } */ +/* { dg-final { scan-assembler {b \$} } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c index 81da127cc17..d0eccc4f262 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c @@ -49,4 +49,4 @@ int foo (int x) /* { dg-final { scan-assembler "crset 30" } } */ /* { dg-final { scan-assembler "beqctr- 7" } } */ -/* { dg-final { scan-assembler "b ." } } */ +/* { dg-final { scan-assembler {b \$} } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c index d19245e34c4..b1bdcca8524 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c @@ -10,5 +10,5 @@ int bar () return (*f) () * 53; } -/* { dg-final { scan-assembler "crset eq" } } */ +/* { dg-final { scan-assembler "crset 2" } } */ /* { dg-final { scan-assembler "beqctrl-" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c index be2150e0c14..27642cc4450 100644 --- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c +++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c @@ -10,6 +10,6 @@ int bar () return (*f) (); } -/* { dg-final { scan-assembler "crset eq" } } */ +/* { dg-final { scan-assembler "crset 2" } } */ /* { dg-final { scan-assembler "beqctr-" } } */ -/* { dg-final { scan-assembler "b ." } } */ +/* { dg-final { scan-assembler {b \$} } } */