From cb50b0722c08b50f9693d7722426bdd0275d3841 Mon Sep 17 00:00:00 2001 From: Carl Love Date: Tue, 7 Jun 2022 17:26:34 -0500 Subject: [PATCH] Fix gdb.arch/powerpc-power7.exp isel disassembly output. The following commit changes the output format for the isel instruction on PowerPC. commit dd4832bf3efc1bd1797a6b9188260692b8b0db52 Introduces error in test Author: Dmitry Selyutin Date: Tue May 24 13:46:35 2022 +0000 opcodes: introduce BC field; fix isel Per Power ISA Version 3.1B 3.3.12, isel uses BC field rather than CRB field present in binutils sources. Also, per 1.6.2, BC has the same semantics as BA and BB fields, so this should keep the same flags and mask, only with the different offset. opcodes/ * ppc-opc.c (BC): Define new field, with the same definition as CRB field, but with the PPC_OPERAND_CR_BIT flag present. gas/ * testsuite/gas/ppc/476.d: Update. * testsuite/gas/ppc/a2.d: Update. * testsuite/gas/ppc/e500.d: Update. * testsuite/gas/ppc/power7.d: Update. --- a/gas/testsuite/gas/ppc/476.d +++ b/gas/testsuite/gas/ppc/476.d @@ -209,7 +209,7 @@ Disassembly of section \.text: .*: (7c 20 07 8c|8c 07 20 7c) ici 1 .*: (7c 03 27 cc|cc 27 03 7c) icread r3,r4 .*: (50 83 65 36|36 65 83 50) rlwimi r3,r4,12,20,27 -.*: (7c 43 27 1e|1e 27 43 7c) isel r2,r3,r4,28 +.*: (7c 43 27 1e|1e 27 43 7c) isel r2,r3,r4,4\*cr7\+lt The above change breaks the gdb regression test gdb.arch/powerpc-power7.exp on Power 7, Power 8, Power 9 and Power 10. This patch updates the regression test gdb.arch/powerpc-power7.exp with the new expected output for the isel instruction. The patch has been tested on Power 7 and Power 10 to verify the patch fixes the test. --- gdb/testsuite/gdb.arch/powerpc-power7.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.arch/powerpc-power7.exp b/gdb/testsuite/gdb.arch/powerpc-power7.exp index f2f4525cd6e..10f7eebefc9 100644 --- a/gdb/testsuite/gdb.arch/powerpc-power7.exp +++ b/gdb/testsuite/gdb.arch/powerpc-power7.exp @@ -140,7 +140,7 @@ func_check "frsqrte f14,f15" func_check "frsqrte. f14,f15" func_check "frsqrtes f14,f15" func_check "frsqrtes. f14,f15" -func_check "isel r2,r3,r4,28" +func_check "isel r2,r3,r4,4*cr7+lt" func_check "yield" func_check "ori r2,r2,0" func_check "nop" -- 2.30.2