[TUHS] Early Unix function calls: expensive?

John Cowan cowan at mercury.ccil.org
Tue Jan 5 01:09:42 AEST 2016

Norman Wilson scripsit:

> As late as 1990, every UNIX I knew of still used the
> expensive calls/ret instructions for subroutine calls.

Yes, it seems I was thinking of the Lisp calling convention.

> It's possible that current UNIX-descended/cloned systems
> that have VAX ports, like Linux or Open/Free/NetBSD,
> have had a chance to start over and do better on
> subroutine calls and system calls.  Does anyone know?

Easily determined.  The vax.md (machine description) file
uses CALLS, and in any case gcc runs on both Unix and VMS,
so it has to be VMS-compatible, and there is no switch to
use a different calling convention (the VAX port has few
switches at all: there is one to use G-format floats
instead of D-format).

LLVM has no VAX support at all: the llvm-gcc compiler can
compile for the VAX, but only as a cross compiler.

John Cowan          http://www.ccil.org/~cowan        cowan at ccil.org
It's the old, old story.  Droid meets droid.  Droid becomes chameleon.
Droid loses chameleon, chameleon becomes blob, droid gets blob back
again.  It's a classic tale.  --Kryten, Red Dwarf

More information about the TUHS mailing list