aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/add/add.rs.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2023-12-07 23:53:44 +0000
committerjohannst <johannst@users.noreply.github.com>2023-12-07 23:53:44 +0000
commitd3e1eff9593501ff8677b9399e1f0625f415ec78 (patch)
treefbc8aa062fdd4ca510fae17ea515354549636f29 /src/add/add.rs.html
parent2294180c3778d0fcfa877818e98c420fcd54bb8a (diff)
downloadjuicebox-asm-d3e1eff9593501ff8677b9399e1f0625f415ec78.tar.gz
juicebox-asm-d3e1eff9593501ff8677b9399e1f0625f415ec78.zip
deploy: b5aea3fb5fcce31599e3d7397d5413a934132231
Diffstat (limited to 'src/add/add.rs.html')
-rw-r--r--src/add/add.rs.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/add/add.rs.html b/src/add/add.rs.html
index 112d0f1..dc8c566 100644
--- a/src/add/add.rs.html
+++ b/src/add/add.rs.html
@@ -44,9 +44,9 @@
</span><span class="attr">#[cfg(not(any(target_arch = <span class="string">&quot;x86_64&quot;</span>, target_os = <span class="string">&quot;linux&quot;</span>)))]
</span><span class="macro">compile_error!</span>(<span class="string">&quot;Only supported on x86_64 with SystemV abi&quot;</span>);
-<span class="kw">use </span>juicebox_asm::prelude::<span class="kw-2">*</span>;
+<span class="kw">use </span>juicebox_asm::insn::<span class="kw-2">*</span>;
<span class="kw">use </span>juicebox_asm::Runtime;
-<span class="kw">use </span>Reg64::<span class="kw-2">*</span>;
+<span class="kw">use </span>juicebox_asm::{Asm, Imm64, Reg64::<span class="kw-2">*</span>};
<span class="kw">extern </span><span class="string">&quot;C&quot; </span><span class="kw">fn </span>add(a: u32, b: u32) -&gt; u32 {
a + b
@@ -59,9 +59,9 @@
// rdi -&gt; first argument
// rsi -&gt; second argument
// rax -&gt; return value
- //
+
</span>asm.mov(rsi, Imm64::from(<span class="number">42</span>));
- asm.mov(rax, Imm64::from(add <span class="kw">as </span>u64));
+ asm.mov(rax, Imm64::from(add <span class="kw">as </span>usize));
asm.call(rax);
asm.ret();