Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index 784b8d4e169fc117bf0779a82bc77c148c257d4d..fee2f4f2ab98bbfd2351e821a920e3271608c5f2 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -1,4 +1,4 @@ |
-// Copyright 2011 the V8 project authors. All rights reserved. |
+// Copyright 2012 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -1415,6 +1415,19 @@ LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
} |
+LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { |
+ ASSERT(instr->representation().IsDouble()); |
+ ASSERT(instr->global_object()->representation().IsTagged()); |
+#ifdef _WIN64 |
+ LOperand* global_object = UseFixed(instr->global_object(), rcx); |
+#else |
+ LOperand* global_object = UseFixed(instr->global_object(), rdi); |
+#endif |
+ LRandom* result = new LRandom(global_object); |
+ return MarkAsCall(DefineFixedDouble(result, xmm1), instr); |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
ASSERT(instr->left()->representation().IsTagged()); |
ASSERT(instr->right()->representation().IsTagged()); |