Article View: comp.arch
Article #10388Re: Compilers and efficiency
From: peter da silva
Date: Mon, 22 Apr 1991 14:11
Date: Mon, 22 Apr 1991 14:11
21 lines
1418 bytes
1418 bytes
In article <12740@pt.cs.cmu.edu>, lindsay@gandalf.cs.cmu.edu (Donald Lindsay) writes: > The reason it was easy was because the machine code for a > procedure prologue, contained (get this) a *call* to the runtime > package... The K&R C compiler for the PDP-11 did this, too. And it did returns with a "jmp cret". You want a weird calling convention, try the 1802. A subroutine call is made by changing which register is acting as the PC: all subroutines were coroutines. To get stack calling you set up a pair of call-return subroutines, burned a couple registers as their start address, and called them with SEP 4 and SEP 5. The only machine I know for which Forth (particularly token indirect threaded code) was faster than regular subroutine calls using the Standard Call/Return technique. (I know, you're all tired of me flaming about the 1802. But it was a really CUTE micro. Sort of like a boutique car.) -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"
Technical Details
Message-ID:
<5VWAGK5@xds13.ferranti.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!ficc!peterReferences:
<7184@auspex.auspex.com> <12740@pt.cs.cmu.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.arch Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!ficc!peter From: peter@ficc.ferranti.com (peter da silva) Subject: Re: Compilers and efficiency Message-ID: <5VWAGK5@xds13.ferranti.com> Organization: Ferranti International Controls Corporation References: <7184@auspex.auspex.com> <12740@pt.cs.cmu.edu> Date: Mon, 22 Apr 91 14:11:22 GMT