Code Generation (register byte, short...)

Rich A. Hammond hammond at petrus.UUCP
Tue Nov 26 22:24:34 AEST 1985


> [on a 68000 where short*short is a single instruction, but int*int requires a
> procedure call ]
> 
> Thats what you get for using a machine that calims to be 32-bit when it really
> is 16-bit. Dont know how to help you with your gripe but "int" exists to
> represent the natural size of the machine..... in my interpretation that
> would be the size that works best, fastest etc.

The problem is really the brain damage among UNIX hackers that  assumes
sizeof(int) == sizeof (char *).  This is so painful to fix (for quick ports)
that although the 68000's int should be 16 bits (the size that works best,
fastest, ...) it is often made 32 bits.  While this avoids the pain for the
porter, it does lead to problems for the end user (i.e. using short vs int).

Rich Hammond    (ihnp4|allegra|decvax|ucbvax) !bellcore!hammond



More information about the Comp.lang.c mailing list