mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-23 11:04:32 +00:00
binutils/ChangeLog
* doc/binutils.texi (objdump): Document ppc -M options. gas/ChangeLog * config/tc-ppc.c (ppc_insert_operand): Pass (ppc_cpu | ppc_size) to operand->insert. (md_assemble): Likewise. gas/testsuite/ChangeLog * gas/ppc/booke.d: Modify reloc and target matches for powerpc64. include/opcode/ChangeLog * ppc.h (struct powerpc_operand <insert, extract>): Add dialect param. opcodes/ChangeLog * ppc-opc.c (PPC64): Revert 2001-10-12. Do include PPC_OPCODE_PPC. (insert_bat, extract_bat, insert_bba, extract_bba, insert_bd, extract_bd, insert_bdm, extract_bdm, insert_bdp, extract_bdp, valid_bo, insert_bo, extract_bo, insert_boe, extract_boe, insert_ds, extract_ds, insert_de, extract_de, insert_des, extract_des, insert_li, extract_li, insert_mbe, extract_mbe, insert_mb6, extract_mb6, insert_nb, extract_nb, insert_nsi, extract_nsi, insert_ral, insert_ram, insert_ras, insert_rbs, extract_rbs, insert_sh6, extract_sh6, insert_spr, extract_spr, insert_tbr, extract_tbr): Add dialect param. (extract_bd, extract_bdm, extract_bdp, extract_ds, extract_des, extract_li, extract_nsi): Implement sign extension without conditional. (insert_bdm, extract_bdm, insert_bdp, extract_bdp, valid_bo): Handle 64 bit branch hints. (extract_bdm, extract_bdp): Correct 32 bit validation. (AT1_MASK, AT2_MASK): Define. (BBOAT_MASK): Define. (BBOATCB_MASK, BBOAT2CB_MASK, BBOATBI_MASK): Define. (BOFM64, BOFP64, BOTM64, BOTP64): Define. (BODNZM64, BODNZP64, BODZM64, BODZP64): Define. (PPCCOM32, PPCCOM64): Define. (powerpc_opcodes): Modify existing 32 bit insns with branch hints and add new patterns to implement 64 bit branches with hints. Move booke instructions so they match before ppc64. * ppc-dis.c (powerpc_dialect): Set PPC_OPCODE_64 in dialect for 64 bit default targets, and parse "32" and "64" in options. Formatting fixes. (print_insn_powerpc): Pass dialect to operand->extract.
This commit is contained in:
parent
025eb37b39
commit
802a735ed9
@ -1,3 +1,7 @@
|
||||
2001-11-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* doc/binutils.texi (objdump): Document ppc -M options.
|
||||
|
||||
2001-11-14 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* doc/binutils.texi (objdump): Fix description to use x86-64.
|
||||
|
@ -1582,6 +1582,10 @@ option string. Lastly, @option{suffix}, when in AT&T mode,
|
||||
instructs the dissassembler to print a mnemonic suffix even when the
|
||||
suffix could be inferred by the operands.
|
||||
|
||||
For PPC, @option{booke}, @option{booke32} and @option{booke64} select
|
||||
disassembly of BookE instructions. @option{32} and @option{64} select
|
||||
PowerPC and PowerPC64 disassembly, respectively.
|
||||
|
||||
@item -p
|
||||
@itemx --private-headers
|
||||
Print information that is specific to the object file format. The exact
|
||||
|
@ -1,3 +1,9 @@
|
||||
2001-11-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* config/tc-ppc.c (ppc_insert_operand): Pass (ppc_cpu | ppc_size)
|
||||
to operand->insert.
|
||||
(md_assemble): Likewise.
|
||||
|
||||
2001-11-12 Nick Clifton <nickc@cambridge.redhat.com>
|
||||
|
||||
* frags.c (frag_grow): Use frag_make_room() to grow the
|
||||
|
@ -1304,7 +1304,7 @@ ppc_insert_operand (insn, operand, val, file, line)
|
||||
const char *errmsg;
|
||||
|
||||
errmsg = NULL;
|
||||
insn = (*operand->insert) (insn, (long) val, &errmsg);
|
||||
insn = (*operand->insert) (insn, (long) val, ppc_cpu | ppc_size, &errmsg);
|
||||
if (errmsg != (const char *) NULL)
|
||||
as_bad_where (file, line, errmsg);
|
||||
}
|
||||
@ -1942,7 +1942,7 @@ md_assemble (str)
|
||||
from the input. */
|
||||
if ((operand->flags & PPC_OPERAND_FAKE) != 0)
|
||||
{
|
||||
insn = (*operand->insert) (insn, 0L, &errmsg);
|
||||
insn = (*operand->insert) (insn, 0L, ppc_cpu | ppc_size, &errmsg);
|
||||
if (errmsg != (const char *) NULL)
|
||||
as_bad (errmsg);
|
||||
continue;
|
||||
@ -1955,7 +1955,7 @@ md_assemble (str)
|
||||
{
|
||||
if (operand->insert)
|
||||
{
|
||||
insn = (*operand->insert) (insn, 0L, &errmsg);
|
||||
insn = (*operand->insert) (insn, 0L, ppc_cpu | ppc_size, &errmsg);
|
||||
if (errmsg != (const char *) NULL)
|
||||
as_bad (errmsg);
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-11-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* gas/ppc/booke.d: Modify reloc and target matches for powerpc64.
|
||||
|
||||
2001-11-11 Timothy Wall <twall@alum.mit.edu>
|
||||
|
||||
* gas/tic54x/sections.[sd]: Check for named, initialized sections
|
||||
|
@ -2,7 +2,7 @@
|
||||
#objdump: -Dr -Mbooke
|
||||
#name: BookE tests
|
||||
|
||||
.*: +file format elf32-powerpc
|
||||
.*: +file format elf(32)?(64)?-powerpc
|
||||
|
||||
Disassembly of section \.text:
|
||||
|
||||
@ -10,9 +10,9 @@ Disassembly of section \.text:
|
||||
0: 24 25 00 30 bce 1,4\*cr1\+gt,30 <branch_target_1>
|
||||
4: 24 46 00 3d bcel 2,4\*cr1\+eq,40 <branch_target_2>
|
||||
8: 24 67 00 02 bcea 3,4\*cr1\+so,0 <start>
|
||||
8: R_PPC_ADDR14 branch_target_3
|
||||
8: R_PPC(64)?_ADDR14 branch_target_3
|
||||
c: 24 88 00 03 bcela 4,4\*cr2,0 <start>
|
||||
c: R_PPC_ADDR14 branch_target_4
|
||||
c: R_PPC(64)?_ADDR14 branch_target_4
|
||||
10: 4c a9 00 22 bclre 5,4\*cr2\+gt
|
||||
14: 4c aa 00 23 bclrel 5,4\*cr2\+eq
|
||||
18: 4d 0b 04 22 bcctre 8,4\*cr2\+so
|
||||
@ -20,9 +20,9 @@ Disassembly of section \.text:
|
||||
20: 58 00 00 74 be 94 <branch_target_5>
|
||||
24: 58 00 00 89 bel ac <branch_target_6>
|
||||
28: 58 00 00 02 bea 0 <start>
|
||||
28: R_PPC_ADDR24 branch_target_7
|
||||
28: R_PPC(64)?_ADDR24 branch_target_7
|
||||
2c: 58 00 00 03 bela 0 <start>
|
||||
2c: R_PPC_ADDR24 branch_target_8
|
||||
2c: R_PPC(64)?_ADDR24 branch_target_8
|
||||
|
||||
0+0000030 <branch_target_1>:
|
||||
30: e9 09 00 80 lbze r8,8\(r9\)
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-11-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ppc.h (struct powerpc_operand <insert, extract>): Add dialect param.
|
||||
|
||||
2001-11-11 Timothy Wall <twall@alum.mit.edu>
|
||||
|
||||
* tic54x.h: Revise opcode layout; don't really need a separate
|
||||
|
@ -130,6 +130,7 @@ struct powerpc_operand
|
||||
operand value is legal, *ERRMSG will be unchanged (most operands
|
||||
can accept any value). */
|
||||
unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
|
||||
int dialect,
|
||||
const char **errmsg));
|
||||
|
||||
/* Extraction function. This is used by the disassembler. To
|
||||
@ -149,7 +150,8 @@ struct powerpc_operand
|
||||
non-zero if this operand type can not actually be extracted from
|
||||
this operand (i.e., the instruction does not match). If the
|
||||
operand is valid, *INVALID will not be changed. */
|
||||
long (*extract) PARAMS ((unsigned long instruction, int *invalid));
|
||||
long (*extract) PARAMS ((unsigned long instruction, int dialect,
|
||||
int *invalid));
|
||||
|
||||
/* One bit syntax flags. */
|
||||
unsigned long flags;
|
||||
|
@ -1,3 +1,38 @@
|
||||
2001-11-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ppc-opc.c (PPC64): Revert 2001-10-12. Do include PPC_OPCODE_PPC.
|
||||
(insert_bat, extract_bat, insert_bba, extract_bba,
|
||||
insert_bd, extract_bd, insert_bdm, extract_bdm,
|
||||
insert_bdp, extract_bdp, valid_bo,
|
||||
insert_bo, extract_bo, insert_boe, extract_boe,
|
||||
insert_ds, extract_ds, insert_de, extract_de,
|
||||
insert_des, extract_des, insert_li, extract_li,
|
||||
insert_mbe, extract_mbe, insert_mb6, extract_mb6,
|
||||
insert_nb, extract_nb, insert_nsi, extract_nsi,
|
||||
insert_ral, insert_ram, insert_ras,
|
||||
insert_rbs, extract_rbs, insert_sh6, extract_sh6,
|
||||
insert_spr, extract_spr, insert_tbr, extract_tbr): Add dialect param.
|
||||
(extract_bd, extract_bdm, extract_bdp,
|
||||
extract_ds, extract_des,
|
||||
extract_li, extract_nsi): Implement sign extension without conditional.
|
||||
(insert_bdm, extract_bdm,
|
||||
insert_bdp, extract_bdp, valid_bo): Handle 64 bit branch hints.
|
||||
(extract_bdm, extract_bdp): Correct 32 bit validation.
|
||||
(AT1_MASK, AT2_MASK): Define.
|
||||
(BBOAT_MASK): Define.
|
||||
(BBOATCB_MASK, BBOAT2CB_MASK, BBOATBI_MASK): Define.
|
||||
(BOFM64, BOFP64, BOTM64, BOTP64): Define.
|
||||
(BODNZM64, BODNZP64, BODZM64, BODZP64): Define.
|
||||
(PPCCOM32, PPCCOM64): Define.
|
||||
(powerpc_opcodes): Modify existing 32 bit insns with branch hints
|
||||
and add new patterns to implement 64 bit branches with hints. Move
|
||||
booke instructions so they match before ppc64.
|
||||
|
||||
* ppc-dis.c (powerpc_dialect): Set PPC_OPCODE_64 in dialect for
|
||||
64 bit default targets, and parse "32" and "64" in options.
|
||||
Formatting fixes.
|
||||
(print_insn_powerpc): Pass dialect to operand->extract.
|
||||
|
||||
2001-11-14 Dave Brolley <brolley@redhat.com>
|
||||
|
||||
* cgen-dis.c (count_decodable_bits): New function.
|
||||
|
@ -44,13 +44,25 @@ powerpc_dialect(info)
|
||||
{
|
||||
int dialect = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
|
||||
|
||||
if (info->disassembler_options &&
|
||||
(strcmp(info->disassembler_options, "booke") == 0 ||
|
||||
strcmp(info->disassembler_options, "booke32") == 0 ||
|
||||
strcmp(info->disassembler_options, "booke64") == 0))
|
||||
if (BFD_DEFAULT_TARGET_SIZE == 64)
|
||||
dialect |= PPC_OPCODE_64;
|
||||
|
||||
if (info->disassembler_options
|
||||
&& (strcmp (info->disassembler_options, "booke") == 0
|
||||
|| strcmp (info->disassembler_options, "booke32") == 0
|
||||
|| strcmp (info->disassembler_options, "booke64") == 0))
|
||||
dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_BOOKE64;
|
||||
else
|
||||
dialect |= PPC_OPCODE_403 | PPC_OPCODE_601;
|
||||
|
||||
if (info->disassembler_options)
|
||||
{
|
||||
if (strstr (info->disassembler_options, "32") != NULL)
|
||||
dialect &= ~PPC_OPCODE_64;
|
||||
else if (strstr (info->disassembler_options, "64") != NULL)
|
||||
dialect |= PPC_OPCODE_64;
|
||||
}
|
||||
|
||||
return dialect;
|
||||
}
|
||||
|
||||
@ -145,7 +157,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
|
||||
{
|
||||
operand = powerpc_operands + *opindex;
|
||||
if (operand->extract)
|
||||
(*operand->extract) (insn, &invalid);
|
||||
(*operand->extract) (insn, dialect, &invalid);
|
||||
}
|
||||
if (invalid)
|
||||
continue;
|
||||
@ -172,7 +184,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
|
||||
|
||||
/* Extract the value from the instruction. */
|
||||
if (operand->extract)
|
||||
value = (*operand->extract) (insn, (int *) NULL);
|
||||
value = (*operand->extract) (insn, dialect, (int *) NULL);
|
||||
else
|
||||
{
|
||||
value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
|
||||
|
1350
opcodes/ppc-opc.c
1350
opcodes/ppc-opc.c
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user