* Re: regparm guarantee
[not found] <OFB2DF5576.2BDD2954-ON48256DE3.0024ABC4-48256DE3.0024EB57@diamond.philips.com>
@ 2003-11-19 16:07 ` y2bismil
2003-11-19 16:57 ` Kimmo Fredriksson
0 siblings, 1 reply; 4+ messages in thread
From: y2bismil @ 2003-11-19 16:07 UTC (permalink / raw)
To: qinfeng.zhang; +Cc: GCC- help
Hi,
No, its not a problem of variable arguments. There's no problem per se. I'm
just asking if its guaranteed or if its one of those GCC 'hints' that may or may
not be done.
Thanks,
Yamin
Quoting qinfeng.zhang@philips.com:
> Is it the problem of vararg?
>
>
>
>
>
>
>
>
>
>
> y2bismil@engmail.uwaterloo.ca
> Sent by:
> gcc-help-owner@gcc.gnu.org
> 2003-11-19 04:41
>
>
> To: GCC- help <gcc-help@gcc.gnu.org>
> cc: (bcc: Qinfeng Zhang/SHA/RESEARCH/PHILIPS)
> Subject: regparm guarantee
> Classification:
>
>
>
>
>
> I was wondering if by specifying regparam for a function if it is
> GUARANTEED
> that parameters passed to the function will be made via register. I ask
> this as
> I'm interfacing with an assembly written library which links to external
> c-code.
> When the assembly routines call c-function, there are some that are
> stdcall,
> and some pass variables through register (they only pass 1 variable as far
> as I
> can see in EAX).
>
> Is there any way to explicitly say "use EAX for this parameter?"
> >From the wording of the manual under 'function attributes', it doesn't
> appear
> so. But I might guess that it places the 1st paramter in EAX, second in
> EBX,
> then ECX, EDX.
>
> Thanks,
>
> Yamin
>
> ----------------------------------------
> This mail sent through www.mywaterloo.ca
>
>
>
----------------------------------------
This mail sent through www.mywaterloo.ca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: regparm guarantee
2003-11-19 16:07 ` regparm guarantee y2bismil
@ 2003-11-19 16:57 ` Kimmo Fredriksson
2003-11-19 17:24 ` y2bismil
0 siblings, 1 reply; 4+ messages in thread
From: Kimmo Fredriksson @ 2003-11-19 16:57 UTC (permalink / raw)
To: gcc-help; +Cc: y2bismil
On Wed, 19 Nov 2003 y2bismil@engmail.uwaterloo.ca wrote:
> Hi,
>
> No, its not a problem of variable arguments. There's no problem per se. I'm
> just asking if its guaranteed or if its one of those GCC 'hints' that may or may
> not be done.
I suppose it just a hint, that may (will?) be ignored. On the other hand,
see:
http://gcc.gnu.org/onlinedocs/gcc/Explicit-Reg-Vars.html#Explicit%20Reg%20Vars
Kimmo
>
>
> Thanks,
>
> Yamin
>
> Quoting qinfeng.zhang@philips.com:
>
> > Is it the problem of vararg?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > y2bismil@engmail.uwaterloo.ca
> > Sent by:
> > gcc-help-owner@gcc.gnu.org
> > 2003-11-19 04:41
> >
> >
> > To: GCC- help <gcc-help@gcc.gnu.org>
> > cc: (bcc: Qinfeng Zhang/SHA/RESEARCH/PHILIPS)
> > Subject: regparm guarantee
> > Classification:
> >
> >
> >
> >
> >
> > I was wondering if by specifying regparam for a function if it is
> > GUARANTEED
> > that parameters passed to the function will be made via register. I ask
> > this as
> > I'm interfacing with an assembly written library which links to external
> > c-code.
> > When the assembly routines call c-function, there are some that are
> > stdcall,
> > and some pass variables through register (they only pass 1 variable as far
> > as I
> > can see in EAX).
> >
> > Is there any way to explicitly say "use EAX for this parameter?"
> > >From the wording of the manual under 'function attributes', it doesn't
> > appear
> > so. But I might guess that it places the 1st paramter in EAX, second in
> > EBX,
> > then ECX, EDX.
> >
> > Thanks,
> >
> > Yamin
> >
> > ----------------------------------------
> > This mail sent through www.mywaterloo.ca
> >
> >
> >
>
>
>
>
> ----------------------------------------
> This mail sent through www.mywaterloo.ca
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: regparm guarantee
2003-11-19 16:57 ` Kimmo Fredriksson
@ 2003-11-19 17:24 ` y2bismil
0 siblings, 0 replies; 4+ messages in thread
From: y2bismil @ 2003-11-19 17:24 UTC (permalink / raw)
To: Kimmo Fredriksson; +Cc: gcc-help
http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Function-Attributes.html#Function%20Attributes
--regparm
This is the section in question. This is about parameter passing not variable
declaration.
Yamin
Quoting Kimmo Fredriksson <kfredrik@cs.joensuu.fi>:
> On Wed, 19 Nov 2003 y2bismil@engmail.uwaterloo.ca wrote:
>
> > Hi,
> >
> > No, its not a problem of variable arguments. There's no problem per se.
> I'm
> > just asking if its guaranteed or if its one of those GCC 'hints' that may
> or may
> > not be done.
>
> I suppose it just a hint, that may (will?) be ignored. On the other hand,
> see:
>
> http://gcc.gnu.org/onlinedocs/gcc/Explicit-Reg-Vars.html#Explicit%20Reg%20Vars
>
> Kimmo
>
> >
> >
> > Thanks,
> >
> > Yamin
> >
> > Quoting qinfeng.zhang@philips.com:
> >
> > > Is it the problem of vararg?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > y2bismil@engmail.uwaterloo.ca
> > > Sent by:
> > > gcc-help-owner@gcc.gnu.org
> > > 2003-11-19 04:41
> > >
> > >
> > > To: GCC- help <gcc-help@gcc.gnu.org>
> > > cc: (bcc: Qinfeng Zhang/SHA/RESEARCH/PHILIPS)
> > > Subject: regparm guarantee
> > > Classification:
> > >
> > >
> > >
> > >
> > >
> > > I was wondering if by specifying regparam for a function if it is
> > > GUARANTEED
> > > that parameters passed to the function will be made via register. I ask
> > > this as
> > > I'm interfacing with an assembly written library which links to external
> > > c-code.
> > > When the assembly routines call c-function, there are some that are
> > > stdcall,
> > > and some pass variables through register (they only pass 1 variable as
> far
> > > as I
> > > can see in EAX).
> > >
> > > Is there any way to explicitly say "use EAX for this parameter?"
> > > >From the wording of the manual under 'function attributes', it doesn't
> > > appear
> > > so. But I might guess that it places the 1st paramter in EAX, second in
> > > EBX,
> > > then ECX, EDX.
> > >
> > > Thanks,
> > >
> > > Yamin
> > >
> > > ----------------------------------------
> > > This mail sent through www.mywaterloo.ca
> > >
> > >
> > >
> >
> >
> >
> >
> > ----------------------------------------
> > This mail sent through www.mywaterloo.ca
> >
>
----------------------------------------
This mail sent through www.mywaterloo.ca
^ permalink raw reply [flat|nested] 4+ messages in thread
* regparm guarantee
@ 2003-11-18 20:41 y2bismil
0 siblings, 0 replies; 4+ messages in thread
From: y2bismil @ 2003-11-18 20:41 UTC (permalink / raw)
To: GCC- help
I was wondering if by specifying regparam for a function if it is GUARANTEED
that parameters passed to the function will be made via register. I ask this as
I'm interfacing with an assembly written library which links to external c-code.
When the assembly routines call c-function, there are some that are stdcall,
and some pass variables through register (they only pass 1 variable as far as I
can see in EAX).
Is there any way to explicitly say "use EAX for this parameter?"
From the wording of the manual under 'function attributes', it doesn't appear
so. But I might guess that it places the 1st paramter in EAX, second in EBX,
then ECX, EDX.
Thanks,
Yamin
----------------------------------------
This mail sent through www.mywaterloo.ca
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-11-19 17:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <OFB2DF5576.2BDD2954-ON48256DE3.0024ABC4-48256DE3.0024EB57@diamond.philips.com>
2003-11-19 16:07 ` regparm guarantee y2bismil
2003-11-19 16:57 ` Kimmo Fredriksson
2003-11-19 17:24 ` y2bismil
2003-11-18 20:41 y2bismil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).