Article View: gnu.gcc.bug
Article #1987Ooops. More on passing args in regs
From: dlong
Date: Thu, 24 Nov 1988 21:25
Date: Thu, 24 Nov 1988 21:25
39 lines
1264 bytes
1264 bytes
I'm sorry that my last message had a carbon copy of itself at the
bottom. Anyway, I found out that the fix I claimed to have for sparc
does not work. Here is a simpler program to try if your machine
passes some args in registers. Change ARG_REGS to the number of
words passed in registers. On a sun4, it does not print "5 6".
--------------------------cut----------------
#define ARG_REGS 6
struct regs {
int x[ARG_REGS-1];
};
struct straddle {
int x, y;
};
int vss(struct regs, struct straddle);
/* 0 - 5|6 */
/* regs | stack */
main()
{
struct regs r;
struct straddle s;
s.x = 5;
s.y = 6;
vss(r, s);
}
int vss(struct regs r, struct straddle s)
{
printf("%d %d\n", s.x, s.y);
}
----------------------------
Dean Long
dlong%midgard@ucscc.ucsc.edu
Technical Details
Message-ID:
<5556@sdcsvax.UCSD.EDU>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!ucsd!sdcsvax!sequoya.ucsd.edu!dlongShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!ucsd!sdcsvax!sequoya.ucsd.edu!dlong From: dlong@sequoya.ucsd.edu Newsgroups: gnu.gcc.bug Subject: Ooops. More on passing args in regs Message-ID: <5556@sdcsvax.UCSD.EDU> Date: 24 Nov 88 21:25:22 GMT Sender: nobody@sdcsvax.UCSD.EDU Reply-To: dlong@sequoya.ucsd.edu () Distribution: gnu Organization: University of California, San Diego Lines: 39