From: fearyourself <fearyourself@gmail.com>
To: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Expanding a load instruction
Date: Fri, 05 Jun 2009 15:32:00 -0000 [thread overview]
Message-ID: <c568a2600906050832y1d344449l5aef478548ad3bca@mail.gmail.com> (raw)
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
next reply other threads:[~2009-06-05 15:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 15:32 fearyourself [this message]
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
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=c568a2600906050832y1d344449l5aef478548ad3bca@mail.gmail.com \
--to=fearyourself@gmail.com \
--cc=gcc@gcc.gnu.org \
/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 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).