Code Generation

COTTRELL, JAMES cottrell at nbs-vms.arpa
Thu Nov 21 08:42:11 AEST 1985


/* Key: >> Ron Natalie, > Chris Torek
> > It doesn't ignore register short definitions, it mearly does not put them
> > in registers because registers can only be applied to types int and long
> > on VAX.
> 
> You can indeed apply
> registers to `short's and `char's and even `float's and `double's;
> it is merely much more difficult to get the code generation right.

Why is that? For the moment lets forget about the floating types.
>From the way I read my manual, using the byte & word flavors of
instruxions makes the registers appear to be 8 & 16 bits wide.
So what's so difficult about that.

To put it another way, write a fragment of code using ints, run it
thru `cc -S'. Then change the `ints' to `shorts'. Now I claim I should
be able to get equivalent (more efficient tho) code merely by changing
the flavors of the instruxions from `long' to `word'. Prove me wrong.

	jim		cottrell at nbs
*/
------



More information about the Comp.lang.c mailing list