Regarding machine modes

Ian Lance Taylor iant@google.com
Fri Oct 3 15:16:00 GMT 2008


"Sivaprasad.pv" <sivaprasad.pv@redpinesignals.com> writes:

> I have little confusion about machine modes.
> Initially our architecture supports both 16 & 32 bit registers.
> At that time we have used
> QImode  - char
> HImode - intergers (16 bit)
> SImode - long interger(32 bit)
>
> Now  we are proposed to change all registers to 32 bit registers.We
> have corresponding load/store 8/16/32bit instructions available with
> sign/zero extension.
> Now any data item is represented as 32 bit value in registers.
> Can I define a pattern with QImode / HImode/SImode (in .md file) or I
> should use only SImode.

You must define movqi and movhi, and you must define PROMOTE_MODE
and/or LOAD_EXTEND_OP and/or provide sign- and zero-extension insns.
Whether to define other QImode and HImode operations is optional, and
depends on the instructions available on your processor.

Ian



More information about the Gcc-help mailing list