Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!oliveb!pyramid!csg From: csg@pyramid.pyramid.com (Carl S. Gutekunst) Newsgroups: comp.sys.pyramid Subject: Re: More on Pyramid's not so non-standard C compiler Message-ID: <79777@pyramid.pyramid.com> Date: 4 Aug 89 16:51:13 GMT References: <239@massey.ac.nz> Reply-To: csg@pyramid.pyramid.com (Carl S. Gutekunst) Organization: Pyramid Technology Corp., Mountain View, CA Lines: 23 In article <239@massey.ac.nz> K.Spagnolo@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.