Index: src/x64/lithium-x64.cc |
=================================================================== |
--- src/x64/lithium-x64.cc (revision 6962) |
+++ src/x64/lithium-x64.cc (working copy) |
@@ -1436,8 +1436,18 @@ |
LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
- Abort("Unimplemented: %s", "DoPower"); |
- return NULL; |
+ ASSERT(instr->representation().IsDouble()); |
+ // We call a C function for double power. It can't trigger a GC. |
+ // We need to use fixed result register for the call. |
+ Representation exponent_type = instr->right()->representation(); |
+ ASSERT(instr->left()->representation().IsDouble()); |
+ LOperand* left = UseFixedDouble(instr->left(), xmm1); |
+ LOperand* right = exponent_type.IsDouble() ? |
+ UseFixedDouble(instr->right(), xmm2) : |
+ UseFixed(instr->right(), rax); |
+ LPower* result = new LPower(left, right); |
+ return MarkAsCall(DefineFixedDouble(result, xmm3), instr, |
+ CAN_DEOPTIMIZE_EAGERLY); |
Rico
2011/02/28 19:18:34
I do not see why we request right to be in xmm2 an
|
} |