commit 47fddd61988c0427ef186b069c785e0de1d2e9f1 parent 7db886cbb472bbfe4d7f74f9d55e85b9a5216db4 Author: Rong "Mantle" Bao <webmaster@csmantle.top> Date: Mon, 1 Dec 2025 11:30:52 +0000 Bug 2002969 - [riscv64] Simplify code branches in MacroAssemblerRiscv64::BranchAndLink. r=nbp Differential Revision: https://phabricator.services.mozilla.com/D274396 Diffstat:
| M | js/src/jit/riscv64/MacroAssembler-riscv64.cpp | | | 11 | +++-------- |
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/js/src/jit/riscv64/MacroAssembler-riscv64.cpp b/js/src/jit/riscv64/MacroAssembler-riscv64.cpp @@ -6935,15 +6935,10 @@ CodeOffset MacroAssemblerRiscv64::BranchAndLinkShort(Label* L) { } CodeOffset MacroAssemblerRiscv64::BranchAndLink(Label* L) { - if (L->bound()) { - if (is_near(L)) { - return BranchAndLinkShort(L); - } else { - return BranchAndLinkLong(L); - } - } else { - return BranchAndLinkShort(L); + if (L->bound() && !is_near(L)) { + return BranchAndLinkLong(L); } + return BranchAndLinkShort(L); } void MacroAssemblerRiscv64::ma_fmv_d(FloatRegister src, ValueOperand dest) {