[Webkit-unassigned] [Bug 98856] Add moveDoubleToInts and moveIntsToDouble to MacroAssemblerMIPS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 10 12:17:43 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=98856





--- Comment #9 from Chao-ying Fu <fu at mips.com>  2012-10-10 12:18:21 PST ---
(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!

-- 
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