[4bsd-f77 #35] Minor goof in fix for REAL register variables in f77
4.2 BSD f77 bug reports
4bsd-f77 at utah-cs.UUCP
Wed Aug 29 10:55:33 AEST 1984
From: Donn Seeley <donn at utah-cs.arpa>
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 at 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 at utah-cs.arpa
40 46' 6"N 111 50' 34"W (801) 581-5668 decvax!utah-cs!donn
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list