Fix powerpc-power8.exp test with new mnemonics

Message ID b3dfe0fe11e7eb6585ee0b6753719fd15e2bc2ec.camel@us.ibm.com
State New
Headers show
Series
  • Fix powerpc-power8.exp test with new mnemonics
Related show

Commit Message

Luis Machado via Gdb-patches June 16, 2021, 8:07 p.m.
GDB maintainers:

The following patch updates the powerpc-power8.exp test to use the new
mnemonics. The test fixes two regression test failures.

The patch has been tested on Power 9.

Please let me know if the patch is acceptable for mainline.  Thanks.

               Carl Love

----------------------------------------
From 68da19def864aa7647b966a077daac59a44994c7 Mon Sep 17 00:00:00 2001
From: Carl Love <cel@us.ibm.com>

Date: Wed, 16 Jun 2021 14:51:46 -0500
Subject: [PATCH] Fix powerpc-power8.exp test with new mnemonics

Update the expected disassenbly results to the new extended mnemonics per
the following commit:

  commit 5a4037661bccd156d65093f1f0cf2cd43f31e9d9 Mon Sep 17 00:00:00 2001
  author: Alan Modra <amodra@gmail.com>
  Date: Thu, 25 Mar 2021 11:29:34 +1030

  opcodes/
        PR 27647
        * ppc-opc.c (XLOCB_MASK): Delete.
        (XLBOBB_MASK, XLBOBIBB_MASK, XLBOCBBB_MASK): Define using
        XLBH_MASK.
        (powerpc_opcodes): Accept a BH field on all extended forms of
        bclr, bclrl, bcctr, bcctrl, bctar, bctarl.
  gas/
        PR 27647
        * testsuite/gas/ppc/a2.d: Update expected output.
        * testsuite/gas/ppc/power8.d: Likewise.

