diff options
Diffstat (limited to 'src/juicebox_asm/insn/add.rs.html')
-rw-r--r-- | src/juicebox_asm/insn/add.rs.html | 72 |
1 files changed, 54 insertions, 18 deletions
diff --git a/src/juicebox_asm/insn/add.rs.html b/src/juicebox_asm/insn/add.rs.html index f91aa25..be3d025 100644 --- a/src/juicebox_asm/insn/add.rs.html +++ b/src/juicebox_asm/insn/add.rs.html @@ -42,48 +42,84 @@ <a href="#41" id="41">41</a> <a href="#42" id="42">42</a> <a href="#43" id="43">43</a> -<a href="#44" id="44">44</a></pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">super</span>::Add; -<span class="kw">use crate</span>::{Asm, Imm16, Imm8, MemOp, Reg16, Reg32, Reg64}; +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a></pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">super</span>::Add; +<span class="kw">use crate</span>::{Asm, Imm16, Imm8, Mem16, Mem32, Mem64, Mem8, Reg16, Reg32, Reg64}; -<span class="kw">impl </span>Add<Reg64, Reg64> <span class="kw">for </span>Asm { - <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Reg64, op2: Reg64) { +<span class="kw">impl </span>Add<Reg32, Reg32> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Reg32, op2: Reg32) { <span class="self">self</span>.encode_rr(<span class="kw-2">&</span>[<span class="number">0x01</span>], op1, op2); } } -<span class="kw">impl </span>Add<Reg32, Reg32> <span class="kw">for </span>Asm { - <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Reg32, op2: Reg32) { +<span class="kw">impl </span>Add<Reg64, Reg64> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Reg64, op2: Reg64) { <span class="self">self</span>.encode_rr(<span class="kw-2">&</span>[<span class="number">0x01</span>], op1, op2); } } -<span class="kw">impl </span>Add<MemOp, Reg64> <span class="kw">for </span>Asm { - <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: MemOp, op2: Reg64) { +<span class="kw">impl </span>Add<Mem16, Reg16> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Mem16, op2: Reg16) { <span class="self">self</span>.encode_mr(<span class="number">0x01</span>, op1, op2); } } -<span class="kw">impl </span>Add<MemOp, Reg16> <span class="kw">for </span>Asm { - <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: MemOp, op2: Reg16) { +<span class="kw">impl </span>Add<Mem64, Reg64> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Mem64, op2: Reg64) { <span class="self">self</span>.encode_mr(<span class="number">0x01</span>, op1, op2); } } -<span class="kw">impl </span>Add<MemOp, Imm8> <span class="kw">for </span>Asm { - <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: MemOp, op2: Imm8) { +<span class="kw">impl </span>Add<Reg64, Mem64> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Reg64, op2: Mem64) { + <span class="self">self</span>.encode_rm(<span class="number">0x03</span>, op1, op2); + } +} + +<span class="kw">impl </span>Add<Mem8, Imm8> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Mem8, op2: Imm8) { + <span class="self">self</span>.encode_mi(<span class="number">0x80</span>, <span class="number">0</span>, op1, op2); + } +} + +<span class="kw">impl </span>Add<Mem16, Imm8> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Mem16, op2: Imm8) { <span class="self">self</span>.encode_mi(<span class="number">0x83</span>, <span class="number">0</span>, op1, op2); } } -<span class="kw">impl </span>Add<MemOp, Imm16> <span class="kw">for </span>Asm { - <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: MemOp, op2: Imm16) { - <span class="self">self</span>.encode_mi(<span class="number">0x81</span>, <span class="number">0</span>, op1, op2); +<span class="kw">impl </span>Add<Mem32, Imm8> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Mem32, op2: Imm8) { + <span class="self">self</span>.encode_mi(<span class="number">0x83</span>, <span class="number">0</span>, op1, op2); } } -<span class="kw">impl </span>Add<Reg64, MemOp> <span class="kw">for </span>Asm { - <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Reg64, op2: MemOp) { - <span class="self">self</span>.encode_rm(<span class="number">0x03</span>, op1, op2); +<span class="kw">impl </span>Add<Mem64, Imm8> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Mem64, op2: Imm8) { + <span class="self">self</span>.encode_mi(<span class="number">0x83</span>, <span class="number">0</span>, op1, op2); + } +} + +<span class="kw">impl </span>Add<Mem16, Imm16> <span class="kw">for </span>Asm { + <span class="kw">fn </span>add(<span class="kw-2">&mut </span><span class="self">self</span>, op1: Mem16, op2: Imm16) { + <span class="self">self</span>.encode_mi(<span class="number">0x81</span>, <span class="number">0</span>, op1, op2); } } </code></pre></div></section></main></body></html>
\ No newline at end of file |