Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 (Fortune 01.1b1); site graffiti.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ut-sally!ut-ngp!shell!graffiti!peter From: peter@graffiti.UUCP (Peter da Silva) Newsgroups: net.lang.c Subject: Re: Code Generation Message-ID: <462@graffiti.UUCP> Date: Sat, 23-Nov-85 08:59:51 EST Article-I.D.: graffiti.462 Posted: Sat Nov 23 08:59:51 1985 Date-Received: Mon, 25-Nov-85 07:16:50 EST References: <3457@brl-tgr.ARPA> Organization: The Power Elite, Houston, TX Lines: 21 > > 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. The registers are not wide enough to hold a double. Also, you cannot just change the flavors of the instructions. Consider a case where { register short i; register long j; short c; } are in registers. Perform { i=c; ... j=i; }. You have to do more than move the low word of the register. You have to either explicitly clear the high word of i when you store c in it, have explicitly cleared it when you entered the block, or clear the high word of j after doing a 16-bit move from i to j. -- Name: Peter da Silva Graphic: `-_-' UUCP: ...!shell!{graffiti,baylor}!peter IAEF: ...!kitty!baylor!peter