* load multiple from const labels?
@ 2002-10-19 0:46 N V Krishna
2002-10-29 9:50 ` Richard Earnshaw
0 siblings, 1 reply; 2+ messages in thread
From: N V Krishna @ 2002-10-19 0:46 UTC (permalink / raw)
To: gcc
Hi,
On inspecting different codes, I see that there are quite a few
loads from constant labels.
e.g.
ldr r1, .L224
ldr r2, .L224+4
I was wondering if we can use LDM (load multiple) type of instruction on
ARM type of processors here?
I tried inserting LDM instruction as I insert LDM with registers, but gcc
cribbed saying 'internal error--unrecognizable insn:'
I tried inserting one SET instruction and followed by LDM, and this time
gcc cribbed for the SET instruction. Please forgive my ignorance and let
me know if it is not possible to write have instructions like
mov r1, .L224+immediate
or I am making some mistake in building the rtl??
Warm regards
Krishna
--
Homepage:http://www.cs.purdue.edu/homes/nvk
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: load multiple from const labels?
2002-10-19 0:46 load multiple from const labels? N V Krishna
@ 2002-10-29 9:50 ` Richard Earnshaw
0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2002-10-29 9:50 UTC (permalink / raw)
To: N V Krishna; +Cc: gcc, Richard.Earnshaw
> Hi,
> On inspecting different codes, I see that there are quite a few
> loads from constant labels.
> e.g.
>
> ldr r1, .L224
> ldr r2, .L224+4
>
> I was wondering if we can use LDM (load multiple) type of instruction on
> ARM type of processors here?
On processors after ARM 7 it's going to be a loose to make that change,
the sequence isn't shorter and it generally ends up taking more cycles to
execute; in addition, the range of an ADR instruction is generally less
than for LDR, so we end up with more constant pools. For three or more
LDR's the balance starts to shift back in favour of using LDM, but even
then it's not clear that this would be worth the complexity, loss of
scheduling freedom.
Generating LDM instructions in RTL prior to register allocation is nearly
impossible unless you keep the use of the values strictly with the load or
use explicit hard register numbers, since the register allocator has no
concept of an order of registers within a register class.
R.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-29 11:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-19 0:46 load multiple from const labels? N V Krishna
2002-10-29 9:50 ` Richard Earnshaw
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).