Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!cottrell@nbs-vms.arpa From: cottrell@nbs-vms.arpa (COTTRELL, JAMES) Newsgroups: net.lang.c Subject: Code Generation Message-ID: <3457@brl-tgr.ARPA> Date: Wed, 20-Nov-85 17:42:11 EST Article-I.D.: brl-tgr.3457 Posted: Wed Nov 20 17:42:11 1985 Date-Received: Sat, 23-Nov-85 01:49:30 EST Sender: news@brl-tgr.ARPA Lines: 22 /* 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. To put it another way, write a fragment of code using ints, run it thru `cc -S'. Then change the `ints' to `shorts'. Now I claim I should be able to get equivalent (more efficient tho) code merely by changing the flavors of the instruxions from `long' to `word'. Prove me wrong. jim cottrell@nbs */ ------