aboutsummaryrefslogtreecommitdiff
path: root/lib/arm64/assemble.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arm64/assemble.h')
-rw-r--r--lib/arm64/assemble.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arm64/assemble.h b/lib/arm64/assemble.h
index 1dca7eb..42c0f0c 100644
--- a/lib/arm64/assemble.h
+++ b/lib/arm64/assemble.h
@@ -56,8 +56,8 @@ static inline void ADRP_ADD(void **codep, int reg, uint64_t pc, uint64_t dpc) {
}
}
-static inline void BR(void **codep, int reg) {
- op32(codep, 0xd61f0000 | reg << 5);
+static inline void BR(void **codep, int reg, bool link) {
+ op32(codep, 0xd61f0000 | reg << 5 | link << 21);
}
static inline void Bccrel(void **codep, int cc, int offset) {