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

Unified Diff: src/s390/macro-assembler-s390.cc

Issue 2466573002: [stubs] Fix allocation memento detection. (Closed)
Patch Set: Created 4 years, 1 month 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/macro-assembler-ppc.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/macro-assembler-s390.cc
diff --git a/src/s390/macro-assembler-s390.cc b/src/s390/macro-assembler-s390.cc
index 66c04d2adc72b385adeaac2e338afa66b7b988ed..fbf82ccbc539d38e4bc545205bf5984a28830e61 100644
--- a/src/s390/macro-assembler-s390.cc
+++ b/src/s390/macro-assembler-s390.cc
@@ -3354,7 +3354,8 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
ExternalReference new_space_allocation_top_adr =
ExternalReference::new_space_allocation_top_address(isolate());
const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
- const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize;
+ const int kMementoLastWordOffset =
+ kMementoMapOffset + AllocationMemento::kSize - kPointerSize;
DCHECK(!AreAliased(receiver_reg, scratch_reg));
@@ -3365,7 +3366,7 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
// If the object is in new space, we need to check whether it is on the same
// page as the current top.
- AddP(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
+ AddP(scratch_reg, receiver_reg, Operand(kMementoLastWordOffset));
mov(ip, Operand(new_space_allocation_top_adr));
LoadP(ip, MemOperand(ip));
XorP(r0, scratch_reg, ip);
@@ -3383,7 +3384,7 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
// we are below top.
bind(&top_check);
CmpP(scratch_reg, ip);
- bgt(no_memento_found);
+ bge(no_memento_found);
// Memento map check.
bind(&map_check);
LoadP(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698