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

Unified Diff: src/crankshaft/s390/lithium-codegen-s390.cc

Issue 2122953002: [crankshaft] do not restore rsi in stub for deferred number conversions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing register overlap on arm64 Created 4 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/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/s390/lithium-codegen-s390.cc
diff --git a/src/crankshaft/s390/lithium-codegen-s390.cc b/src/crankshaft/s390/lithium-codegen-s390.cc
index bd36b45e355050b1e3247e2ea25afd60c3c4285e..cc96da5c663e7c9617d022976b6407cb5f044a89 100644
--- a/src/crankshaft/s390/lithium-codegen-s390.cc
+++ b/src/crankshaft/s390/lithium-codegen-s390.cc
@@ -4666,13 +4666,10 @@ void LCodeGen::DoDeferredNumberTagIU(LInstruction* instr, LOperand* value,
// Preserve the value of all registers.
PushSafepointRegistersScope scope(this);
-
- // NumberTagI and NumberTagD use the context from the frame, rather than
- // the environment's HContext or HInlinedContext value.
- // They only call Runtime::kAllocateHeapNumber.
- // The corresponding HChange instructions are added in a phase that does
- // not have easy access to the local context.
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ // Reset the context register.
+ if (!dst.is(cp)) {
+ __ LoadImmP(cp, Operand::Zero());
+ }
__ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
RecordSafepointWithRegisters(instr->pointer_map(), 0,
Safepoint::kNoLazyDeopt);
@@ -4722,12 +4719,10 @@ void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) {
__ LoadImmP(reg, Operand::Zero());
PushSafepointRegistersScope scope(this);
- // NumberTagI and NumberTagD use the context from the frame, rather than
- // the environment's HContext or HInlinedContext value.
- // They only call Runtime::kAllocateHeapNumber.
- // The corresponding HChange instructions are added in a phase that does
- // not have easy access to the local context.
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ // Reset the context register.
+ if (!reg.is(cp)) {
+ __ LoadImmP(cp, Operand::Zero());
+ }
__ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
RecordSafepointWithRegisters(instr->pointer_map(), 0,
Safepoint::kNoLazyDeopt);
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698