Changeset 65993 in webkit for trunk/JavaScriptCore/assembler/MacroAssemblerARM.h
- Timestamp:
- Aug 25, 2010, 12:52:16 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/assembler/MacroAssemblerARM.h
r65303 r65993 770 770 bool supportsFloatingPointTruncate() const 771 771 { 772 return false;772 return s_isVFPPresent; 773 773 } 774 774 … … 879 879 // If the result is not representable as a 32 bit value, branch. 880 880 // May also branch for some values that are representable in 32 bits 881 // (specifically, in this case, INT_MIN ).881 // (specifically, in this case, INT_MIN and INT_MAX). 882 882 Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) 883 883 { 884 UNUSED_PARAM(src); 885 UNUSED_PARAM(dest); 886 ASSERT_NOT_REACHED(); 887 return jump(); 884 m_assembler.vcvtr_s32_f64_r(ARMRegisters::SD0 << 1, src); 885 // If VCVTR.S32.F64 can't fit the result into a 32-bit 886 // integer, it saturates at INT_MAX or INT_MIN. Testing this is 887 // probably quicker than testing FPSCR for exception. 888 m_assembler.vmov_arm_r(dest, ARMRegisters::SD0 << 1); 889 m_assembler.sub_r(ARMRegisters::S0, dest, ARMAssembler::getOp2(0x80000000)); 890 m_assembler.cmn_r(ARMRegisters::S0, ARMAssembler::getOp2(1), ARMCondition(NotEqual)); 891 return Jump(m_assembler.jmp(ARMCondition(Equal))); 888 892 } 889 893
Note:
See TracChangeset
for help on using the changeset viewer.