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

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

Issue 1641083003: [builtins] Make Math.max and Math.min fast by default. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: SKIP unrelated ignition failures. Created 4 years, 11 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 695e243c18d2c90ddf0c67f5086b07d907b94e1d..85b795e9ff627e662572435b7a6cbb92eef25d10 100644
--- a/src/x64/macro-assembler-x64.h
+++ b/src/x64/macro-assembler-x64.h
@@ -427,6 +427,12 @@ class MacroAssembler: public Assembler {
void SmiToInteger64(Register dst, Register src);
void SmiToInteger64(Register dst, const Operand& src);
+ // Convert smi to double.
+ void SmiToDouble(XMMRegister dst, Register src) {
+ SmiToInteger32(kScratchRegister, src);
+ Cvtlsi2sd(dst, kScratchRegister);
+ }
+
// Multiply a positive smi's integer value by a power of two.
// Provides result as 64-bit integer value.
void PositiveSmiTimesPowerOfTwoToInteger64(Register dst,

Powered by Google App Engine
This is Rietveld 408576698