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

Unified Diff: src/x64/macro-assembler-x64.h

Issue 269004: X64: Convert doubles to int32 inline (without calling runtime).
Patch Set: Created 11 years, 2 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/x64/macro-assembler-x64.h
diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h
index adc136a7f8506e411ad260df2481a983d7d69df8..411a5b855983f333706d34e1e9e49ae0b6c51bcb 100644
--- a/src/x64/macro-assembler-x64.h
+++ b/src/x64/macro-assembler-x64.h
@@ -520,6 +520,16 @@ class MacroAssembler: public Assembler {
// occurred.
void IllegalOperation(int num_arguments);
+
+ // Converts a double precission floating point number to a 32-bit
+ // integer. It is equivalent to first converting the double to an
+ // integer by truncation (dropping decimals) and then finding the
+ // remainder modulo 2^32 of the result. Non-numbers like infinites
+ // and NaN are converted to zero.
+ // Uses rcx register as well, and dst can be same register as scratch,
+ // or same register as src, but src and scracth cannot be the same.
+ void DoubleToInteger32(Register dst, Register src, Register scratch);
+
// ---------------------------------------------------------------------------
// Runtime calls

Powered by Google App Engine
This is Rietveld 408576698