This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: altivec fix for starting_frame_offset


David Edelsohn <dje@watson.ibm.com> writes:

> 	The ABI says that any vector parameters after v2-v13 are passed
> through memory on the stack, 16-byte aligned, after any non-vector
> parameters.

Really?  This sounds like it would cause problems with varargs, when
you don't know the size of the non-vector parameters and so can't skip
over them to find the vector parameters.

I'm thinking here of something like

void foo(int a, int b, int c, int d, int e, int f, int g, int h, int
i, int j, int k, vector int av, vector int bv, vector int cv, vector
int dv, vector int ev, vector int fv, vector int gv, vector int hv,
vector int iv, vector int jv, vector int kv, vector int lv, ...);

you can't easily work out where 'lv' lives, you know it's after 'k'
but you don't know how far after, because you don't know if the '...'
contains any integer parameters.

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]