This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: 32-bit PowerPC sdata linker problem
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: binutils at sourceware dot org
- Date: Tue, 10 Jun 2014 08:27:42 +0200
- Subject: Re: 32-bit PowerPC sdata linker problem
- Authentication-results: sourceware.org; auth=none
- References: <53918356 dot 3040102 at embedded-brains dot de> <20140606105420 dot GH5592 at bubble dot grove dot modra dot org> <5391A4BF dot 2030308 at embedded-brains dot de> <5391A6A4 dot 6050708 at embedded-brains dot de> <20140606121531 dot GI5592 at bubble dot grove dot modra dot org> <5391B8B7 dot 8030908 at embedded-brains dot de> <20140606130559 dot GK5592 at bubble dot grove dot modra dot org> <5391C0E8 dot 7010409 at embedded-brains dot de> <20140606134915 dot GL5592 at bubble dot grove dot modra dot org> <5391CCFB dot 5060206 at embedded-brains dot de> <20140607123407 dot GN5592 at bubble dot grove dot modra dot org>
On 2014-06-07 14:34, Alan Modra wrote:
On Fri, Jun 06, 2014 at 04:15:23PM +0200, Sebastian Huber wrote:
>On 2014-06-06 15:49, Alan Modra wrote:
> >On Fri, Jun 06, 2014 at 03:23:52PM +0200, Sebastian Huber wrote:
> >>>On 2014-06-06 15:05, Alan Modra wrote:
> >>>> >On Fri, Jun 06, 2014 at 02:48:55PM +0200, Sebastian Huber wrote:
> >>>>> >> cmplwi cr0, \_REG, ppc_exc_lock_std@sdarel
> >>>>> >>
> >>>>> >> .endm
> >>>>> >>
> >>>>> >>I guess, I have to rewrite this a bit.
> >>>> >
> >>>> >Doesn't using a cmpwi rather than cmplwi work?
> >>>> >
> >>>
> >>>No, the cmplwi uses 0x0000 || UIMM with the cmpwi we have
> >>>EXTS(SIMM), but the upper 16-bit must be zero so that the comparison
> >>>works in the macro.
> >Oh, of course. Perhaps I should make cmpli accept both signed and
> >unsigned 16-bit fields.
>
>I think our usage of this cmplwi with the implicit truncation from
>the linker is quite a hack. On the other hand it worked for several
>years.
Applied.
bfd/
* elf32-ppc.c (ppc_elf_relocate_section): Treat field of cmpli
insn as a bitfield; Use complain_overflow_bitfield.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
opcodes/
* ppc-opc.c (UISIGNOPT): Define and use with cmpli.
gas/
* config/tc-ppc.c (ppc_insert_operand): Handle PPC_OPERAND_SIGNOPT
on unsigned fields. Comment on PPC_OPERAND_SIGNOPT signed fields
in 64-bit mode.
gold/
* powerpc.cc (relocate): Treat field of cmpli insn as a bitfield.
Thanks, now it works again.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.