gdb/ChangeLog
2021-06-16  Carl Love  <cel@us.ibm.com>

	* testsuite/gdb.arch/powerpc-power8.exp(bctar, bctarl): Update mnemonics
	to bgetar and bgetarl.
	* testsuite/gdb.arch/powerpc-power8.s((bctar, bctarl): Update comments
	for mnemonics to bgetar and bnstarl.
---
 gdb/testsuite/gdb.arch/powerpc-power8.exp | 4 ++--
 gdb/testsuite/gdb.arch/powerpc-power8.s   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.17.1

Comments

Luis Machado via Gdb-patches June 17, 2021, 3:15 p.m. | #1
On Wed, 2021-06-16 at 13:07 -0700, Carl Love via Gdb-patches wrote:
> GDB maintainers:

> 

> The following patch updates the powerpc-power8.exp test to use the new

> mnemonics. The test fixes two regression test failures.

> 

> The patch has been tested on Power 9.


Presumably this was also tested on power8.  

> 

> Please let me know if the patch is acceptable for mainline.  Thanks.

> 

>                Carl Love

> 

> ----------------------------------------

> From 68da19def864aa7647b966a077daac59a44994c7 Mon Sep 17 00:00:00 2001

> From: Carl Love <cel@us.ibm.com>

> Date: Wed, 16 Jun 2021 14:51:46 -0500

> Subject: [PATCH] Fix powerpc-power8.exp test with new mnemonics

> 

> Update the expected disassenbly results to the new extended mnemonics per

> the following commit:

> 

>   commit 5a4037661bccd156d65093f1f0cf2cd43f31e9d9 Mon Sep 17 00:00:00 2001

>   author: Alan Modra <amodra@gmail.com>

>   Date: Thu, 25 Mar 2021 11:29:34 +1030


This changelog could probably be dropped since it does not directly
apply to this patch.  I'll guess the referenced patch enabled the
extended mnemonics that are being generated now. 
So, I suggest
replacing with a comment in your description that indicates something
like (presumably) 'This updates the gdb tests to match the changes made
in binutils commit <foo> that enabled the extended bctar* mnemonics
bgetar,bnstarl. '


> 

>   opcodes/

>         PR 27647

>         * ppc-opc.c (XLOCB_MASK): Delete.

>         (XLBOBB_MASK, XLBOBIBB_MASK, XLBOCBBB_MASK): Define using

>         XLBH_MASK.

>         (powerpc_opcodes): Accept a BH field on all extended forms of

>         bclr, bclrl, bcctr, bcctrl, bctar, bctarl.

>   gas/

>         PR 27647

>         * testsuite/gas/ppc/a2.d: Update expected output.

>         * testsuite/gas/ppc/power8.d: Likewise.

> 

> gdb/ChangeLog

> 2021-06-16  Carl Love  <cel@us.ibm.com>

> 

> 	* testsuite/gdb.arch/powerpc-power8.exp(bctar, bctarl): Update mnemonics

> 	to bgetar and bgetarl.

> 	* testsuite/gdb.arch/powerpc-power8.s((bctar, bctarl): Update comments

> 	for mnemonics to bgetar and bnstarl.

> ---

>  gdb/testsuite/gdb.arch/powerpc-power8.exp | 4 ++--

>  gdb/testsuite/gdb.arch/powerpc-power8.s   | 4 ++--

>  2 files changed, 4 insertions(+), 4 deletions(-)

> 

> diff --git a/gdb/testsuite/gdb.arch/powerpc-power8.exp b/gdb/testsuite/gdb.arch/powerpc-power8.exp

> index 456531f9dfa..858939f6cf3 100644

> --- a/gdb/testsuite/gdb.arch/powerpc-power8.exp

> +++ b/gdb/testsuite/gdb.arch/powerpc-power8.exp

> @@ -82,8 +82,8 @@ func_check "bgttar  cr5"

>  func_check "bnstarl cr1"

>  func_check "blttar+ cr3"

>  func_check "bnetarl+"

> -func_check "bctar   4,4*cr2+lt,1"

> -func_check "bctarl  4,4*cr1+so,2"

> +func_check "bgetar  cr2,1"

> +func_check "bnstarl cr1,2"

>  func_check "waitasec"

>  func_check "msgsndp r8"

>  func_check "mtsle   1"

> diff --git a/gdb/testsuite/gdb.arch/powerpc-power8.s b/gdb/testsuite/gdb.arch/powerpc-power8.s

> index b69dd6e8315..65b92bda1ff 100644

> --- a/gdb/testsuite/gdb.arch/powerpc-power8.s

> +++ b/gdb/testsuite/gdb.arch/powerpc-power8.s

> @@ -39,8 +39,8 @@ func:

>  	.long  0x4c870461    /* bnstarl cr1                */

>  	.long  0x4dec0460    /* blttar+ cr3                */

>  	.long  0x4ce20461    /* bnetarl+                   */

> -	.long  0x4c880c60    /* bctar   4,4*cr2+lt,1       */

> -	.long  0x4c871461    /* bctarl  4,4*cr1+so,2       */

> +	.long  0x4c880c60    /* bgetar  cr2,1              */

> +	.long  0x4c871461    /* bnstarl cr1,2              */

>  	.long  0x7c00003c    /* waitasec                   */

>  	.long  0x7c00411c    /* msgsndp r8                 */

>  	.long  0x7c200126    /* mtsle   1                  */
Luis Machado via Gdb-patches June 17, 2021, 4:02 p.m. | #2
Will:

On Thu, 2021-06-17 at 10:15 -0500, will schmidt wrote:
> > The following patch updates the powerpc-power8.exp test to use the

> > new

> > mnemonics. The test fixes two regression test failures.

> > 

> > The patch has been tested on Power 9.

> 

> Presumably this was also tested on power8.  


Sorry, yes it was also tested on Power 8 and passes.  Sorry I missed
saying that.

                     Carl Love
Luis Machado via Gdb-patches June 17, 2021, 4:09 p.m. | #3
> Update the expected disassenbly results to the new extended mnemonics per

> the following commit:

> 

>   commit 5a4037661bccd156d65093f1f0cf2cd43f31e9d9 Mon Sep 17 00:00:00 2001

>   author: Alan Modra <amodra@gmail.com>

>   Date: Thu, 25 Mar 2021 11:29:34 +1030


Agree with Will's comments here.

> gdb/ChangeLog

> 2021-06-16  Carl Love  <cel@us.ibm.com>

> 

> 	* testsuite/gdb.arch/powerpc-power8.exp(bctar, bctarl): Update mnemonics

> 	to bgetar and bgetarl.

> 	* testsuite/gdb.arch/powerpc-power8.s((bctar, bctarl): Update comments

> 	for mnemonics to bgetar and bnstarl.


Changes in the test suite should go into the separate ChangeLog, so this should
read instead:

gdb/testsuite/ChangeLog
2021-06-16  Carl Love  <cel@us.ibm.com>

	* gdb.arch/powerpc-power8.exp(bctar, bctarl): Update mnemonics
 	to bgetar and bgetarl.
 	* gdb.arch/powerpc-power8.s((bctar, bctarl): Update comments
 	for mnemonics to bgetar and bnstarl.

Patch is OK with that change.

Thanks,
Ulrich
> 


-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com

Patch

diff --git a/gdb/testsuite/gdb.arch/powerpc-power8.exp b/gdb/testsuite/gdb.arch/powerpc-power8.exp
index 456531f9dfa..858939f6cf3 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power8.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power8.exp
@@ -82,8 +82,8 @@  func_check "bgttar  cr5"
 func_check "bnstarl cr1"
 func_check "blttar+ cr3"
 func_check "bnetarl+"
-func_check "bctar   4,4*cr2+lt,1"
-func_check "bctarl  4,4*cr1+so,2"
+func_check "bgetar  cr2,1"
+func_check "bnstarl cr1,2"
 func_check "waitasec"
 func_check "msgsndp r8"
 func_check "mtsle   1"
diff --git a/gdb/testsuite/gdb.arch/powerpc-power8.s b/gdb/testsuite/gdb.arch/powerpc-power8.s
index b69dd6e8315..65b92bda1ff 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power8.s
+++ b/gdb/testsuite/gdb.arch/powerpc-power8.s
@@ -39,8 +39,8 @@  func:
 	.long  0x4c870461    /* bnstarl cr1                */
 	.long  0x4dec0460    /* blttar+ cr3                */
 	.long  0x4ce20461    /* bnetarl+                   */
-	.long  0x4c880c60    /* bctar   4,4*cr2+lt,1       */
-	.long  0x4c871461    /* bctarl  4,4*cr1+so,2       */
+	.long  0x4c880c60    /* bgetar  cr2,1              */
+	.long  0x4c871461    /* bnstarl cr1,2              */
 	.long  0x7c00003c    /* waitasec                   */
 	.long  0x7c00411c    /* msgsndp r8                 */
 	.long  0x7c200126    /* mtsle   1                  */