<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/yjit/src/asm/arm64/arg/mod.rs, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Better offsets (#6315)</title>
<updated>2022-09-09T15:37:41+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2022-09-09T15:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=848037cadd63091d5c39d06cd5d49aeee2258b4e'/>
<id>848037cadd63091d5c39d06cd5d49aeee2258b4e</id>
<content type='text'>
* 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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed width immediates (https://github.com/Shopify/ruby/pull/437)</title>
<updated>2022-08-29T16:09:41+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2022-08-26T23:21:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d694f320e40e77ab432f4d21575251ac0ab4ab76'/>
<id>d694f320e40e77ab432f4d21575251ac0ab4ab76</id>
<content type='text'>
There are a lot of times when encoding AArch64 instructions that we
need to represent an integer value with a custom fixed width. For
example, the offset for a B instruction is 26 bits, so we store an
i32 on the instruction struct and then mask it when we encode.

We've been doing this masking everywhere, which has worked, but
it's getting a bit copy-pasty all over the place. This commit
centralizes that logic to make sure we stay consistent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a lot of times when encoding AArch64 instructions that we
need to represent an integer value with a custom fixed width. For
example, the offset for a B instruction is 26 bits, so we store an
i32 on the instruction struct and then mask it when we encode.

We've been doing this masking everywhere, which has worked, but
it's getting a bit copy-pasty all over the place. This commit
centralizes that logic to make sure we stay consistent.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixes for AArch64 (https://github.com/Shopify/ruby/pull/338)</title>
<updated>2022-08-29T15:47:04+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2022-07-22T18:01:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f593b2c6db622de6f973e4e847e959855c341a25'/>
<id>f593b2c6db622de6f973e4e847e959855c341a25</id>
<content type='text'>
* Better splitting for Op::Add, Op::Sub, and Op::Cmp

* Split stores if the displacement is too large

* Use a shifted immediate argument

* Split all places where shifted immediates are used

* Add more tests to the cirrus workflow
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Better splitting for Op::Add, Op::Sub, and Op::Cmp

* Split stores if the displacement is too large

* Use a shifted immediate argument

* Split all places where shifted immediates are used

* Add more tests to the cirrus workflow
</pre>
</div>
</content>
</entry>
<entry>
<title>Encode MRS and MSR for AArch64 (https://github.com/Shopify/ruby/pull/315)</title>
<updated>2022-08-29T15:47:00+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2022-07-13T20:48:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=15c6aacd399b2bc7fb5ee2d6422451c4eb47941f'/>
<id>15c6aacd399b2bc7fb5ee2d6422451c4eb47941f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>LSL, LSR, B.cond (https://github.com/Shopify/ruby/pull/303)</title>
<updated>2022-08-29T15:46:58+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2022-06-22T16:27:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b272c57f27628ab114206c777d5b274713d31079'/>
<id>b272c57f27628ab114206c777d5b274713d31079</id>
<content type='text'>
* LSL and LSR

* B.cond

* Move A64 files around to make more sense

* offset -&gt; byte_offset for bcond
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* LSL and LSR

* B.cond

* Move A64 files around to make more sense

* offset -&gt; byte_offset for bcond
</pre>
</div>
</content>
</entry>
</feed>
