<feed xmlns='http://www.w3.org/2005/Atom'>
<title>yaxpeax-x86/src/long_mode, branch opts</title>
<subtitle>yaxpeax x86 decoder</subtitle>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/'/>
<entry>
<title>fix incorrect rex selection and field description offsets</title>
<updated>2022-05-30T18:18:22+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-05-01T20:53:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=091f1d66ef853d6339a96e43d71c137ee7d3907a'/>
<id>091f1d66ef853d6339a96e43d71c137ee7d3907a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>66 prefixes are common, 0f opcodes are common</title>
<updated>2022-05-30T18:18:22+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-04-23T02:49:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=67be1c0983244645a3c762b7aa0601f0d0ba4bb3'/>
<id>67be1c0983244645a3c762b7aa0601f0d0ba4bb3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>support a fast path through the decoder for [rex-prefixed]opcode insts</title>
<updated>2022-05-30T18:18:22+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-04-21T09:35:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=6353f58170d28a142e3b012c2c86f684d50dea45'/>
<id>6353f58170d28a142e3b012c2c86f684d50dea45</id>
<content type='text'>
the overwhelming majority of x86 instructions are either a single-byte
opcode or a single-byte opcode with a rex prefix. supporting these
specially means that we don't have to length-check on every byte or
go through the full decode loop while reading the most likely
instructions. this is a significant improvement on typical x86 streams,
but comes at a moderate penalty for crafted x86 instructions.

the penalty is still not very bad, as the fast path is exited in favor
of the full decode loop as soon as we see a non-rex prefix byte; this
adds maybe a dozen instructions to the slow path.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the overwhelming majority of x86 instructions are either a single-byte
opcode or a single-byte opcode with a rex prefix. supporting these
specially means that we don't have to length-check on every byte or
go through the full decode loop while reading the most likely
instructions. this is a significant improvement on typical x86 streams,
but comes at a moderate penalty for crafted x86 instructions.

the penalty is still not very bad, as the fast path is exited in favor
of the full decode loop as soon as we see a non-rex prefix byte; this
adds maybe a dozen instructions to the slow path.
</pre>
</div>
</content>
</entry>
<entry>
<title>just a bit more code motion that seemed to help things sometimes</title>
<updated>2022-05-30T18:18:21+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-04-21T09:35:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=bece19e6a69b158893abbf56a6cac25eb25d9a32'/>
<id>bece19e6a69b158893abbf56a6cac25eb25d9a32</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>reorder prefix checks, extract vex/evex prefix handling</title>
<updated>2022-05-30T18:16:52+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-04-21T09:31:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=f338c74656f6eef8b3080fa9f249b1cb733fd1a9'/>
<id>f338c74656f6eef8b3080fa9f249b1cb733fd1a9</id>
<content type='text'>
sharing vex/evex invalid prefix checks improves codegen a bit, but
ordering prefix checks by likeliest prefix first reduces time falling
through prefix handling arms. both together are a notable improvement in
throughput on typical x86 code.

bundled in here is some code motion to where `mem_size = 0` and
`operand_count = 2` are executed; this is because, at least on zen2 and
cascade lake parts, bunching all stores to the instruction together
caused small stalls getting into the decoder. spreading out stores seems
to mix these assignments with parts of code that was not using memory
anyway, and pipelines better.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sharing vex/evex invalid prefix checks improves codegen a bit, but
ordering prefix checks by likeliest prefix first reduces time falling
through prefix handling arms. both together are a notable improvement in
throughput on typical x86 code.

bundled in here is some code motion to where `mem_size = 0` and
`operand_count = 2` are executed; this is because, at least on zen2 and
cascade lake parts, bunching all stores to the instruction together
caused small stalls getting into the decoder. spreading out stores seems
to mix these assignments with parts of code that was not using memory
anyway, and pipelines better.
</pre>
</div>
</content>
</entry>
<entry>
<title>move opcode lookup tables into const arrays</title>
<updated>2022-05-30T18:16:52+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-04-21T09:28:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=e7f4950985ab9976e9d00599c9225327c64f6439'/>
<id>e7f4950985ab9976e9d00599c9225327c64f6439</id>
<content type='text'>
cleanliness, but also slightly better codegen somehow?
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cleanliness, but also slightly better codegen somehow?
</pre>
</div>
</content>
</entry>
<entry>
<title>replace size lookup logic with a LUT</title>
<updated>2022-05-30T18:16:52+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-04-21T09:27:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=2444de11c44a61ef136fb1fbfc0d01c5b44c042a'/>
<id>2444de11c44a61ef136fb1fbfc0d01c5b44c042a</id>
<content type='text'>
the match compiled into some indirect branch awfulness!! no thank you
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the match compiled into some indirect branch awfulness!! no thank you
</pre>
</div>
</content>
</entry>
<entry>
<title>more annotation fixes?</title>
<updated>2022-05-07T16:40:26+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-05-07T16:40:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=8ce99ef32e1db656138bb95ab57506100ffd6fdd'/>
<id>8ce99ef32e1db656138bb95ab57506100ffd6fdd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix a few issues preventing no-std builds from ... building</title>
<updated>2022-04-25T02:22:52+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-04-25T00:39:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=2097524c851b15e89091fd3775817a06f0eeae4f'/>
<id>2097524c851b15e89091fd3775817a06f0eeae4f</id>
<content type='text'>
this includes a `Makefile` that exercises the various crate configs.
most annoyingly, several doc comments needed to grow
`#[cfg(feature="fmt")]` blocks so docs continue to build with that
feature enabled or disabled.

carved out a way to run exhaustive tests; they should be written as
`#[ignore]`, and then the makefile will run even ignored tests on the
expectation that this will run the exhaustive (but slower) suite.
exhaustive tests are not yet written. they'll probably involve spanning
4 byte sequences from 0 to 2^32-1.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this includes a `Makefile` that exercises the various crate configs.
most annoyingly, several doc comments needed to grow
`#[cfg(feature="fmt")]` blocks so docs continue to build with that
feature enabled or disabled.

carved out a way to run exhaustive tests; they should be written as
`#[ignore]`, and then the makefile will run even ignored tests on the
expectation that this will run the exhaustive (but slower) suite.
exhaustive tests are not yet written. they'll probably involve spanning
4 byte sequences from 0 to 2^32-1.
</pre>
</div>
</content>
</entry>
<entry>
<title>fuzz DisplayStyle::C and fix corresponding issues</title>
<updated>2022-01-12T23:46:39+00:00</updated>
<author>
<name>iximeow</name>
<email>me@iximeow.net</email>
</author>
<published>2022-01-12T23:46:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.iximeow.net/yaxpeax-x86/commit/?id=e80b5622ec956a92f24ce6487fb0d76e9c541515'/>
<id>e80b5622ec956a92f24ce6487fb0d76e9c541515</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
