Aucbvax.6862 fa.info-vax utzoo!decvax!ucbvax!info-vax Thu Apr 22 10:58:50 1982 C compiler code generation >From KASHTAN@SRI-AI Thu Apr 22 10:49:50 1982 Thought you might be interested in what the DEC "C" compiler did on those examples. "C" program using double floats: Detected that a constant was being added and generated a series of " addf2 #const,register" instructions. "C" program using ints: Detected that the constant was 1 and just generated a series of " incl register" instructions It also detected a constant number of iterations in the loop and did loop control with an " aobleq" instruction. "PASCAL" program: The DEC Pascal compiler did poorly, generating things of the form: " addf3 register,variable,register2" " movf register2,variable" Win a few, lose a few. David ------- ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.