From: Richard Sandiford <rsandifo@redhat.com>
To: Stanislaw Skowronek <sskowron@ET.PUT.Poznan.PL>
Cc: linux-mips@linux-mips.org
Subject: Re: Unmatched R_MIPS_HI16/R_MIPS_LO16 on gcc 3.5
Date: Tue, 24 May 2005 07:35:32 +0100 [thread overview]
Message-ID: <87ekbx872j.fsf@firetop.home> (raw)
In-Reply-To: <Pine.GSO.4.10.10505231928030.8910-100000@helios.et.put.poznan.pl> (Stanislaw Skowronek's message of "Mon, 23 May 2005 19:32:00 +0200 (MET DST)")
Stanislaw Skowronek <sskowron@ET.PUT.Poznan.PL> writes:
>> What do you mean? I'm talking about reordering the relocations in
>> the .rel.foo section, not reordering the code. I.e. if you have:
>>
>> .text
>> ...
>> addiu $4,$4,%lo(foo)
>> ...
>> lui $4,%hi(foo)
>>
>> the assembler is expected to output the R_MIPS_HI16 .rel.text entry
>> for the lui before the R_MIPS_LO16 entry for the addiu.
>
> If you have something like that:
>
> .text
> ...
> loop_label:
> lui $4, %hi(foo)
> addiu $4, $4, %lo(foo)
> ...
> jmp loop_label
> ...
>
> the compiler might be smart and change it into:
>
> .text
> ...
> lui $4, %hi(foo)
> loop_label:
> addiu $4, $4, %lo(foo)
> ...
> lui $4, %hi(foo)
> jmp loop_label
> ...
>
> for instance, to put the lui into branch delay slot (quite a smart
> decision, this one). However now %hi and %lo are unpaired. What should the
> tool do?
It should generate:
R_MIPS_HI16
R_MIPS_HI16
R_MIPS_LO16
And yes, the idea that several HI16s can be associated with the same
LO16 is also a GNU extension. ;)
(FWIW: as before, this extension, and indeed the whole idea of "out of
order" or "unpaired" %hi()s, isn't new. It's been around for 10 years.)
Richard
next prev parent reply other threads:[~2005-05-24 6:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-23 7:10 Unmatched R_MIPS_HI16/R_MIPS_LO16 on gcc 3.5 Stanislaw Skowronek
2005-05-23 11:17 ` Richard Sandiford
2005-05-23 16:19 ` Stanislaw Skowronek
2005-05-23 17:23 ` Richard Sandiford
2005-05-23 17:32 ` Stanislaw Skowronek
2005-05-24 6:35 ` Richard Sandiford [this message]
2005-05-24 6:39 ` Stanislaw Skowronek
2005-05-24 6:56 ` Richard Sandiford
2005-05-24 6:58 ` Stanislaw Skowronek
2005-05-24 10:40 ` Maciej W. Rozycki
2005-05-24 10:47 ` Stanislaw Skowronek
2005-05-24 11:40 ` Maciej W. Rozycki
2005-05-24 10:50 ` Richard Sandiford
2005-05-24 14:22 ` Ralf Baechle
2005-05-24 14:50 ` Maciej W. Rozycki
2005-05-24 15:00 ` Ralf Baechle
2005-05-24 15:04 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ekbx872j.fsf@firetop.home \
--to=rsandifo@redhat.com \
--cc=linux-mips@linux-mips.org \
--cc=sskowron@ET.PUT.Poznan.PL \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.