summaryrefslogtreecommitdiff
path: root/string.rb
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2022-09-09 11:37:41 -0400
committerGitHub <noreply@github.com>2022-09-09 11:37:41 -0400
commit848037cadd63091d5c39d06cd5d49aeee2258b4e (patch)
treeafd060fa7289b5d0851382e03e76f47a9d22cef6 /string.rb
parentb350053ae47dc4653ecb85f64360cf6eafba6323 (diff)
downloadruby-848037cadd63091d5c39d06cd5d49aeee2258b4e.tar.gz
Better offsets (#6315)
* 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
Diffstat (limited to 'string.rb')
0 files changed, 0 insertions, 0 deletions