Skip to content

Commit 5d93de3

Browse files
mkustermanncommit-bot@chromium.org
authored andcommitted
[vm/compiler] Use pc-relative calls to various stubs by moving the stubs to the isolate
This reduces flutter gallery total size by: * armv7: -0.09% * armv8: -0.14% It also cleans up quite a bit of code. Change-Id: Ieea9fd74af88b2b196d4f21e54ca59f782140af9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142622 Commit-Queue: Martin Kustermann <[email protected]> Reviewed-by: Tess Strickland <[email protected]>
1 parent 4b6864f commit 5d93de3

File tree

7 files changed

+0
-77
lines changed

7 files changed

+0
-77
lines changed

assembler_arm.cc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,27 +2752,6 @@ void Assembler::BranchLinkToRuntime() {
27522752
blx(IP);
27532753
}
27542754

2755-
void Assembler::CallNullErrorShared(bool save_fpu_registers) {
2756-
uword entry_point_offset =
2757-
save_fpu_registers
2758-
? target::Thread::null_error_shared_with_fpu_regs_entry_point_offset()
2759-
: target::Thread::
2760-
null_error_shared_without_fpu_regs_entry_point_offset();
2761-
ldr(LR, Address(THR, entry_point_offset));
2762-
blx(LR);
2763-
}
2764-
2765-
void Assembler::CallNullArgErrorShared(bool save_fpu_registers) {
2766-
const uword entry_point_offset =
2767-
save_fpu_registers
2768-
? target::Thread::
2769-
null_arg_error_shared_with_fpu_regs_entry_point_offset()
2770-
: target::Thread::
2771-
null_arg_error_shared_without_fpu_regs_entry_point_offset();
2772-
ldr(LR, Address(THR, entry_point_offset));
2773-
blx(LR);
2774-
}
2775-
27762755
void Assembler::BranchLinkWithEquivalence(const Code& target,
27772756
const Object& equivalence,
27782757
CodeEntryKind entry_kind) {

assembler_arm.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,6 @@ class Assembler : public AssemblerBase {
735735
CodeEntryKind entry_kind = CodeEntryKind::kNormal);
736736
void BranchLinkToRuntime();
737737

738-
void CallNullErrorShared(bool save_fpu_registers);
739-
740-
void CallNullArgErrorShared(bool save_fpu_registers);
741-
742738
// Branch and link to an entry address. Call sequence can be patched.
743739
void BranchLinkPatchable(const Code& code,
744740
CodeEntryKind entry_kind = CodeEntryKind::kNormal);

assembler_arm64.cc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -651,27 +651,6 @@ void Assembler::BranchLinkWithEquivalence(const Code& target,
651651
blr(TMP);
652652
}
653653

654-
void Assembler::CallNullErrorShared(bool save_fpu_registers) {
655-
uword entry_point_offset =
656-
save_fpu_registers
657-
? target::Thread::null_error_shared_with_fpu_regs_entry_point_offset()
658-
: target::Thread::
659-
null_error_shared_without_fpu_regs_entry_point_offset();
660-
ldr(LR, Address(THR, entry_point_offset));
661-
blr(LR);
662-
}
663-
664-
void Assembler::CallNullArgErrorShared(bool save_fpu_registers) {
665-
const uword entry_point_offset =
666-
save_fpu_registers
667-
? target::Thread::
668-
null_arg_error_shared_with_fpu_regs_entry_point_offset()
669-
: target::Thread::
670-
null_arg_error_shared_without_fpu_regs_entry_point_offset();
671-
ldr(LR, Address(THR, entry_point_offset));
672-
blr(LR);
673-
}
674-
675654
void Assembler::AddImmediate(Register dest, Register rn, int64_t imm) {
676655
Operand op;
677656
if (imm == 0) {

assembler_arm64.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,10 +1406,6 @@ class Assembler : public AssemblerBase {
14061406
}
14071407
void BranchLinkToRuntime();
14081408

1409-
void CallNullErrorShared(bool save_fpu_registers);
1410-
1411-
void CallNullArgErrorShared(bool save_fpu_registers);
1412-
14131409
// Emit a call that shares its object pool entries with other calls
14141410
// that have the same equivalence marker.
14151411
void BranchLinkWithEquivalence(

assembler_ia32.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,10 +709,6 @@ class Assembler : public AssemblerBase {
709709
CodeEntryKind entry_kind = CodeEntryKind::kNormal);
710710
void CallToRuntime();
711711

712-
void CallNullErrorShared(bool save_fpu_registers) { UNREACHABLE(); }
713-
714-
void CallNullArgErrorShared(bool save_fpu_registers) { UNREACHABLE(); }
715-
716712
void Jmp(const Code& code);
717713
void J(Condition condition, const Code& code);
718714

assembler_x64.cc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,6 @@ void Assembler::CallToRuntime() {
100100
call(Address(THR, target::Thread::call_to_runtime_entry_point_offset()));
101101
}
102102

103-
void Assembler::CallNullErrorShared(bool save_fpu_registers) {
104-
uword entry_point_offset =
105-
save_fpu_registers
106-
? target::Thread::null_error_shared_with_fpu_regs_entry_point_offset()
107-
: target::Thread::
108-
null_error_shared_without_fpu_regs_entry_point_offset();
109-
call(Address(THR, entry_point_offset));
110-
}
111-
112-
void Assembler::CallNullArgErrorShared(bool save_fpu_registers) {
113-
const uword entry_point_offset =
114-
save_fpu_registers
115-
? target::Thread::
116-
null_arg_error_shared_with_fpu_regs_entry_point_offset()
117-
: target::Thread::
118-
null_arg_error_shared_without_fpu_regs_entry_point_offset();
119-
call(Address(THR, entry_point_offset));
120-
}
121-
122103
void Assembler::pushq(Register reg) {
123104
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
124105
EmitRegisterREX(reg, REX_NONE);

assembler_x64.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,6 @@ class Assembler : public AssemblerBase {
725725
void Call(const Code& stub_entry);
726726
void CallToRuntime();
727727

728-
void CallNullErrorShared(bool save_fpu_registers);
729-
730-
void CallNullArgErrorShared(bool save_fpu_registers);
731-
732728
// Emit a call that shares its object pool entries with other calls
733729
// that have the same equivalence marker.
734730
void CallWithEquivalence(const Code& code,

0 commit comments

Comments
 (0)