Make m32c build, fix PSImode truncation

DJ Delorie
Tue Apr 30 07:24:00 GMT 2013

> Sorry for missing the truncation patterns, I should have grepped
> more than  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.

More information about the Gcc-patches mailing list