public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Expanding a load instruction
@ 2009-06-05 15:32 fearyourself
  2009-06-05 15:36 ` Dave Korn
  0 siblings, 1 reply; 9+ messages in thread
From: fearyourself @ 2009-06-05 15:32 UTC (permalink / raw)
  To: gcc

Dear all,

In the instruction set of my architecture, the offsets of a half-load
(HImode) have to be multiples of 2. However, if I set up a structure
in a certain way, the compiler will generate:

(mem/s/j:HI (plus:DI (reg:DI 134 [ ivtmp.23 ])
        (const_int 1 [0x1])) [0 <variable>.geno+0 S2 A16])

As the memory operand for the load.

Now, one solution I am going to try to fix this is to use
define_expand and add a move into another register before this load
and then load from that register (thus removing the offset of 1).

My question is: Is that how it should be done or is there another solution?

Thanks again for your help,
Jc

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-06-11 20:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05 15:32 Expanding a load instruction fearyourself
2009-06-05 15:36 ` Dave Korn
     [not found]   ` <c568a2600906051017j799e035cg26ac1c5dd036c16c@mail.gmail.com>
2009-06-09 20:17     ` Jean Christophe Beyler
2009-06-09 22:24       ` Dave Korn
2009-06-10 13:43         ` Jean Christophe Beyler
2009-06-10 14:17           ` Dave Korn
2009-06-10 14:36             ` Jean Christophe Beyler
2009-06-10 15:00               ` Dave Korn
2009-06-11 20:32                 ` Jean Christophe Beyler

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).