Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gatech!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: Code Generation Message-ID: <2327@umcp-cs.UUCP> Date: Mon, 25-Nov-85 07:53:08 EST Article-I.D.: umcp-cs.2327 Posted: Mon Nov 25 07:53:08 1985 Date-Received: Tue, 26-Nov-85 20:53:37 EST References: <3457@brl-tgr.ARPA> <462@graffiti.UUCP> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 33 In article <462@graffiti.UUCP> peter@graffiti.UUCP (Peter da Silva) writes: [me] > > > 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. [Jim Cottrell] > > Why is that? ... > The registers are not wide enough to hold a double. No, but then they never were. The double precision instructions operate on register pairs (shades of the 370! :-) ), when they operate on registers at all. > 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. That is not really necessary. All you need is `cvtwl rI,rJ'. But all this just goes to demonstrate my original point. The code generation gets messier, and that makes it harder: That is the main reason no one has done it, except maybe Tartan Labs---and they are not exactly giving it away.... -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu