🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #13632

An idea I'm kicking around

#13632
From: ccplumb
Date: Wed, 15 Apr 1987 18:27
29 lines
1927 bytes
  I've been dreaming up A RISCy architecture in my spare time, and in the
course of trying to minimize the number of memory accesses per instruction,
I ran into the problem of handling JSR's.  A branch already requires an
extra fetch to fill the pipeline, and adding a stack push would make things
ugly.

What if JSR moved the return address into another register?  If the register
was R0 (A register hardwired with the constant 0), you'd have a JMP.  To nest
JSR's, the called procedure would need to save this register, but it needs to
save registers for locals anyway, so it shouldn't be too much of a hassle.
As far as a compiler is concerned, the return register is just another reg
that's trashed by all function calls and needs to be restored before exit.

Also, if you were really tricky, you could nest a few levels without saving
any registers at all.  Caller and Callee need to agree on which register is
used to pass the return address, but if the calling sequence is known, you
can set up a different convention for every level of nesting.

I suppose if register windows were used, this idea would correspond to putting
the PC into the moveable window.

I'me sending this out for comment.  Are there any really serious bugs in it?
Would it be really wonderful?  Thanks for any advice.
--
	-Colin Plumb (watmath!watnot!ccplumb)

Silly quote:
There's a flaw in the ointment.
Technical Details
Message-ID: <12884@watnot.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!ccplumb

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!ccplumb
From: ccplumb@watnot.UUCP
Newsgroups: comp.arch
Subject: An idea I'm kicking around
Message-ID: <12884@watnot.UUCP>
Date: Wed, 15-Apr-87 13:27:35 EST
Article-I.D.: watnot.12884
Posted: Wed Apr 15 13:27:35 1987
Date-Received: Thu, 16-Apr-87 01:47:17 EST
Reply-To: watmath!watnot!ccplumb (Colin Plumb)
Distribution: comp
Organization: U of Waterloo, Ontario
Lines: 29
Confusion: U. of Waterloo, Ontario