Index: src/x64/lithium-codegen-x64.cc |
=================================================================== |
--- src/x64/lithium-codegen-x64.cc (revision 6451) |
+++ src/x64/lithium-codegen-x64.cc (working copy) |
@@ -834,7 +834,22 @@ |
void LCodeGen::DoSubI(LSubI* instr) { |
- Abort("Unimplemented: %s", "DoSubI"); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
+ ASSERT(left->Equals(instr->result())); |
+ |
+ if (right->IsConstantOperand()) { |
+ __ subl(ToRegister(left), |
+ Immediate(ToInteger32(LConstantOperand::cast(right)))); |
+ } else if (right->IsRegister()) { |
+ __ subl(ToRegister(left), ToRegister(right)); |
+ } else { |
+ __ subl(ToRegister(left), ToOperand(right)); |
+ } |
+ |
+ if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { |
+ DeoptimizeIf(overflow, instr->environment()); |
+ } |
} |
@@ -1577,7 +1592,8 @@ |
void LCodeGen::DoGlobalObject(LGlobalObject* instr) { |
- Abort("Unimplemented: %s", "DoGlobalObject"); |
+ Register result = ToRegister(instr->result()); |
William Hesse
2011/01/25 11:12:20
GlobalObjectOperand()
|
+ __ movq(result, Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX))); |
} |