aboutsummaryrefslogtreecommitdiffstats
path: root/yjit/src/asm/arm64/arg/inst_offset.rs
Commit message (Collapse)AuthorAgeFilesLines
* Better offsets (#6315)Kevin Newton2022-09-091-0/+47
* Introduce InstructionOffset for AArch64 There are a lot of instructions on AArch64 where we take an offset from PC in terms of the number of instructions. This is for loading a value relative to the PC or for jumping. We were usually accepting an A64Opnd or an i32. It can get confusing and inconsistent though because sometimes you would divide by 4 to get the number of instructions or multiply by 4 to get the number of bytes. This commit adds a struct that wraps an i32 in order to keep all of that logic in one place. It makes it much easier to read and reason about how these offsets are getting used. * Use b instruction when the offset fits on AArch64