Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rtp47.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!rti-sel!rtp47!meissner From: meissner@rtp47.UUCP (Michael Meissner) Newsgroups: net.lang.c Subject: Re: Code Generation Message-ID: <260@rtp47.UUCP> Date: Sat, 23-Nov-85 10:12:35 EST Article-I.D.: rtp47.260 Posted: Sat Nov 23 10:12:35 1985 Date-Received: Mon, 25-Nov-85 07:12:16 EST References: <3457@brl-tgr.ARPA> Reply-To: meissner@rtp47.UUCP (Michael Meissner) Organization: Data General, RTP, NC Lines: 22 Summary: In article <3457@brl-tgr.ARPA> cottrell@nbs-vms.arpa (COTTRELL, JAMES) writes: >/* 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. > I don't know much about the VAX pcc C compilers, but I would guess the real problem is the semantics of C, which requires short/char items to be converted to INT in any arithmetic expression. Thus the 8 and 16 bit forms of the instruction cannot be used (because they would truncate, etc.). Also such instructions assume that both operands are short/char. Michael Meissner, Data General