We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb420fd commit 1b6f147Copy full SHA for 1b6f147
cranelift/jit/src/compiled_blob.rs
@@ -140,11 +140,12 @@ impl CompiledBlob {
140
}
141
Reloc::Arm64Call => {
142
let base = get_address(name);
143
+ let what = unsafe { base.offset(isize::try_from(addend).unwrap()) };
144
// The instruction is 32 bits long.
145
let iptr = at as *mut u32;
146
// The offset encoded in the `bl` instruction is the
147
// number of bytes divided by 4.
- let diff = ((base as isize) - (at as isize)) >> 2;
148
+ let diff = ((what as isize) - (at as isize)) >> 2;
149
// Sign propagating right shift disposes of the
150
// included bits, so the result is expected to be
151
// either all sign bits or 0, depending on if the original
0 commit comments