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

Unified Diff: src/ia32/lithium-ia32.cc

Issue 18712002: Convert UnaryOpStub to a HydrogenCodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address review Created 7 years, 5 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 | « src/ia32/lithium-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index 8231c4e8b718f8479ca90c1e329f3a9b725eaa29..c16ada1afbf3a49bb40722a0b18841f9b7288c58 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -1578,7 +1578,17 @@ LInstruction* LChunkBuilder::DoMul(HMul* instr) {
}
return DefineSameAsFirst(mul);
} else if (instr->representation().IsDouble()) {
- return DoArithmeticD(Token::MUL, instr);
+ if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ return DoArithmeticD(Token::MUL, instr);
+ }
+ ASSERT(instr->right()->IsConstant() &&
+ static_cast<HConstant*>(instr->right())->DoubleValue() == -1);
+ // TODO(olivf) This is currently just a hack to support the UnaryOp Minus
+ // Stub. This will go away once we can use more than one X87 register,
+ // thus fully support binary instructions without SSE2.
+ LOperand* left = UseX87TopOfStack(instr->left());
+ LNegateNoSSE2D* result = new(zone()) LNegateNoSSE2D(left);
+ return DefineX87TOS(result);
} else {
ASSERT(instr->representation().IsSmiOrTagged());
return DoArithmeticT(Token::MUL, instr);
@@ -2038,6 +2048,18 @@ LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) {
}
+LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
+ LOperand* value = UseRegisterAtStart(instr->value());
+ return AssignEnvironment(new(zone()) LCheckSmi(value));
+}
+
+
+LInstruction* LChunkBuilder::DoIsNumberAndBranch(HIsNumberAndBranch* instr) {
+ return new(zone())
+ LIsNumberAndBranch(UseRegisterOrConstantAtStart(instr->value()));
+}
+
+
LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
LOperand* value = UseRegisterAtStart(instr->value());
LOperand* temp = TempRegister();
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698