Chromium Code Reviews| Index: src/arm/lithium-codegen-arm.h |
| =================================================================== |
| --- src/arm/lithium-codegen-arm.h (revision 7092) |
| +++ src/arm/lithium-codegen-arm.h (working copy) |
| @@ -215,6 +215,35 @@ |
| void DoMathCos(LUnaryMathOperation* instr); |
| void DoMathSin(LUnaryMathOperation* instr); |
| + // Helpers for math operations. |
| + |
| + // Helper for EmitECMATruncate. |
| + // Tries to truncate using a vcvt instruction. |
| + enum TruncationType { |
| + kUnsignedTruncation, |
| + kSignedTruncation |
| + }; |
| + |
| + void TryVcvtTruncation(Register result, |
| + DwVfpRegister double_input, |
| + Register saved_fpscr, |
| + Register current_fpscr, |
| + SwVfpRegister single_scratch, |
| + TruncationType type, |
| + Label* success); |
| + |
| + // Performs a truncating conversion of a floating point number as used by |
| + // the JS bitwise operations. See ECMA-262 9.5: ToInt32. |
| + // Jumps to the 'done' label if the truncation is successful, and falls |
| + // through if it was not. |
| + void EmitECMATruncate(Register result, |
| + Register scratch1, |
| + Register scratch2, |
| + DwVfpRegister double_input, |
| + DwVfpRegister double_scratch1, |
| + DwVfpRegister double_scratch2, |
| + Label* done); |
|
Karl Klose
2011/03/09 10:37:51
These functions should perhaps be in the macro ass
Alexandre
2011/03/15 08:45:39
Done.
|
| + |
| // Support for recording safepoint and position information. |
| void RecordSafepoint(LPointerMap* pointers, |
| Safepoint::Kind kind, |