Changeset 94622 in webkit for trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM.h
- Timestamp:
- Sep 6, 2011, 7:00:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM.h
r90237 r94622 788 788 bool supportsFloatingPointTruncate() const 789 789 { 790 return s_isVFPPresent;790 return false; 791 791 } 792 792 … … 903 903 // If the result is not representable as a 32 bit value, branch. 904 904 // May also branch for some values that are representable in 32 bits 905 // (specifically, in this case, INT_MIN and INT_MAX).905 // (specifically, in this case, INT_MIN). 906 906 Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) 907 907 { 908 m_assembler.vcvtr_s32_f64_r(ARMRegisters::SD0 << 1, src); 909 // If VCVTR.S32.F64 can't fit the result into a 32-bit 910 // integer, it saturates at INT_MAX or INT_MIN. Testing this is 911 // probably quicker than testing FPSCR for exception. 912 m_assembler.vmov_arm_r(dest, ARMRegisters::SD0 << 1); 913 m_assembler.sub_r(ARMRegisters::S0, dest, ARMAssembler::getOp2(0x80000000)); 914 m_assembler.cmn_r(ARMRegisters::S0, ARMAssembler::getOp2(1), ARMCondition(NotEqual)); 915 return Jump(m_assembler.jmp(ARMCondition(Equal))); 908 UNUSED_PARAM(src); 909 UNUSED_PARAM(dest); 910 ASSERT_NOT_REACHED(); 911 return jump(); 916 912 } 917 913
Note:
See TracChangeset
for help on using the changeset viewer.