[Webkit-unassigned] [Bug 98856] Add moveDoubleToInts and moveIntsToDouble to MacroAssemblerMIPS
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 11 01:32:01 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=98856
--- Comment #10 from Balazs Kilvady <kilvadyb at homejinni.com> 2012-10-11 01:32:40 PST ---
(In reply to comment #9)
> (In reply to comment #1)
> > Well I'm not a MIPS expert, but I was thinking doing something like this:
> >
> > moveIntsToDouble(src_t1, src_t2, dst_fp1):
> > mtc1 src_t1, dst_fp1
> > mthc1 src_t2, dst_fp1
> >
> > moveDoubleToInts(src_fp1, dst_t1, dst_22):
> > mfc1 dst_t1, src_fp1
> > mfhc1 dst_t2, src_fp1
> >
> >
> >
> > This should work (I think at least) if the fp registers are 64bit wide. Am I right?
>
> Yes, but this works only for mips32r2 with -mfp64 compilation.
> Note that -mfp64 is not supported under MIPS Linux O32 ABI (currently).
> All double values occupy two fp registers (eg, $f0 and $f1).
>
> We need a test to guard code.
> Ex: (from in MacroAssemblerMIPS.h)
>
> #if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64
> m_assembler.mtc1(MIPSRegisters::zero, scratch);
> m_assembler.mthc1(MIPSRegisters::zero, scratch);
> #else
> m_assembler.mtc1(MIPSRegisters::zero, scratch);
> m_assembler.mtc1(MIPSRegisters::zero, FPRegisterID(scratch + 1));
> #endif
>
> Thanks!
Thank you for the note, but that was a pseudo code and bot Peter Gal's patch and my patch-set contains this kind of #ifdef guards:
void moveDoubleToInts(FPRegisterID src, RegisterID dest1, RegisterID dest2)
{
#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64
m_assembler.mfc1(dest1, src);
m_assembler.mfhc1(dest2, src);
#else
m_assembler.mfc1(dest1, src);
m_assembler.mfc1(dest2, FPRegisterID(src + 1));
#endif
}
And master with my patch-set successfully compiled for MIPS and the resulted jsc passed the js tests (expect a pending regression which existed before the compilation problem but not with experimental dfg & llint implementation nor in debug compiled jsc).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list