Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site utah-cs.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!mhuxl!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!hao!seismo!utah-cs!4bsd-f77 From: 4bsd-f77@utah-cs.UUCP (4.2 BSD f77 bug reports) Newsgroups: net.lang.f77,net.bugs.4bsd Subject: [4bsd-f77 #35] Minor goof in fix for REAL register variables in f77 Message-ID: <4bsd-f77-35@utah-cs.UUCP> Date: Tue, 28-Aug-84 20:55:33 EDT Article-I.D.: utah-cs.4bsd-f77-35 Posted: Tue Aug 28 20:55:33 1984 Date-Received: Sat, 1-Sep-84 08:30:49 EDT Sender: donn@utah-cs.arpa Organization: University of Utah CS Dept Lines: 66 From: Donn Seeley Subject: Minor goof in earlier fix to allow REAL register variables in f77 Index: usr.bin/f77/src/f77pass1/regalloc.c 4.2BSD Description: The previous fixes to allow 32-bit floating point values to be assigned continuing register variables during DO loops only work if the compiler is made on a VAX, for a VAX. (The article in question is 4bsd-f77 #5, <965@sdchema.UUCP>, 'f77 won't put REAL variables in register'.) This bug was spotted and repaired by Jerry Berkman at UC Berkeley. Repeat-By: I haven't tried building a VAX f77 cross-compiler on some other machine, but that's where the bug would turn up. It's a pretty obvious mistake (sigh). Fix: Here is the entire original fix, with the correction applied (the #if line used to test HERE==VAX instead of TARGET==VAX). This stuff is at the top of f77pass1/regalloc.c: -------------------------------------------------------------------- *************** *** 31,36 #define VARTABSIZE 1009 #define TABLELIMIT 12 #define MSKREGTYPES M(TYLOGICAL) | M(TYADDR) | M(TYSHORT) | M(TYLONG) #define ISREGTYPE(x) ONEOF(x, MSKREGTYPES) --- 34,42 ----- #define VARTABSIZE 1009 #define TABLELIMIT 12 + #if TARGET==VAX + #define MSKREGTYPES M(TYLOGICAL) | M(TYADDR) | M(TYSHORT) | M(TYLONG) | M(TYREAL) + #else #define MSKREGTYPES M(TYLOGICAL) | M(TYADDR) | M(TYSHORT) | M(TYLONG) #endif *************** *** 32,37 #define TABLELIMIT 12 #define MSKREGTYPES M(TYLOGICAL) | M(TYADDR) | M(TYSHORT) | M(TYLONG) #define ISREGTYPE(x) ONEOF(x, MSKREGTYPES) --- 38,44 ----- #define MSKREGTYPES M(TYLOGICAL) | M(TYADDR) | M(TYSHORT) | M(TYLONG) | M(TYREAL) #else #define MSKREGTYPES M(TYLOGICAL) | M(TYADDR) | M(TYSHORT) | M(TYLONG) + #endif #define ISREGTYPE(x) ONEOF(x, MSKREGTYPES) -------------------------------------------------------------------- We all make mistakes, Donn Seeley University of Utah CS Dept donn@utah-cs.arpa 40 46' 6"N 111 50' 34"W (801) 581-5668 decvax!utah-cs!donn