bug in cc optimizer

Guy Harris guy at rlgvax.UUCP
Sun Sep 30 17:03:25 AEST 1984


> (Does this REALLY need to go to net.lang.c?  Oh well...)  Guy Harris
> posted a fix for this one long ago.  It seems that Berkeley never
> picked up the fix since the bug is still there in the 4.2BSD /lib/c2.
> Here's RCS diffs.  (Thanks, Guy.)

That diff listing actually includes about 3 bug fixes.  To be fair, the only
one that's actually mine is the one which keeps the optimizer from merging

	cvtwl	(r11)+,r0
	movzbl	r0,r0

into

	movzbl	(r11)+,r0

which sequence gets generated by code like

	register short *sp;
	register int c;

	c = (*sp++)&0377;

The other fixes are the one to the "extzv" instructions, and one that kept
the compiler from merging floating and non-floating convert instructions.

I'm told lots of other fixes posted to net.bugs.4bsd but not mailed to
4bsd-bugs at berkeley haven't been picked up by Berkeley yet.  These bugs exist
in the System III version of the optimizer as well, and some of them might
even still be around in System V Release 2.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.bugs.4bsd.ucb-fixes mailing list