* E500 APUinfo fix
@ 2003-06-24 3:34 Mark Mitchell
2003-06-24 4:28 ` Alan Modra
2003-07-02 15:41 ` ppc-opc.c fix for disasm Kumar Gala
0 siblings, 2 replies; 5+ messages in thread
From: Mark Mitchell @ 2003-06-24 3:34 UTC (permalink / raw)
To: binutils; +Cc: zack
Section 3.6 of the E500 ABI specifies the contents of the APU
Information Section, and requires that offset 4 contains the number of
bytes of APU information. However, GAS and binutils incorrectly use
the number of APU information slots -- rather than bytes.
Fixed with this patch.
OK to apply?
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2003-06-23 Mark Mitchell <mark@codesourcery.com>
* elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
APUinfo slots.
(ppc_elf_final_write_processing): Likewise.
2003-06-23 Mark Mitchell <mark@codesourcery.com>
* config/tc-ppc.c (ppc_cleanup): Use bytes to count APUinfo slots.
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.83
diff -c -5 -p -r1.83 elf32-ppc.c
*** bfd/elf32-ppc.c 31 May 2003 07:55:10 -0000 1.83
--- bfd/elf32-ppc.c 24 Jun 2003 03:30:02 -0000
*************** ppc_elf_begin_write_processing (abfd, li
*** 5719,5740 ****
goto fail;
if (strcmp (ptr + 12, APUINFO_LABEL) != 0)
goto fail;
! /* Get the number of apuinfo entries. */
datum = bfd_get_32 (ibfd, ptr + 4);
! if ((datum * 4 + 20) != length)
goto fail;
/* Make sure that we do not run off the end of the section. */
if (offset + length > output_section_size)
goto fail;
/* Scan the apuinfo section, building a list of apuinfo numbers. */
! for (i = 0; i < datum; i++)
! apuinfo_list_add (bfd_get_32 (ibfd, ptr + 20 + (i * 4)));
/* Update the offset. */
offset += length;
}
--- 5719,5740 ----
goto fail;
if (strcmp (ptr + 12, APUINFO_LABEL) != 0)
goto fail;
! /* Get the number of bytes used for apuinfo entries. */
datum = bfd_get_32 (ibfd, ptr + 4);
! if (datum + 20 != length)
goto fail;
/* Make sure that we do not run off the end of the section. */
if (offset + length > output_section_size)
goto fail;
/* Scan the apuinfo section, building a list of apuinfo numbers. */
! for (i = 0; i < datum; i += 4)
! apuinfo_list_add (bfd_get_32 (ibfd, ptr + 20 + i));
/* Update the offset. */
offset += length;
}
*************** ppc_elf_final_write_processing (abfd, li
*** 5806,5816 ****
}
/* Create the apuinfo header. */
num_entries = apuinfo_list_length ();
bfd_put_32 (abfd, sizeof APUINFO_LABEL, buffer);
! bfd_put_32 (abfd, num_entries, buffer + 4);
bfd_put_32 (abfd, 0x2, buffer + 8);
strcpy (buffer + 12, APUINFO_LABEL);
length = 20;
for (i = 0; i < num_entries; i++)
--- 5806,5816 ----
}
/* Create the apuinfo header. */
num_entries = apuinfo_list_length ();
bfd_put_32 (abfd, sizeof APUINFO_LABEL, buffer);
! bfd_put_32 (abfd, num_entries * 4, buffer + 4);
bfd_put_32 (abfd, 0x2, buffer + 8);
strcpy (buffer + 12, APUINFO_LABEL);
length = 20;
for (i = 0; i < num_entries; i++)
Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.75
diff -c -5 -p -r1.75 tc-ppc.c
*** gas/config/tc-ppc.c 18 Jun 2003 23:05:44 -0000 1.75
--- gas/config/tc-ppc.c 24 Jun 2003 03:30:03 -0000
*************** ppc_cleanup ()
*** 1340,1350 ****
p = frag_more (4);
md_number_to_chars (p, (valueT) 8, 4);
p = frag_more (4);
! md_number_to_chars (p, (valueT) ppc_apuinfo_num, 4);
p = frag_more (4);
md_number_to_chars (p, (valueT) 2, 4);
p = frag_more (8);
--- 1340,1350 ----
p = frag_more (4);
md_number_to_chars (p, (valueT) 8, 4);
p = frag_more (4);
! md_number_to_chars (p, (valueT) ppc_apuinfo_num * 4, 4);
p = frag_more (4);
md_number_to_chars (p, (valueT) 2, 4);
p = frag_more (8);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: E500 APUinfo fix
2003-06-24 3:34 E500 APUinfo fix Mark Mitchell
@ 2003-06-24 4:28 ` Alan Modra
2003-06-25 12:19 ` Alan Modra
2003-07-02 15:41 ` ppc-opc.c fix for disasm Kumar Gala
1 sibling, 1 reply; 5+ messages in thread
From: Alan Modra @ 2003-06-24 4:28 UTC (permalink / raw)
To: Mark Mitchell; +Cc: binutils, zack
On Mon, Jun 23, 2003 at 08:36:51PM -0700, Mark Mitchell wrote:
> 2003-06-23 Mark Mitchell <mark@codesourcery.com>
>
> * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
> APUinfo slots.
> (ppc_elf_final_write_processing): Likewise.
>
> 2003-06-23 Mark Mitchell <mark@codesourcery.com>
>
> * config/tc-ppc.c (ppc_cleanup): Use bytes to count APUinfo slots.
OK.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: E500 APUinfo fix
2003-06-24 4:28 ` Alan Modra
@ 2003-06-25 12:19 ` Alan Modra
0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2003-06-25 12:19 UTC (permalink / raw)
To: binutils
On Mon, Jun 23, 2003 at 08:36:51PM -0700, Mark Mitchell wrote:
> Use bytes to count APUinfo slots.
Tch.
* ld-powerpc/apuinfo.rd: Update.
Index: ld/testsuite/ld-powerpc/apuinfo.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/apuinfo.rd,v
retrieving revision 1.1
diff -u -p -r1.1 apuinfo.rd
--- ld/testsuite/ld-powerpc/apuinfo.rd 3 Dec 2002 18:24:33 -0000 1.1
+++ ld/testsuite/ld-powerpc/apuinfo.rd 25 Jun 2003 08:46:22 -0000
@@ -5,6 +5,6 @@
#target: powerpc-eabi*
Hex dump of section '.PPC.EMB.apuinfo':
- 0x00000000 00000008 00000007 00000002 41505569 ............APUi
+ 0x00000000 00000008 0000001c 00000002 41505569 ............APUi
0x00000010 6e666f00 00420001 00430001 00410001 nfo..B...C...A..
0x00000020 01020001 01010001 00400001 01000001 .........@......
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* ppc-opc.c fix for disasm
2003-06-24 3:34 E500 APUinfo fix Mark Mitchell
2003-06-24 4:28 ` Alan Modra
@ 2003-07-02 15:41 ` Kumar Gala
2003-07-04 14:20 ` Nick Clifton
1 sibling, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2003-07-02 15:41 UTC (permalink / raw)
To: binutils
I noticed a bug in disasm of dcbt, dcbtst today. I'm wondering what
changes I need to make to binutils beyond fixing the opcode/ppc-opc.c
file to change the mask from XRT_MASK -> X_MASK for the two
instructions.
Also is there anywhere that talks about how to properly create patches
for submission?
thanks
- kumar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ppc-opc.c fix for disasm
2003-07-02 15:41 ` ppc-opc.c fix for disasm Kumar Gala
@ 2003-07-04 14:20 ` Nick Clifton
0 siblings, 0 replies; 5+ messages in thread
From: Nick Clifton @ 2003-07-04 14:20 UTC (permalink / raw)
To: Kumar Gala; +Cc: binutils
Hi Kumar,
> I noticed a bug in disasm of dcbt, dcbtst today. I'm wondering what
> changes I need to make to binutils beyond fixing the
> opcode/ppc-opc.c file to change the mask from XRT_MASK -> X_MASK for
> the two instructions.
A test case that demonstrates the problem and which can be added to
the ppc specific part of the GAS testsuite would also be very helpful.
Other than that though, there are no other files that you should need
to change.
> Also is there anywhere that talks about how to properly create patches
> for submission?
Binutils generally follows the same rules as gcc, so the documentation
on their web site applies here:
http://www.gnu.org/software/gcc/contribute.html
Cheers
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-07-04 14:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-24 3:34 E500 APUinfo fix Mark Mitchell
2003-06-24 4:28 ` Alan Modra
2003-06-25 12:19 ` Alan Modra
2003-07-02 15:41 ` ppc-opc.c fix for disasm Kumar Gala
2003-07-04 14:20 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).