summaryrefslogtreecommitdiff
path: root/deps/v8/src/arm64/deoptimizer-arm64.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/arm64/deoptimizer-arm64.cc')
-rw-r--r--deps/v8/src/arm64/deoptimizer-arm64.cc50
1 files changed, 9 insertions, 41 deletions
diff --git a/deps/v8/src/arm64/deoptimizer-arm64.cc b/deps/v8/src/arm64/deoptimizer-arm64.cc
index 397f4cb36d..b2f534ac45 100644
--- a/deps/v8/src/arm64/deoptimizer-arm64.cc
+++ b/deps/v8/src/arm64/deoptimizer-arm64.cc
@@ -155,7 +155,7 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ Tst(x1, kSmiTagMask);
__ CzeroX(x0, eq);
- __ Mov(x1, type());
+ __ Mov(x1, static_cast<int>(deopt_kind()));
// Following arguments are already loaded:
// - x2: bailout id
// - x3: code object address
@@ -275,50 +275,18 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ Br(continuation);
}
-// Size of an entry of the second level deopt table.
-// This is the code size generated by GeneratePrologue for one entry.
-const int Deoptimizer::table_entry_size_ = kInstructionSize;
+// Size of an entry of the second level deopt table. Since we do not generate
+// a table for ARM64, the size is zero.
+const int Deoptimizer::table_entry_size_ = 0 * kInstructionSize;
void Deoptimizer::TableEntryGenerator::GeneratePrologue() {
UseScratchRegisterScope temps(masm());
- // The address at which the deopt table is entered should be in x16, the first
- // temp register allocated. We can't assert that the address is in there, but
- // we can check that it's the first allocated temp. Later, we'll also check
- // the computed entry_id is in the expected range.
- Register entry_addr = temps.AcquireX();
+ // The MacroAssembler will have put the deoptimization id in x16, the first
+ // temp register allocated. We can't assert that the id is in there, but we
+ // can check that x16 the first allocated temp and that the value it contains
+ // is in the expected range.
Register entry_id = temps.AcquireX();
- DCHECK(entry_addr.Is(x16));
- DCHECK(entry_id.Is(x17));
-
- // Create a sequence of deoptimization entries.
- // Note that registers are still live when jumping to an entry.
- {
- InstructionAccurateScope scope(masm());
-
- Label start_of_table, end_of_table;
- __ bind(&start_of_table);
- for (int i = 0; i < count(); i++) {
- int start = masm()->pc_offset();
- USE(start);
- __ b(&end_of_table);
- DCHECK(masm()->pc_offset() - start == table_entry_size_);
- }
- __ bind(&end_of_table);
-
- // Get the address of the start of the table.
- DCHECK(is_int21(table_entry_size_ * count()));
- __ adr(entry_id, &start_of_table);
-
- // Compute the gap in bytes between the entry address, which should have
- // been left in entry_addr (x16) by CallForDeoptimization, and the start of
- // the table.
- __ sub(entry_id, entry_addr, entry_id);
-
- // Shift down to obtain the entry_id.
- DCHECK_EQ(table_entry_size_, kInstructionSize);
- __ lsr(entry_id, entry_id, kInstructionSizeLog2);
- }
-
+ DCHECK(entry_id.Is(x16));
__ Push(padreg, entry_id);
if (__ emit_debug_code()) {