🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50637

How to work around lack of destination scoreboarding

#50637
From: C-Cube Microsystems
Date: Fri, 27 Aug 1993 17:35
34 lines
1607 bytes
We have designed a chip that does not have scoreboarding for destination
registers.  Without going into why, let's just say that we are stuck with
what we've got.

So in the case where the destination of the load is a source in a
subsequent instruction:

	load (addr, r1)		// r1 <- MEM[addr]
	...
	add (r1, r2, r3)	// r3 <- r1 + r2

The scoreboarding jumps in and stalls until r1 is loaded.

However, in the case where the destination of the load is a destination
in a subsequent instruction:

	load (addr, r1)		// r1 <- MEM[addr]
	...
	add (r3, r2, r1)	// r1 <- r3 + r2

The scoreboarding ignores this hazard and sometimes r1 gets the value of
MEM[addr] and sometimes r1 gets the value of (r3 + r2).

Is there any feature in GCC that can help solve this problem?

My first order guess is that there could be an RTL pass that checks for
this hazard and emit an extra mov(r1, r1) to help ensure that the load()
finishes.

Ernest Hua
C-Cube Microsystems
eh@c-cube.com
408-944-6340
Technical Details
Message-ID: <c3CCFI70.ApA@netcom.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!elroy.jpl.nasa.gov!decwrl!netcomsv!netcom.com!c3

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,cd6d601a9a773b0a,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-08-27 11:06:21 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!elroy.jpl.nasa.gov!decwrl!netcomsv!netcom.com!c3
From: c3@netcom.com (C-Cube Microsystems)
Subject: How to work around lack of destination scoreboarding
Message-ID: <c3CCFI70.ApA@netcom.com>
Organization: NETCOM On-line Communication Services (408 241-9760 guest)
Date: Fri, 27 Aug 1993 17:35:23 GMT
Lines: 34