@@ -434,8 +434,9 @@ void StubCodeCompiler::GenerateBuildMethodExtractorStub(
434
434
RSI, // end address
435
435
RDI);
436
436
__ movq (RSI, Address (THR, target::Thread::object_null_offset ()));
437
- __ movq (FieldAddress (RAX, target::Context::parent_offset ()), RSI);
438
- __ movq (FieldAddress (RAX, target::Context::num_variables_offset ()),
437
+ __ StoreCompressedIntoObjectNoBarrier (
438
+ RAX, FieldAddress (RAX, target::Context::parent_offset ()), RSI);
439
+ __ movl (FieldAddress (RAX, target::Context::num_variables_offset ()),
439
440
Immediate (1 ));
440
441
__ jmp (&done);
441
442
}
@@ -455,10 +456,11 @@ void StubCodeCompiler::GenerateBuildMethodExtractorStub(
455
456
// Store receiver in context
456
457
__ movq (AllocateClosureABI::kScratchReg ,
457
458
Address (RBP, target::kWordSize * kReceiverOffsetInWords ));
458
- __ StoreIntoObject (AllocateClosureABI::kContextReg ,
459
- FieldAddress (AllocateClosureABI::kContextReg ,
460
- target::Context::variable_offset (0 )),
461
- AllocateClosureABI::kScratchReg );
459
+ __ StoreCompressedIntoObject (
460
+ AllocateClosureABI::kContextReg ,
461
+ FieldAddress (AllocateClosureABI::kContextReg ,
462
+ target::Context::variable_offset (0 )),
463
+ AllocateClosureABI::kScratchReg );
462
464
463
465
// Pop function.
464
466
__ popq (AllocateClosureABI::kFunctionReg );
@@ -1420,7 +1422,8 @@ static void GenerateAllocateContextSpaceStub(Assembler* assembler,
1420
1422
intptr_t fixed_size_plus_alignment_padding =
1421
1423
(target::Context::header_size () +
1422
1424
target::ObjectAlignment::kObjectAlignment - 1 );
1423
- __ leaq (R13, Address (R10, TIMES_8, fixed_size_plus_alignment_padding));
1425
+ __ leaq (R13, Address (R10, TIMES_COMPRESSED_WORD_SIZE,
1426
+ fixed_size_plus_alignment_padding));
1424
1427
__ andq (R13, Immediate (-target::ObjectAlignment::kObjectAlignment ));
1425
1428
1426
1429
// Check for allocation tracing.
@@ -1454,7 +1457,8 @@ static void GenerateAllocateContextSpaceStub(Assembler* assembler,
1454
1457
// R10: number of context variables.
1455
1458
{
1456
1459
Label size_tag_overflow, done;
1457
- __ leaq (R13, Address (R10, TIMES_8, fixed_size_plus_alignment_padding));
1460
+ __ leaq (R13, Address (R10, TIMES_COMPRESSED_WORD_SIZE,
1461
+ fixed_size_plus_alignment_padding));
1458
1462
__ andq (R13, Immediate (-target::ObjectAlignment::kObjectAlignment ));
1459
1463
__ cmpq (R13, Immediate (target::UntaggedObject::kSizeTagMaxSizeTag ));
1460
1464
__ j (ABOVE, &size_tag_overflow, Assembler::kNearJump );
@@ -1478,7 +1482,7 @@ static void GenerateAllocateContextSpaceStub(Assembler* assembler,
1478
1482
// Setup up number of context variables field.
1479
1483
// RAX: new object.
1480
1484
// R10: number of context variables as integer value (not object).
1481
- __ movq (FieldAddress (RAX, target::Context::num_variables_offset ()), R10);
1485
+ __ movl (FieldAddress (RAX, target::Context::num_variables_offset ()), R10);
1482
1486
}
1483
1487
1484
1488
// Called for inline allocation of contexts.
@@ -1499,7 +1503,7 @@ void StubCodeCompiler::GenerateAllocateContextStub(Assembler* assembler) {
1499
1503
// RAX: new object.
1500
1504
// R9: Parent object, initialised to null.
1501
1505
// No generational barrier needed, since we are storing null.
1502
- __ StoreIntoObjectNoBarrier (
1506
+ __ StoreCompressedIntoObjectNoBarrier (
1503
1507
RAX, FieldAddress (RAX, target::Context::parent_offset ()), R9);
1504
1508
1505
1509
// Initialize the context variables.
@@ -1517,7 +1521,8 @@ void StubCodeCompiler::GenerateAllocateContextStub(Assembler* assembler) {
1517
1521
__ Bind (&loop);
1518
1522
__ decq (R10);
1519
1523
// No generational barrier needed, since we are storing null.
1520
- __ StoreIntoObjectNoBarrier (RAX, Address (R13, R10, TIMES_8, 0 ), R9);
1524
+ __ StoreCompressedIntoObjectNoBarrier (
1525
+ RAX, Address (R13, R10, TIMES_COMPRESSED_WORD_SIZE, 0 ), R9);
1521
1526
__ Bind (&entry);
1522
1527
__ cmpq (R10, Immediate (0 ));
1523
1528
__ j (NOT_EQUAL, &loop, Assembler::kNearJump );
@@ -1567,11 +1572,11 @@ void StubCodeCompiler::GenerateCloneContextStub(Assembler* assembler) {
1567
1572
GenerateAllocateContextSpaceStub (assembler, &slow_case);
1568
1573
1569
1574
// Load parent in the existing context.
1570
- __ movq (R13, FieldAddress (R9, target::Context::parent_offset ()));
1575
+ __ LoadCompressed (R13, FieldAddress (R9, target::Context::parent_offset ()));
1571
1576
// Setup the parent field.
1572
1577
// RAX: new object.
1573
1578
// R9: Old parent object.
1574
- __ StoreIntoObjectNoBarrier (
1579
+ __ StoreCompressedIntoObjectNoBarrier (
1575
1580
RAX, FieldAddress (RAX, target::Context::parent_offset ()), R13);
1576
1581
1577
1582
// Clone the context variables.
@@ -1582,11 +1587,12 @@ void StubCodeCompiler::GenerateCloneContextStub(Assembler* assembler) {
1582
1587
__ jmp (&entry, Assembler::kNearJump );
1583
1588
__ Bind (&loop);
1584
1589
__ decq (R10);
1585
- __ movq (R13, FieldAddress (R9, R10, TIMES_8 ,
1586
- target::Context::variable_offset (0 )));
1587
- __ StoreIntoObjectNoBarrier (
1590
+ __ LoadCompressed (R13, FieldAddress (R9, R10, TIMES_COMPRESSED_WORD_SIZE ,
1591
+ target::Context::variable_offset (0 )));
1592
+ __ StoreCompressedIntoObjectNoBarrier (
1588
1593
RAX,
1589
- FieldAddress (RAX, R10, TIMES_8, target::Context::variable_offset (0 )),
1594
+ FieldAddress (RAX, R10, TIMES_COMPRESSED_WORD_SIZE,
1595
+ target::Context::variable_offset (0 )),
1590
1596
R13);
1591
1597
__ Bind (&entry);
1592
1598
__ cmpq (R10, Immediate (0 ));
0 commit comments