Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site kuling.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!enea!kuling!thomas From: thomas@kuling.UUCP (Thomas H{meenaho) Newsgroups: net.lang.c Subject: Re: Code Generation Message-ID: <860@kuling.UUCP> Date: Thu, 5-Dec-85 00:51:20 EST Article-I.D.: kuling.860 Posted: Thu Dec 5 00:51:20 1985 Date-Received: Sun, 8-Dec-85 03:01:55 EST References: <3457@brl-tgr.ARPA> <462@graffiti.UUCP> Reply-To: thomas@kuling.UUCP (Thomas H{meenaho) Organization: The Royal Inst. of Techn., Stockholm Lines: 19 In article <462@graffiti.UUCP> peter@graffiti.UUCP (Peter da Silva) writes: >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. >-- With that declaration of the register variables it is wrong to merely clear the high bits. Remember that they were implicitly declared as signed and you must therefore sign extend them at some time. If that is done before the move or after doesn't matter as long as it gets done.-- Thomas Hameenaho, Dept. of Computer Science, Uppsala University, Sweden Phone: +46 18 138650 UUCP: thomas@kuling.UUCP (...!{seismo,mcvax}!enea!kuling!thomas)