Umesh Kalappa <umesh.kalap...@gmail.com> writes:
> Tried to compile the below sample by retargeted compiler
>
> int a =10;
>
> int b =10;
>
>
> int func()
>
> {
>
>  return a+ b;
>
> }
>
> the compiler is stating that the a and b are global with short type(HI
> mode) of size 2 bytes.

Yeah, HImode sounds right in this case.

> where as we  need the word mode as SI not HI ,I do understand that the
> SI and HI modes are of  same size but till I insist  better to have SI
> mode.

For a 16-bit target, word_mode should be HImode rather than SImode.

The way the modes are defined is that QImode is always one "unit"
(byte), HImode is always twice the size of QImode, SImode is always
twice the size of HImode, and so on.  Other modes like word_mode,
Pmode and ptr_mode are defined relative to that.

Thanks,
Richard

Reply via email to