🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.sgi.hardware
2 messages
2 total messages Started by Penio Penev Thu, 24 Dec 1992 07:06
R3000 -> R4000 incompatibility?
#10
Author: Penio Penev
Date: Thu, 24 Dec 1992 07:06
29 lines
1620 bytes
Does any one know a reason, why a program, runnng on R3000 would not
run on R4000?

I'm using only ALU, memory and branch instructions. No coprocessor 
(0 or 1), not mul/dev.

The program runs on R3000 (IRIX 4.0.1), but fails on R4000 (4.0.4).
The error is reproducible, occures allways in the same region of the
program, and behaves identically on successive runs. It seems to me
like a jump to a bad address, resulting from a bad value in the $ra
register.The problem is that whenever I put brakepoints "close enough"
and do noting, but cont in them, it disappers.

I have two explanations: 1) I do not fill the load delay slot
properly, which results in jump to garbage. 2) I have made a mistake,
but such a one, that the R3000 hazard (un)handling corrects it.

I tried very hard to get the worng register before the jump, but
apparently I couldn't. As soon as I put a break point, the error
disapperars. 


Has anyone, presumably writing in .set reorder no, seen such
behavioural pattern?

Thanks in advance.

-- Penio.  penev@venezia.rockefeller.edu
Re: R3000 -> R4000 incompatibility?
#36
Author: Dave Olson
Date: Sun, 27 Dec 1992 22:12
40 lines
2432 bytes
In <1992Dec24.070621.2821@sol.ctr.columbia.edu> penev@venezia (Penio Penev) writes:

| Does any one know a reason, why a program, runnng on R3000 would not
| run on R4000?
| 
| I'm using only ALU, memory and branch instructions. No coprocessor 
| (0 or 1), not mul/dev.
| 
| The program runs on R3000 (IRIX 4.0.1), but fails on R4000 (4.0.4).
| The error is reproducible, occures allways in the same region of the
| program, and behaves identically on successive runs. It seems to me
| like a jump to a bad address, resulting from a bad value in the $ra
| register.The problem is that whenever I put brakepoints "close enough"
| and do noting, but cont in them, it disappers.
|
| I have two explanations: 1) I do not fill the load delay slot
| properly, which results in jump to garbage. 2) I have made a mistake,
| but such a one, that the R3000 hazard (un)handling corrects it.

You may be running afoul of a bug in the rev 2.2 part of the r4k, if your
program is either some form of interpreter, or is otherwise executing
out of the data segment.  To work around that bug, branch and jump
instructions must be double word aligned (low 3 bits of address 0).

Your last paragraph above makes it sound like you are generating
instruction streams without the compiler.

The compilers normally work around this, and the kernel has a workaround
for it for pages in the instruction segment (of user programs).

This is fixed in rev 3 of the chip (which we aren't shipping yet, and
may not ship, depending on availability of the r4400, and cost of
qualifying a new chip rev).  It is also fixed in the r4400.

Programs like interpreters have fallen afoul of this problem.
It is documented in the IRIX 4.0.3 and later release notes.
--
Let no one tell me that silence gives consent,  |   Dave Olson
because whoever is silent dissents.             |   Silicon Graphics, Inc.
    Maria Isabel Barreno                        |   olson@sgi.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads