More on Pyramid's not so non-standard C compiler

Carl S. Gutekunst csg at pyramid.pyramid.com
Sat Aug 5 02:51:13 AEST 1989


In article <239 at massey.ac.nz> K.Spagnolo at massey.ac.nz (Ken Spagnolo) writes:
>When I started working on this Pyramid in January, I was told that it passes
>structures differently.  Yes, I'm not the only one!

Well, it *does* pass them differently -- the Pyramid has two stacks, one a
data stack and the other a register file. In traditional "VAX-like" machines,
you'd pass all variables on the data stack. On the Pyramid, scalars go on the
register file, and structs go on the stack. What this means is the certain
entirely illegal games with parameter passage that "work" on the VAX, 68000,
and 3B2 result in disaster on a Pyramid. And on a SPARC, too for that matter.
Chris Torek gave a good example.

But syntactically and semantically it works exactly like every other machine.

>Can anyone explain why I've gotten away with this for so long?

Sure. If you don't modify the structure, then it doesn't make any difference.

What I am curious about is how you declared your structures in the called
function. There is a big difference between `.' and `->'. By E-mail, though;
we've already cluttered up the net too much.

<csg>



More information about the Comp.sys.pyramid mailing list