altivec fix for starting_frame_offset

Geoff Keating geoffk@geoffk.org
Wed Feb 27 15:00:00 GMT 2002


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>



More information about the Gcc-patches mailing list