This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 32-bit PowerPC sdata linker problem


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]