aboutsummaryrefslogtreecommitdiff
path: root/gas/doc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-10-13 08:46:28 +1030
committerAlan Modra <amodra@gmail.com>2022-10-14 22:07:18 +1030
commit61a457e5da46bad626bc3b6985a58fb5ae41842d (patch)
treed3923c9cbc7483191b42daebce20f42e2788c442 /gas/doc
parentd12f8998d2d086f0a6606589e5aedb7147e6f2f1 (diff)
downloadgdb-61a457e5da46bad626bc3b6985a58fb5ae41842d.zip
gdb-61a457e5da46bad626bc3b6985a58fb5ae41842d.tar.gz
gdb-61a457e5da46bad626bc3b6985a58fb5ae41842d.tar.bz2
e200 LSP support
It has bothered me for a long time that we have disabled LSP (and SPE) tests. Also the LSP test comment indicating there is something wrong with get_powerpc_dialect. I don't think there is. Decoding of a VLE instruction depends on whether the processor is in VLE mode (some processors support both VLE and standard PPC) which we flag per section with SHF_PPC_VLE for decoding when disassembling. Background: Some versions of powerpc e200 have "Lightweight Signal Processing" support, examples being e200z215 and e200z425. As far as I can tell, LSP and SPE are mutually exclusive. This seems to be borne out by insn encoding, for example LSP "zvaddih" and SPE "evaddw" have the same encoding. So none of the processor descriptions in ppc_opts ought to have both PPC_OPCODE_LSP and PPC_OPCODE_SPE/2, if we want disassembly to work. I also could not find anything to suggest that the LSP insns are enabled only in VLE mode, which means the LSP insns should not be in vle_opcodes. Fix all this by moving the LSP insns to their own table, and add a new e200z2 cpu entry with LSP support, removing LSP from -me200z4 and from -mvle. (Yes, I know, as I said above some of the e200z4 processors have LSP. Others have SPE. It's hard to choose good options. Think of z2 as meaning earlier, z4 as later.) Also add -mlsp to allow adding the LSP insn set. include/ * opcode/ppc.h (lsp_opcodes, lsp_num_opcodes): Declare. (LSP_OP_TO_SEG): Define. binutils/ * doc/binutils.texi: Update ppc docs. gas/ * config/tc-ppc.c (ppc_setup_opcodes): Add lsp opcodes to ppc_hash. * doc/c-ppc.texi: Document e200 and lsp. * testsuite/gas/ppc/lsp-checks.d: Assemble with -me200z2. * testsuite/gas/ppc/lsp.d: Likewise, disassembly too. * testsuite/gas/ppc/ppc.exp: Don't xfail lsp test. opcodes/ * ppc-dis.c (ppc_opts): Add e200z2 and lsp. Don't set PPC_OPCODE_LSP for e200z4 or vle. (ppc_parse_cpu): Mutually exclude LSP and SPE. (LSP_OPCD_SEGS): Define. (lsp_opcd_indices): New array. (disassemble_init_powerpc): Init lsp_opcd_indices. (lookup_lsp): New function. (print_insn_powerpc): Call it. * ppc-opc.c: Include libiberty.h for ARRAY_SIZE and use throughout. (vle_opcodes): Move LSP opcodes to.. (lsp_opcodes): ..here, and sort. (lsp_num_opcodes): New.
Diffstat (limited to 'gas/doc')
-rw-r--r--gas/doc/c-ppc.texi16
1 files changed, 11 insertions, 5 deletions
diff --git a/gas/doc/c-ppc.texi b/gas/doc/c-ppc.texi
index 2986d3d..4a9addc 100644
--- a/gas/doc/c-ppc.texi
+++ b/gas/doc/c-ppc.texi
@@ -81,6 +81,12 @@ Generate code for PowerPC 821/850/860.
@item -mppc64, -m620
Generate code for PowerPC 620/625/630.
+@item -me200z2, -me200z4
+Generate code for e200 variants, e200z2 with LSP, e200z4 with SPE.
+
+@item -me300
+Generate code for PowerPC e300 family.
+
@item -me500, -me500x2
Generate code for Motorola e500 core complex.
@@ -96,11 +102,14 @@ Generate code for Freescale e5500 core complex.
@item -me6500
Generate code for Freescale e6500 core complex.
+@item -mlsp
+Enable LSP instructions. (Disables SPE and SPE2.)
+
@item -mspe
-Generate code for Motorola SPE instructions.
+Generate code for Motorola SPE instructions. (Disables LSP.)
@item -mspe2
-Generate code for Freescale SPE2 instructions.
+Generate code for Freescale SPE2 instructions. (Disables LSP.)
@item -mtitan
Generate code for AppliedMicro Titan core complex.
@@ -114,9 +123,6 @@ Generate code for 32-bit BookE.
@item -ma2
Generate code for A2 architecture.
-@item -me300
-Generate code for PowerPC e300 family.
-
@item -maltivec
Generate code for processors with AltiVec instructions.