Subject: /lib/c2 bug (+fix)
Index:	lib/c2/c21.c 2.11BSD

Description:
	The sequence:
		
		mov	_bootdev,(sp)
		bic	$177400,(sp)

	is erroneously optimized to:

		bic	$177400,(sp)

	instead of:

		clr	(sp)
		bis	_bootdev,(sp)

Repeat-By:
	/lib/c2
	mov	_bootdev,(sp)
	bic	$177400,(sp)
	^D

Fix:
	Apply this patch to c21.c

	The problem was a missing check for the first operand being
	a register.
-------------------------------------------------------------------------
*** /usr/src/lib/c2/c21.c.old	Mon Feb  3 07:59:37 1992
--- /usr/src/lib/c2/c21.c	Wed Mar 18 02:56:00 1992
***************
*** 145,151 ****
   * because the 'clr' would lose all information about 'rN'.  The best that can 
   * be done is to remove the 'movb' instruction and leave the 'bic'.
  */
! 				    if (isreg(regs[RT1]) == r) {
  					    p = p->back;
  					    p->forw->back = p->back;
  					    p->back->forw = p->forw;
--- 145,151 ----
   * because the 'clr' would lose all information about 'rN'.  The best that can 
   * be done is to remove the 'movb' instruction and leave the 'bic'.
  */
! 				    if (isreg(regs[RT1]) == r && r >= 0) {
  					    p = p->back;
  					    p->forw->back = p->back;
  					    p->back->forw = p->forw;
