aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-powerpc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-03-16 09:59:07 +1030
committerAlan Modra <amodra@gmail.com>2022-03-16 09:59:07 +1030
commit42952a9605b00e4b1d6514de9b30e56d4dcb8bbe (patch)
tree75c8dfbfc16defe8b00e99366c272fff18b62ed0 /ld/testsuite/ld-powerpc
parent8f50b4b574b9f34c4f23ce6d6508f72e9c2f5a59 (diff)
downloadgdb-42952a9605b00e4b1d6514de9b30e56d4dcb8bbe.zip
gdb-42952a9605b00e4b1d6514de9b30e56d4dcb8bbe.tar.gz
gdb-42952a9605b00e4b1d6514de9b30e56d4dcb8bbe.tar.bz2
PowerPC64 extended instructions in powerpc_macros
The extended instructions implemented in powerpc_macros aren't used by the disassembler. That means instructions like "sldi r3,r3,2" appear in disassembly as "rldicr r3,r3,2,61", which is annoying since many other extended instructions are shown. Note that some of the instructions moved out of the macro table to the opcode table won't appear in disassembly, because they are aliases rather than a subset of the underlying raw instruction. If enabled, rotrdi, extrdi, extldi, clrlsldi, and insrdi would replace all occurrences of rotldi, rldicl, rldicr, rldic and rldimi. (Or many occurrences in the case of clrlsldi if n <= b was added to the extract functions.) The patch also fixes a small bug in opcode sanity checking. include/ * opcode/ppc.h (PPC_OPSHIFT_SH6): Define. opcodes/ * ppc-opc.c (insert_erdn, extract_erdn, insert_eldn, extract_eldn), (insert_crdn, extract_crdn, insert_rrdn, extract_rrdn), (insert_sldn, extract_sldn, insert_srdn, extract_srdn), (insert_erdb, extract_erdb, insert_csldn, extract_csldb), (insert_irdb, extract_irdn): New functions. (ELDn, ERDn, ERDn, RRDn, SRDn, ERDb, CSLDn, CSLDb, IRDn, IRDb): Define and add associated powerpc_operands entries. (powerpc_opcodes): Add "rotrdi", "srdi", "extrdi", "clrrdi", "sldi", "extldi", "clrlsldi", "insrdi" and corresponding record (ie. dot suffix) forms. (powerpc_macros): Delete same from here. gas/ * config/tc-ppc.c (insn_validate): Don't modify value passed to operand->insert for PPC_OPERAND_PLUS1 when calculating mask. Handle PPC_OPSHIFT_SH6. * testsuite/gas/ppc/prefix-reloc.d: Update. * testsuite/gas/ppc/simpshft.d: Update. ld/ * testsuite/ld-powerpc/elfv2so.d: Update. * testsuite/ld-powerpc/notoc.d: Update. * testsuite/ld-powerpc/notoc3.d: Update. * testsuite/ld-powerpc/tlsdesc2.d: Update. * testsuite/ld-powerpc/tlsget.d: Update. * testsuite/ld-powerpc/tlsget2.d: Update. * testsuite/ld-powerpc/tlsopt5.d: Update. * testsuite/ld-powerpc/tlsopt6.d: Update.
Diffstat (limited to 'ld/testsuite/ld-powerpc')
-rw-r--r--ld/testsuite/ld-powerpc/elfv2so.d2
-rw-r--r--ld/testsuite/ld-powerpc/notoc.d2
-rw-r--r--ld/testsuite/ld-powerpc/notoc3.d2
-rw-r--r--ld/testsuite/ld-powerpc/tlsdesc2.d2
-rw-r--r--ld/testsuite/ld-powerpc/tlsget.d2
-rw-r--r--ld/testsuite/ld-powerpc/tlsget2.d2
-rw-r--r--ld/testsuite/ld-powerpc/tlsopt5.d2
-rw-r--r--ld/testsuite/ld-powerpc/tlsopt6.d2
8 files changed, 8 insertions, 8 deletions
diff --git a/ld/testsuite/ld-powerpc/elfv2so.d b/ld/testsuite/ld-powerpc/elfv2so.d
index 4018f05..0005710 100644
--- a/ld/testsuite/ld-powerpc/elfv2so.d
+++ b/ld/testsuite/ld-powerpc/elfv2so.d
@@ -80,7 +80,7 @@ Disassembly of section \.text:
.*: (7d 60 5a 14|14 5a 60 7d) add r11,r0,r11
.*: (38 0c ff d4|d4 ff 0c 38) addi r0,r12,-44
.*: (e9 8b 00 00|00 00 8b e9) ld r12,0\(r11\)
-.*: (78 00 f0 82|82 f0 00 78) rldicl r0,r0,62,2
+.*: (78 00 f0 82|82 f0 00 78) srdi r0,r0,2
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
.*: (e9 6b 00 08|08 00 6b e9) ld r11,8\(r11\)
.*: (4e 80 04 20|20 04 80 4e) bctr
diff --git a/ld/testsuite/ld-powerpc/notoc.d b/ld/testsuite/ld-powerpc/notoc.d
index 3555be7..69f1721 100644
--- a/ld/testsuite/ld-powerpc/notoc.d
+++ b/ld/testsuite/ld-powerpc/notoc.d
@@ -23,7 +23,7 @@ Disassembly of section \.text:
.*: (a6 03 88 7d|7d 88 03 a6) mtlr r12
.*: (ff 7f 80 3d|3d 80 7f ff) lis r12,32767
.*: (ff ff 8c 61|61 8c ff ff) ori r12,r12,65535
-.*: (c6 07 9c 79|79 9c 07 c6) rldicr r28,r12,32,31
+.*: (c6 07 9c 79|79 9c 07 c6) sldi r28,r12,32
.*: (ff ef 8c 65|65 8c ef ff) oris r12,r12,61439
.*: (28 ff 8c 61|61 8c ff 28) ori r12,r12,65320
.*: (14 62 8b 7d|7d 8b 62 14) add r12,r11,r12
diff --git a/ld/testsuite/ld-powerpc/notoc3.d b/ld/testsuite/ld-powerpc/notoc3.d
index 134bba3..24cf9bb 100644
--- a/ld/testsuite/ld-powerpc/notoc3.d
+++ b/ld/testsuite/ld-powerpc/notoc3.d
@@ -20,7 +20,7 @@ Disassembly of section \.text:
.*: (00 00 6b 61|61 6b 00 00) ori r11,r11,0
.*: (ff ef 13 06|06 13 ef ff) pla r12,-268435736 # 0
.*: (e8 fe 80 39|39 80 fe e8)
-.*: (46 17 6b 79|79 6b 17 46) rldicr r11,r11,34,29
+.*: (46 17 6b 79|79 6b 17 46) sldi r11,r11,34
.*: (14 62 8b 7d|7d 8b 62 14) add r12,r11,r12
.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12
.*: (20 04 80 4e|4e 80 04 20) bctr
diff --git a/ld/testsuite/ld-powerpc/tlsdesc2.d b/ld/testsuite/ld-powerpc/tlsdesc2.d
index c271c94..cd2663a 100644
--- a/ld/testsuite/ld-powerpc/tlsdesc2.d
+++ b/ld/testsuite/ld-powerpc/tlsdesc2.d
@@ -59,7 +59,7 @@ Disassembly of section \.text:
.*: (7d 60 5a 14|14 5a 60 7d) add r11,r0,r11
.*: (38 0c ff d4|d4 ff 0c 38) addi r0,r12,-44
.*: (e9 8b 00 00|00 00 8b e9) ld r12,0\(r11\)
-.*: (78 00 f0 82|82 f0 00 78) rldicl r0,r0,62,2
+.*: (78 00 f0 82|82 f0 00 78) srdi r0,r0,2
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
.*: (e9 6b 00 08|08 00 6b e9) ld r11,8\(r11\)
.*: (4e 80 04 20|20 04 80 4e) bctr
diff --git a/ld/testsuite/ld-powerpc/tlsget.d b/ld/testsuite/ld-powerpc/tlsget.d
index f419fca..f16febc 100644
--- a/ld/testsuite/ld-powerpc/tlsget.d
+++ b/ld/testsuite/ld-powerpc/tlsget.d
@@ -80,7 +80,7 @@ Disassembly of section \.text:
.*: (7d 60 5a 14|14 5a 60 7d) add r11,r0,r11
.*: (38 0c ff d4|d4 ff 0c 38) addi r0,r12,-44
.*: (e9 8b 00 00|00 00 8b e9) ld r12,0\(r11\)
-.*: (78 00 f0 82|82 f0 00 78) rldicl r0,r0,62,2
+.*: (78 00 f0 82|82 f0 00 78) srdi r0,r0,2
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
.*: (e9 6b 00 08|08 00 6b e9) ld r11,8\(r11\)
.*: (4e 80 04 20|20 04 80 4e) bctr
diff --git a/ld/testsuite/ld-powerpc/tlsget2.d b/ld/testsuite/ld-powerpc/tlsget2.d
index 13dc64b..910e048 100644
--- a/ld/testsuite/ld-powerpc/tlsget2.d
+++ b/ld/testsuite/ld-powerpc/tlsget2.d
@@ -67,7 +67,7 @@ Disassembly of section \.text:
.*: (7d 60 5a 14|14 5a 60 7d) add r11,r0,r11
.*: (38 0c ff d4|d4 ff 0c 38) addi r0,r12,-44
.*: (e9 8b 00 00|00 00 8b e9) ld r12,0\(r11\)
-.*: (78 00 f0 82|82 f0 00 78) rldicl r0,r0,62,2
+.*: (78 00 f0 82|82 f0 00 78) srdi r0,r0,2
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
.*: (e9 6b 00 08|08 00 6b e9) ld r11,8\(r11\)
.*: (4e 80 04 20|20 04 80 4e) bctr
diff --git a/ld/testsuite/ld-powerpc/tlsopt5.d b/ld/testsuite/ld-powerpc/tlsopt5.d
index efd6deb..2ea1f7f 100644
--- a/ld/testsuite/ld-powerpc/tlsopt5.d
+++ b/ld/testsuite/ld-powerpc/tlsopt5.d
@@ -55,7 +55,7 @@ Disassembly of section \.text:
.*: (14 5a 60 7d|7d 60 5a 14) add r11,r0,r11
.*: (d4 ff 0c 38|38 0c ff d4) addi r0,r12,-44
.*: (00 00 8b e9|e9 8b 00 00) ld r12,0\(r11\)
-.*: (82 f0 00 78|78 00 f0 82) rldicl r0,r0,62,2
+.*: (82 f0 00 78|78 00 f0 82) srdi r0,r0,2
.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12
.*: (08 00 6b e9|e9 6b 00 08) ld r11,8\(r11\)
.*: (20 04 80 4e|4e 80 04 20) bctr
diff --git a/ld/testsuite/ld-powerpc/tlsopt6.d b/ld/testsuite/ld-powerpc/tlsopt6.d
index 15def71..38a2068 100644
--- a/ld/testsuite/ld-powerpc/tlsopt6.d
+++ b/ld/testsuite/ld-powerpc/tlsopt6.d
@@ -73,7 +73,7 @@ Disassembly of section \.text:
.*: (14 5a 60 7d|7d 60 5a 14) add r11,r0,r11
.*: (d4 ff 0c 38|38 0c ff d4) addi r0,r12,-44
.*: (00 00 8b e9|e9 8b 00 00) ld r12,0\(r11\)
-.*: (82 f0 00 78|78 00 f0 82) rldicl r0,r0,62,2
+.*: (82 f0 00 78|78 00 f0 82) srdi r0,r0,2
.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12
.*: (08 00 6b e9|e9 6b 00 08) ld r11,8\(r11\)
.*: (20 04 80 4e|4e 80 04 20) bctr