[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Re: Any hppa gurus?



> >
> > Which means you can no longer place float/double arguments into general
> > register.
> 
> I suspected this might be the case.
> 
> > What does the av_alist structure look like? If it has a 'type' per
> > argument, it it shouldn't be too hard to write the code.
> 
> Nope. :)
> Is it OK to push the args into fp registers even if they are not fp values
> and I don't need them? I thought maybe I could just load the first four
> values into fr* and gr* and call the routine. Doubles should be OK - they're
> represented as two words in the list.
>

It's okay to put anything into any register.

But your solution won't work:

double -> gr26,25 -> fr7,5
long   -> gr24,23 -> fr4,3
The rest on stack.

Where the other side will be looking for:

double -> fr7,5
long   -> gr26,25
The rest on stack.

Without knowing the type you can't get it right.
Without the compiler knowing the type it can't
help you get it right.

Woah! Wait a second, this is code from AVCALL!
Why didn't I notice this... it's such a nice day
outside for a walk :)

This isn't going to be a simple copy and past port
from HPUX. You will need what most other architectures
have: Entries for farg's so that floating arguments
are passed in another array.

If you look at avcall.h.in around line 325 you'll see
what other architectures are doing with the av_alist
structure.

--

Stick the double into memory.
Then:

	fldds 0(%rX),%frY

Where %rX points to said double and frY is the floating
point register you want to load. I recommend reading up
on fldds (alignment and which registers get written).

--

Good luck! Tell me how it goes :)

c. 


-- 
To UNSUBSCRIBE, email to debian-hppa-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: