Portable C Improvements
WILCOX%NOSC-TECR at tgr.UUCP
WILCOX%NOSC-TECR at tgr.UUCP
Wed Feb 27 08:52:27 AEST 1985
Some thoughts for improving the portable C compiler:
(1) Don't force all FCONs to become NAMEs. Some folks may have machines
that permit an FCON, or its ICON binary representation, to be coded as
a field of a machine instruction.
(2) Don't force all FCONs to be double. Often the least-significant
fraction bits permit type float to be used which saves space.
(3) Provide not only for "A" and "B" registers, but also for registers
that are adjacent to particular registers. This comes up on machines
where an ASG MUL operator must use a hardware multiply instruction
that produces a 32-bit product from two 16-bit multiplicands, or a
64-bit product from two 32-bit multiplicands, and the registers are
smaller than 64 bits wide.
(4) Provide a compile #ifdef to select/deselect register-pairing (even
boundary addressing) on registers since not all machines require
registers pairing.
(5) Provide a routine to avoid placing computations into a temporary
register that ultimately are ASSIGNed to a non-temporary register
if they can be done in place within the destination register.
The Sethi-Ullman numbers can help here.
Dwight R. Wilcox
wilcox at nosc-tecr.arpa
------
More information about the Comp.unix.wizards
mailing list