This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to determine aligned/unaligned loads in RTL?
- From: "Igor Shevlyakov" <igor at microunity dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Thu, 19 Jun 2003 16:29:24 -0700
- Subject: How to determine aligned/unaligned loads in RTL?
- Organization: Microunity
Hi,
I'm having a problem describing architecture I'm currently working on in
my .md file.
I have full set of aligned and unaligned loads in instruction set. And
depending op pragma/command line option regular "load" pattern should be
generated in aligned or unaligned loads. At the same time I want to use
unaligned loads in "extv" pattern when extracting bit fields from
memory. Another sad part is that unaligned part of address could be only
in base register but immediate offset should always be multiple of load
size. So when define_expand "extv" from memory operand and need generate
something like
for
r = (extract (mem (EA)) W O)
rT = (add (EA) (O/8))
r = ( <RTL for unal-load> (RT))
where <RTL for unal-load> couldn't just mem:M because this one could be
aligned/unaligned depending on the options.
Could anybody helpme choose that RTL should be in <RTL for unal-load>.
Thanks
Igor