This is the mail archive of the
mailing list for the GCC project.
Re: Make m32c build, fix PSImode truncation
- From: DJ Delorie <dj at redhat dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: bernds at codesourcery dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Apr 2013 14:33:55 -0400
- Subject: Re: Make m32c build, fix PSImode truncation
- References: <517A8974 dot 7000202 at codesourcery dot com> <87a9okicyo dot fsf at talisman dot default> <517E42C4 dot 9020407 at codesourcery dot com> <87y5c1plr3 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com>
> Sorry for missing the truncation patterns, I should have grepped
> more than m32c.md. They look a lot like normal moves though. Is
> truncation really not a noop, or are the patterns there to work
> around something (probably this :-))?
Not sure which pattern you're talking about, but in general, the
m32c's registers are either 16-bit or 24-bit. You can move a pair of
16-bit registers into a 24-bit register and it truncates as part of
the move, likewise from 32-bit memory to 24-bit reg. Note that moves
to other 32-bit destinations do *not* truncate, nor can 24-bit
registers hold 32-bit values (duh). The 24-bit registers may also
hold a 16-bit value.
If you move a 16-bit value into a 24-bit register, it zero_extends.