🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #32596

Bug in MWC 3.0 -VPEEP

#32596
From: Jwahar R. Bammi
Date: Thu, 19 May 1988 00:11
39 lines
1538 bytes
The following C code shows up a bug in MWC V3.0.6 when using the
 -VPEEP option.

typedef struct _list { int value; struct _list *next; } LIST;
	.....
	register LIST *p, *q;

	q = p;
	p = p->next;
	if(p)
		p = q;
---------
		  p is a5     q is a4

	No -VPEEP		-VPEEP

	movea.l	a5, a4		movea.l	a5, a4
	movea.l	2(a5), a5	movea.l	2(a5), a5
	move.l	a5, -4(a6)	move.l	a5, -4(a6) <--This line not eliminated
	move.l	-4(a6), d0	move.l	a4, d0 <---SHOULD BE move.l a5,d0
	beq.s	L1		beq.s	L1
	movea.l	a4, a5		movea.l	a4, a5
L1:			    L1:
----------
	the sequence
		move.l a5, -4(a6)
		move.l -4(a6),d0
	should be peephole optimized to
		move.l a5,d0

In the cases when correct code is generated, it still does not remove
the first extraneous move.l a5,-4(a6) instruction.

The upgrade is defintly worth it. Csd is really worth it. BTW GULAM
users may have noticed that Csd looks at the PATH environment variable.
If your PATH does not have `.' in it, Csd does not find the executable
program (if it is in the current directory), and exits with error
code -33 (file not found). If PATH has `.' in it, CSD works great.
Technical Details
Message-ID: <2482@mandrill.CWRU.Edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mandrill!bammi

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mandrill!bammi
From: bammi@mandrill (Jwahar R. Bammi)
Newsgroups: comp.sys.atari.st
Subject: Bug in MWC 3.0 -VPEEP
Message-ID: <2482@mandrill.CWRU.Edu>
Date: 19 May 88 00:11:12 GMT
Sender: bammi@mandrill.CWRU.Edu
Reply-To: bammi@mandrill (Jwahar R. Bammi)
Organization: Case Western Reserve University
Lines: 39