 Chromium Code Reviews
 Chromium Code Reviews Issue 6532020:
  ARM: Implement DoPower in the lithium code generator.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/src
    
  
    Issue 6532020:
  ARM: Implement DoPower in the lithium code generator.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/src| Index: src/arm/lithium-arm.cc | 
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc | 
| index 786ceeb3cac0b52afa0500645679d174ee08ca5d..1278e98f327451bc672141275973272cfd3df277 100644 | 
| --- a/src/arm/lithium-arm.cc | 
| +++ b/src/arm/lithium-arm.cc | 
| @@ -1418,8 +1418,18 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { | 
| LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 
| - Abort("LPower instruction not implemented on ARM"); | 
| - 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(), d1); | 
| + LOperand* right = exponent_type.IsDouble() ? | 
| + UseFixedDouble(instr->right(), d2) : | 
| + UseFixed(instr->right(), r0); | 
| + LPower* result = new LPower(left, right); | 
| + return MarkAsCall(DefineFixedDouble(result, d3), instr, | 
| 
Søren Thygesen Gjesse
2011/02/17 09:59:56
Please do either
MarkAsCall(
    DefineFixedDouble
 
Karl Klose
2011/02/21 13:34:59
Done.
 | 
| + CAN_DEOPTIMIZE_EAGERLY); | 
| } |