diff options
author | Kevin Newton <kddnewton@gmail.com> | 2022-07-08 13:01:21 -0400 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-08-29 08:46:59 -0700 |
commit | 6773832ab9cad3c7bcb3b93ef85a4bcfc9b3a4e3 (patch) | |
tree | b377f91fb5597d0ee141485205a2638cb35f75c8 /yjit/src/asm/mod.rs | |
parent | 0551115912fd6682187dd501275096fdb7570084 (diff) | |
download | ruby-6773832ab9cad3c7bcb3b93ef85a4bcfc9b3a4e3.tar.gz |
More Arm64 lowering/backend work (https://github.com/Shopify/ruby/pull/307)
* More Arm64 lowering/backend work
* We now have encoding support for the LDR instruction for loading a PC-relative memory location
* You can now call add/adds/sub/subs with signed immediates, which switches appropriately based on sign
* We can now load immediates into registers appropriately, attempting to keep the minimal number of instructions:
* If it fits into 16 bytes, we use just a single movz.
* Else if it can be encoded into a bitmask immediate, we use a single mov.
* Otherwise we use a movz, a movk, and then optionally another one or two movks.
* Fixed a bunch of code to do with the Op::Load opcode.
* We now handle GC-offsets properly for Op::Load by skipping around them with a jump instruction. (This will be made better by constant pools in the future.)
* Op::Lea is doing what it's supposed to do now.
* Fixed a bug in the backend tests to do with not using the result of an Op::Add.
* Fix the remaining tests for Arm64
* Move split loads logic into each backend
Diffstat (limited to 'yjit/src/asm/mod.rs')
-rw-r--r-- | yjit/src/asm/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit/src/asm/mod.rs b/yjit/src/asm/mod.rs index 5723406aec..126c9a8548 100644 --- a/yjit/src/asm/mod.rs +++ b/yjit/src/asm/mod.rs @@ -174,7 +174,7 @@ impl CodeBlock { } /// Write multiple bytes starting from the current position. - fn write_bytes(&mut self, bytes: &[u8]) { + pub fn write_bytes(&mut self, bytes: &[u8]) { for byte in bytes { self.write_byte(*byte); } |