<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/yjit/src/asm, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Typofix under bootstraptest, spec and yjit directories</title>
<updated>2023-12-25T04:50:23+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-12-25T04:48:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=863ded45a18773742cf3adab0f6deb4ba6b47c6e'/>
<id>863ded45a18773742cf3adab0f6deb4ba6b47c6e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Assert code pages are not partially in-bounds</title>
<updated>2023-12-05T18:20:06+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-12-05T16:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a063969ec18c8f213d9c70471a29d0d31ec5850a'/>
<id>a063969ec18c8f213d9c70471a29d0d31ec5850a</id>
<content type='text'>
Helps understand page switching
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Helps understand page switching
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Simplify code page switching logic, remove an assert</title>
<updated>2023-12-05T18:20:06+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-12-05T15:22:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=695e5c179ed06761e47c700c6b31a26f48eee699'/>
<id>695e5c179ed06761e47c700c6b31a26f48eee699</id>
<content type='text'>
We have received a report of `assert!( !cb.has_dropped_bytes())` in
set_page() failing. The only explanation for this seems to be memory
allocation failing in write_byte(). The if condition implies that
`current_write_pos &lt; dst_pos &lt; mem_size`, which rules out failing to
encode the relative jump. The has_capacity() assert above not tripping
implies that we were in a place in the page where write_byte() did
attempt to write the byte and potentially made a syscall in the process.

Remove the assert, since memory allocation could fail. Also, return
failure if the destination is outside of the code region to detect that
out-of-memory situation quicker.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have received a report of `assert!( !cb.has_dropped_bytes())` in
set_page() failing. The only explanation for this seems to be memory
allocation failing in write_byte(). The if condition implies that
`current_write_pos &lt; dst_pos &lt; mem_size`, which rules out failing to
encode the relative jump. The has_capacity() assert above not tripping
implies that we were in a place in the page where write_byte() did
attempt to write the byte and potentially made a syscall in the process.

Remove the assert, since memory allocation could fail. Also, return
failure if the destination is outside of the code region to detect that
out-of-memory situation quicker.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Fix `clippy::useless_vec` in a test</title>
<updated>2023-11-10T21:55:56+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-11-10T20:54:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f5fa90fe0bf8f606e80a86f02f939003e7aa6834'/>
<id>f5fa90fe0bf8f606e80a86f02f939003e7aa6834</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Use u32 for CodePtr to save 4 bytes each</title>
<updated>2023-11-07T22:43:43+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-10-16T22:35:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a1c61f0ae5f5ecaa7d8289942b78e6b0c77118fe'/>
<id>a1c61f0ae5f5ecaa7d8289942b78e6b0c77118fe</id>
<content type='text'>
We've long had a size restriction on the code memory region such that a
u32 could refer to everything. This commit capitalizes on this
restriction by shrinking the size of `CodePtr` to be 4 bytes from 8.

To derive a full raw pointer from a `CodePtr`, one needs a base pointer.
Both `CodeBlock` and `VirtualMemory` can be used for this purpose. The
base pointer is readily available everywhere, except for in the case of
the `jit_return` "branch". Generalize lea_label() to lea_jump_target()
in the IR to delay deriving the `jit_return` address until `compile()`,
when the base pointer is available.

On railsbench, this yields roughly a 1% reduction to `yjit_alloc_size`
(58,397,765 to 57,742,248).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've long had a size restriction on the code memory region such that a
u32 could refer to everything. This commit capitalizes on this
restriction by shrinking the size of `CodePtr` to be 4 bytes from 8.

To derive a full raw pointer from a `CodePtr`, one needs a base pointer.
Both `CodeBlock` and `VirtualMemory` can be used for this purpose. The
base pointer is readily available everywhere, except for in the case of
the `jit_return` "branch". Generalize lea_label() to lea_jump_target()
in the IR to delay deriving the `jit_return` address until `compile()`,
when the base pointer is available.

On railsbench, this yields roughly a 1% reduction to `yjit_alloc_size`
(58,397,765 to 57,742,248).
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Add --yjit-perf (#8697)</title>
<updated>2023-10-18T21:07:03+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-10-18T21:07:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f51b92fe231266a1a184b8329d43520599d2017b'/>
<id>f51b92fe231266a1a184b8329d43520599d2017b</id>
<content type='text'>
Co-authored-by: Alan Wu &lt;alansi.xingwu@shopify.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Alan Wu &lt;alansi.xingwu@shopify.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Skip adding past_page_bytes for past pages (#8433)</title>
<updated>2023-09-13T20:44:23+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-09-13T20:44:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b49be2a70fd715b15f69dae776ba37d9b8d3a3fb'/>
<id>b49be2a70fd715b15f69dae776ba37d9b8d3a3fb</id>
<content type='text'>
YJIT: Skip adding past_pages_bytes for past pages</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
YJIT: Skip adding past_pages_bytes for past pages</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Make compiled_* stats available by default (#8379)</title>
<updated>2023-09-06T16:29:33+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-09-06T16:29:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a334077b7b4dfc2439afd9b429c2fcd9e4c3012e'/>
<id>a334077b7b4dfc2439afd9b429c2fcd9e4c3012e</id>
<content type='text'>
* YJIT: Make compiled_* stats available by default

* Update comment about default counters [ci skip]

Co-authored-by: Maxime Chevalier-Boisvert &lt;maximechevalierb@gmail.com&gt;

---------

Co-authored-by: Maxime Chevalier-Boisvert &lt;maximechevalierb@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* YJIT: Make compiled_* stats available by default

* Update comment about default counters [ci skip]

Co-authored-by: Maxime Chevalier-Boisvert &lt;maximechevalierb@gmail.com&gt;

---------

Co-authored-by: Maxime Chevalier-Boisvert &lt;maximechevalierb@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: x64: Split mem-to-mem Insn::Store like Insn::Mov</title>
<updated>2023-08-22T22:43:56+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-08-22T22:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ff552389137c2d0af16c63e82bfc7e123be30198'/>
<id>ff552389137c2d0af16c63e82bfc7e123be30198</id>
<content type='text'>
The ARM backend allows for this so let's make x64 consistent.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ARM backend allows for this so let's make x64 consistent.</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: implement fast path for integer multiplication in opt_mult (#8204)</title>
<updated>2023-08-18T14:05:32+00:00</updated>
<author>
<name>Maxime Chevalier-Boisvert</name>
<email>maxime.chevalierboisvert@shopify.com</email>
</author>
<published>2023-08-18T14:05:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=314eed8a5ec9f1b46624b277dde75f8079026b7b'/>
<id>314eed8a5ec9f1b46624b277dde75f8079026b7b</id>
<content type='text'>
* YJIT: implement fast path for integer multiplication in opt_mult

* Update yjit/src/codegen.rs

Co-authored-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;

* Implement mul with overflow checking on arm64

* Fix missing semicolon

* Add arm splitting for lshift, rshift, urshift

---------

Co-authored-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* YJIT: implement fast path for integer multiplication in opt_mult

* Update yjit/src/codegen.rs

Co-authored-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;

* Implement mul with overflow checking on arm64

* Fix missing semicolon

* Add arm splitting for lshift, rshift, urshift

---------

Co-authored-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
</feed>
