[v3,rs6000] Use $ instead of . for PC, use "crset 2" instead of "crset eq"

Message ID c6e4f4c2-8429-a5a7-205e-d1c9cacd486b@linux.vnet.ibm.com
State New
Headers show
Series
  • [v3,rs6000] Use $ instead of . for PC, use "crset 2" instead of "crset eq"
Related show

Commit Message

Bill Schmidt Jan. 20, 2018, 4:48 a.m.
Hi,

Here's another version of this patch incorporating the late-breaking news
that the AIX assembler doesn't comprehend the "eq" symbol.  Same as 
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01787.html but adding the
change to use "crset 2" instead.

This one is still regstrapping on BE/LE, trunk/7.  If these all complete
successfully, is this okay for trunk and backport?

Thanks,
Bill


[gcc]

2018-01-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
	    David Edelsohn <dje.gcc@gmail.com>

	PR target/83946
	* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
	Change "crset eq" to "crset 2".
	(*call_value_indirect_nonlocal_sysv<mode>): Likewise.
	(*call_indirect_aix<mode>_nospec): Likewise.
	(*call_value_indirect_aix<mode>_nospec): Likewise.
	(*call_indirect_elfv2<mode>_nospec): Likewise.
	(*call_value_indirect_elfv2<mode>_nospec): Likewise.
	(*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
	change assembly output from . to $.
	(*sibcall_value_nonlocal_sysv<mode>): Likewise.
	(indirect_jump<mode>_nospec): Change assembly output from . to $.
	(*tablejump<mode>_internal1_nospec): Likewise.

[gcc/testsuite]

2018-01-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
	    David Edelsohn <dje.gcc@gmail.com>

	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 $.

Comments

Bill Schmidt Jan. 20, 2018, 12:55 p.m. | #1
On Jan 19, 2018, at 10:48 PM, Bill Schmidt <wschmidt@linux.vnet.ibm.com> wrote:
> 

> Hi,

> 

> Here's another version of this patch incorporating the late-breaking news

> that the AIX assembler doesn't comprehend the "eq" symbol.  Same as 

> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01787.html but adding the

> change to use "crset 2" instead.

> 

> This one is still regstrapping on BE/LE, trunk/7.  If these all complete

> successfully, is this okay for trunk and backport?


All testing has passed successfully.

Bill
> 

> Thanks,

> Bill

> 

> 

> [gcc]

> 

> 2018-01-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

> 	    David Edelsohn <dje.gcc@gmail.com>

> 

> 	PR target/83946

> 	* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):

> 	Change "crset eq" to "crset 2".

> 	(*call_value_indirect_nonlocal_sysv<mode>): Likewise.

> 	(*call_indirect_aix<mode>_nospec): Likewise.

> 	(*call_value_indirect_aix<mode>_nospec): Likewise.

> 	(*call_indirect_elfv2<mode>_nospec): Likewise.

> 	(*call_value_indirect_elfv2<mode>_nospec): Likewise.

> 	(*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";

> 	change assembly output from . to $.

> 	(*sibcall_value_nonlocal_sysv<mode>): Likewise.

> 	(indirect_jump<mode>_nospec): Change assembly output from . to $.

> 	(*tablejump<mode>_internal1_nospec): Likewise.

> 

> [gcc/testsuite]

> 

> 2018-01-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

> 	    David Edelsohn <dje.gcc@gmail.com>

> 

> 	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 $.

> 

> 

> Index: gcc/config/rs6000/rs6000.md

> ===================================================================

> --- gcc/config/rs6000/rs6000.md	(revision 256894)

> +++ gcc/config/rs6000/rs6000.md	(working copy)

> @@ -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\;<ptrload> 2,%2\;beq%T0l-\;<ptrload> 2,%3(1)"

> +  "crset 2\;<ptrload> 2,%2\;beq%T0l-\;<ptrload> 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\;<ptrload> 2,%3\;beq%T1l-\;<ptrload> 2,%4(1)"

> +  "crset 2\;<ptrload> 2,%3\;beq%T1l-\;<ptrload> 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-\;<ptrload> 2,%2(1)"

> +  "crset 2\;beq%T0l-\;<ptrload> 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-\;<ptrload> 2,%3(1)"

> +  "crset 2\;beq%T1l-\;<ptrload> 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")])

> 

> Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c

> ===================================================================

> --- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c	(revision 256894)

> +++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c	(working copy)

> @@ -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-" } } */

> Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c

> ===================================================================

> --- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c	(revision 256894)

> +++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c	(working copy)

> @@ -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 \$} } } */

> Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c

> ===================================================================

> --- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c	(revision 256894)

> +++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c	(working copy)

> @@ -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 \$} } } */

> Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c

> ===================================================================

> --- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c	(revision 256894)

> +++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c	(working copy)

> @@ -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-" } } */

> Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c

> ===================================================================

> --- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c	(revision 256894)

> +++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c	(working copy)

> @@ -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 \$} } } */

>
Segher Boessenkool Jan. 20, 2018, 1:12 p.m. | #2
Hi Bill,

On Fri, Jan 19, 2018 at 10:48:18PM -0600, Bill Schmidt wrote:
> Here's another version of this patch incorporating the late-breaking news

> that the AIX assembler doesn't comprehend the "eq" symbol.  Same as 

> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01787.html but adding the

> change to use "crset 2" instead.

> 

> This one is still regstrapping on BE/LE, trunk/7.  If these all complete

> successfully, is this okay for trunk and backport?


