[8u] RFR: fix java_calling_convention for longs
Edward Nevill
edward.nevill at gmail.com
Mon Mar 14 09:08:42 UTC 2016
Hi Anton,
I see. Thanks for checking that. I will push your patch later.
All the best,
Ed.
On Mon, 2016-03-14 at 09:02 +0000, Anton Kozlov wrote:
> Hi Ed,
>
> Thanks for review! Regarding T_DOUBLE: I beleive that
>
> fp_args = round_to(fp_args, 2); // (3rd line of inlined code)
>
> will guard against descibed situation. If we came here with fp_args ==
> 15, then fp_args will be rounded first to 16 and then checked against
> FP_ArgReg_N boundary.
>
> Java calling convention for floating point arguments looks like integer
> register arguments: adjacent single floats will occupy 2 single
> registers
>
> float, float, float -> f0, f1, f2
>
> But if single float (placed to even single register) will be followed
> by double float, then one single register will not be used
>
> float, double, float -> f0, d1(f3:f2), f4 // f1 not used
>
> Note, that C calling convention is different, it places third argument
> to f1 in last example.
>
> Thanks,
> Anton
>
> On Sun, 2016-03-13 at 15:07 +0000, Edward Nevill wrote:
> > Hi Anton,
> >
> > Thanks for this. Your fix looks correct. Could you also check the
> > code for T_DOUBLE a few lines later.
> >
> >
> > case T_DOUBLE:
> > assert(sig_bt[i + 1] == T_VOID, "expecting half");
> > fp_args = round_to(fp_args, 2);
> > if (fp_args < FP_ArgReg_N) {
> > regs[i].set2(FP_ArgReg[fp_args]->as_VMReg());
> > fp_args += 2;
> > } else {
> > regs[i].set2(VMRegImpl::stack2reg(stk_args));
> > stk_args += 2;
> > }
> > break;
> >
> > Here it would seem then if fp_args was == 15 then it could end up
> > using f15 and f16 which is invalid? It can only do this if there is a
> > mixture of double and float arguments previously.
> >
> > Thanks,
> > Ed.
> >
> >
More information about the aarch32-port-dev
mailing list