diff options
author | johannst <johannst@users.noreply.github.com> | 2024-12-13 00:24:24 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2024-12-13 00:24:24 +0000 |
commit | 22f0c8c5d4b3604227187b9843737c23be75ba75 (patch) | |
tree | 8e86adc26068c2060a959115562b347aa1f435d0 /src/juicebox_asm/asm.rs.html | |
parent | c94a65c993f5da6a86bd1e6d23e359ba2052f836 (diff) | |
download | juicebox-asm-22f0c8c5d4b3604227187b9843737c23be75ba75.tar.gz juicebox-asm-22f0c8c5d4b3604227187b9843737c23be75ba75.zip |
deploy: f06967bbe80d5647412a4b709b1d3de0fe056627
Diffstat (limited to 'src/juicebox_asm/asm.rs.html')
-rw-r--r-- | src/juicebox_asm/asm.rs.html | 58 |
1 files changed, 5 insertions, 53 deletions
diff --git a/src/juicebox_asm/asm.rs.html b/src/juicebox_asm/asm.rs.html index 1b159ca..ea2bff9 100644 --- a/src/juicebox_asm/asm.rs.html +++ b/src/juicebox_asm/asm.rs.html @@ -426,31 +426,7 @@ <a href="#425" id="425">425</a> <a href="#426" id="426">426</a> <a href="#427" id="427">427</a> -<a href="#428" id="428">428</a> -<a href="#429" id="429">429</a> -<a href="#430" id="430">430</a> -<a href="#431" id="431">431</a> -<a href="#432" id="432">432</a> -<a href="#433" id="433">433</a> -<a href="#434" id="434">434</a> -<a href="#435" id="435">435</a> -<a href="#436" id="436">436</a> -<a href="#437" id="437">437</a> -<a href="#438" id="438">438</a> -<a href="#439" id="439">439</a> -<a href="#440" id="440">440</a> -<a href="#441" id="441">441</a> -<a href="#442" id="442">442</a> -<a href="#443" id="443">443</a> -<a href="#444" id="444">444</a> -<a href="#445" id="445">445</a> -<a href="#446" id="446">446</a> -<a href="#447" id="447">447</a> -<a href="#448" id="448">448</a> -<a href="#449" id="449">449</a> -<a href="#450" id="450">450</a> -<a href="#451" id="451">451</a> -<a href="#452" id="452">452</a></pre></div><pre class="rust"><code><span class="doccomment">//! The `x64` jit assembler. +<a href="#428" id="428">428</a></pre></div><pre class="rust"><code><span class="doccomment">//! The `x64` jit assembler. </span><span class="kw">use crate</span>::<span class="kw-2">*</span>; <span class="kw">use </span>imm::Imm; @@ -656,7 +632,7 @@ <span class="doccomment">/// Encode a memory-immediate instruction. </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>encode_mi<M: Mem, T: Imm>(<span class="kw-2">&mut </span><span class="self">self</span>, opc: u8, opc_ext: u8, op1: M, op2: T) <span class="kw">where - </span><span class="self">Self</span>: EncodeMI<M>, + </span><span class="self">Self</span>: EncodeM<M>, { <span class="comment">// MI operand encoding. // op1 -> modrm.rm @@ -686,8 +662,8 @@ </span>rm, <span class="comment">/* rm */ </span>); - <span class="kw">let </span>prefix = <<span class="self">Self </span><span class="kw">as </span>EncodeMI<M>>::legacy_prefix(); - <span class="kw">let </span>rex = <<span class="self">Self </span><span class="kw">as </span>EncodeMI<M>>::rex(<span class="kw-2">&</span>op1); + <span class="kw">let </span>prefix = <<span class="self">Self </span><span class="kw">as </span>EncodeM<M>>::legacy_prefix(); + <span class="kw">let </span>rex = <<span class="self">Self </span><span class="kw">as </span>EncodeM<M>>::rex(<span class="kw-2">&</span>op1); <span class="self">self</span>.emit_optional(<span class="kw-2">&</span>[prefix, rex]); <span class="self">self</span>.emit(<span class="kw-2">&</span>[opc, modrm]); @@ -855,31 +831,7 @@ <span class="kw">impl </span>EncodeMR<Mem32> <span class="kw">for </span>Asm {} <span class="kw">impl </span>EncodeMR<Mem64> <span class="kw">for </span>Asm {} -<span class="doccomment">/// Encode helper for memory-immediate instructions. -</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">trait </span>EncodeMI<M: Mem> { - <span class="kw">fn </span>legacy_prefix() -> <span class="prelude-ty">Option</span><u8> { - <span class="prelude-val">None - </span>} - - <span class="kw">fn </span>rex(op1: <span class="kw-2">&</span>M) -> <span class="prelude-ty">Option</span><u8> { - <span class="kw">if </span>M::is_64() || op1.base().is_ext() || op1.index().is_ext() { - <span class="prelude-val">Some</span>(rex(M::is_64(), <span class="number">0</span>, op1.index().idx(), op1.base().idx())) - } <span class="kw">else </span>{ - <span class="prelude-val">None - </span>} - } -} - -<span class="kw">impl </span>EncodeMI<Mem8> <span class="kw">for </span>Asm {} -<span class="kw">impl </span>EncodeMI<Mem16> <span class="kw">for </span>Asm { - <span class="kw">fn </span>legacy_prefix() -> <span class="prelude-ty">Option</span><u8> { - <span class="prelude-val">Some</span>(<span class="number">0x66</span>) - } -} -<span class="kw">impl </span>EncodeMI<Mem32> <span class="kw">for </span>Asm {} -<span class="kw">impl </span>EncodeMI<Mem64> <span class="kw">for </span>Asm {} - -<span class="doccomment">/// Encode helper for memory operand instructions. +<span class="doccomment">/// Encode helper for memory perand instructions. </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">trait </span>EncodeM<M: Mem> { <span class="kw">fn </span>legacy_prefix() -> <span class="prelude-ty">Option</span><u8> { <span class="prelude-val">None |