Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: src/arm/lithium-codegen-arm.h

Issue 6625084: ARM: Improved double to integer truncation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698