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

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

Issue 1170463002: PPC: [date] Refactor the %_DateField intrinsic to be optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/ppc/full-codegen-ppc.cc ('k') | src/ppc/lithium-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/lithium-codegen-ppc.cc
diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc
index 716486ec4e28d161cafd0bc667d4fa98f9941732..11ea4bd0495bbb8ea76ac5655453c07dfceb7bd1 100644
--- a/src/ppc/lithium-codegen-ppc.cc
+++ b/src/ppc/lithium-codegen-ppc.cc
@@ -1923,20 +1923,15 @@ void LCodeGen::DoDateField(LDateField* instr) {
Register result = ToRegister(instr->result());
Register scratch = ToRegister(instr->temp());
Smi* index = instr->index();
- Label runtime, done;
DCHECK(object.is(result));
DCHECK(object.is(r3));
DCHECK(!scratch.is(scratch0()));
DCHECK(!scratch.is(object));
- __ TestIfSmi(object, r0);
- DeoptimizeIf(eq, instr, Deoptimizer::kSmi, cr0);
- __ CompareObjectType(object, scratch, scratch, JS_DATE_TYPE);
- DeoptimizeIf(ne, instr, Deoptimizer::kNotADateObject);
-
if (index->value() == 0) {
__ LoadP(result, FieldMemOperand(object, JSDate::kValueOffset));
} else {
+ Label runtime, done;
if (index->value() < JSDate::kFirstUncachedField) {
ExternalReference stamp = ExternalReference::date_cache_stamp(isolate());
__ mov(scratch, Operand(stamp));
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/ppc/lithium-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698