This looks fine.  Okay for trunk if it also works on AIX.  For 7 you
need RM approval (no objections from me).

Thanks!


Segher


> 2018-01-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

> 	    David Edelsohn <dje.gcc@gmail.com>

> 

> 	PR target/83946

> 	* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):

> 	Change "crset eq" to "crset 2".

> 	(*call_value_indirect_nonlocal_sysv<mode>): Likewise.

> 	(*call_indirect_aix<mode>_nospec): Likewise.

> 	(*call_value_indirect_aix<mode>_nospec): Likewise.

> 	(*call_indirect_elfv2<mode>_nospec): Likewise.

> 	(*call_value_indirect_elfv2<mode>_nospec): Likewise.

> 	(*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";

> 	change assembly output from . to $.

> 	(*sibcall_value_nonlocal_sysv<mode>): Likewise.

> 	(indirect_jump<mode>_nospec): Change assembly output from . to $.

> 	(*tablejump<mode>_internal1_nospec): Likewise.

> 

> [gcc/testsuite]

> 

> 2018-01-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

> 	    David Edelsohn <dje.gcc@gmail.com>

> 

> 	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 $.
Bill Schmidt Jan. 20, 2018, 1:14 p.m. | #3
On Jan 20, 2018, at 7:12 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> 

> Hi Bill,

> 

> On Fri, Jan 19, 2018 at 10:48:18PM -0600, Bill Schmidt wrote:

>> Here's another version of this patch incorporating the late-breaking news

>> that the AIX assembler doesn't comprehend the "eq" symbol.  Same as 

>> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01787.html but adding the

>> change to use "crset 2" instead.

>> 

>> This one is still regstrapping on BE/LE, trunk/7.  If these all complete

>> successfully, is this okay for trunk and backport?

> 

> This looks fine.  Okay for trunk if it also works on AIX.  For 7 you

> need RM approval (no objections from me).


Thanks, would appreciate David testing on AIX as I have never managed
to get that working in the past.  Adding RMs to CC for 7 approval.

Thanks,
Bill
> 

> Thanks!

> 

> 

> Segher

> 

> 

>> 2018-01-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

>> 	    David Edelsohn <dje.gcc@gmail.com>

>> 

>> 	PR target/83946

>> 	* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):

>> 	Change "crset eq" to "crset 2".

>> 	(*call_value_indirect_nonlocal_sysv<mode>): Likewise.

>> 	(*call_indirect_aix<mode>_nospec): Likewise.

>> 	(*call_value_indirect_aix<mode>_nospec): Likewise.

>> 	(*call_indirect_elfv2<mode>_nospec): Likewise.

>> 	(*call_value_indirect_elfv2<mode>_nospec): Likewise.

>> 	(*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";

>> 	change assembly output from . to $.

>> 	(*sibcall_value_nonlocal_sysv<mode>): Likewise.

>> 	(indirect_jump<mode>_nospec): Change assembly output from . to $.

>> 	(*tablejump<mode>_internal1_nospec): Likewise.

>> 

>> [gcc/testsuite]

>> 

>> 2018-01-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

>> 	    David Edelsohn <dje.gcc@gmail.com>

>> 

>> 	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 $.

>
Jakub Jelinek Jan. 20, 2018, 1:16 p.m. | #4
On Sat, Jan 20, 2018 at 07:14:56AM -0600, Bill Schmidt wrote:
> On Jan 20, 2018, at 7:12 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:

> > 

> > Hi Bill,

> > 

> > On Fri, Jan 19, 2018 at 10:48:18PM -0600, Bill Schmidt wrote:

> >> Here's another version of this patch incorporating the late-breaking news

> >> that the AIX assembler doesn't comprehend the "eq" symbol.  Same as 

> >> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01787.html but adding the

> >> change to use "crset 2" instead.

> >> 

> >> This one is still regstrapping on BE/LE, trunk/7.  If these all complete

> >> successfully, is this okay for trunk and backport?

> > 

> > This looks fine.  Okay for trunk if it also works on AIX.  For 7 you

> > need RM approval (no objections from me).

> 

> Thanks, would appreciate David testing on AIX as I have never managed

> to get that working in the past.  Adding RMs to CC for 7 approval.


Ok for 7.3.

	Jakub

Patch

Index: gcc/config/rs6000/rs6000.md
===================================================================
--- gcc/config/rs6000/rs6000.md	(revision 256894)
+++ gcc/config/rs6000/rs6000.md	(working copy)
@@ -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\;<ptrload> 2,%2\;beq%T0l-\;<ptrload> 2,%3(1)"
+  "crset 2\;<ptrload> 2,%2\;beq%T0l-\;<ptrload> 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\;<ptrload> 2,%3\;beq%T1l-\;<ptrload> 2,%4(1)"
+  "crset 2\;<ptrload> 2,%3\;beq%T1l-\;<ptrload> 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-\;<ptrload> 2,%2(1)"
+  "crset 2\;beq%T0l-\;<ptrload> 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-\;<ptrload> 2,%3(1)"
+  "crset 2\;beq%T1l-\;<ptrload> 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")])
 
Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c	(revision 256894)
+++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c	(working copy)
@@ -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-" } } */
Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c	(revision 256894)
+++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c	(working copy)
@@ -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 \$} } } */
Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c	(revision 256894)
+++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c	(working copy)
@@ -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 \$} } } */
Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c	(revision 256894)
+++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-7.c	(working copy)
@@ -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-" } } */
Index: gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c	(revision 256894)
+++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-8.c	(working copy)
@@ -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 \$} } } */