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

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 6324011: Implement x64 lithium instructions DoGlobalObject and DoSub (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('j') | src/x64/lithium-x64.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
}
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('j') | src/x64/lithium-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698