diff options
author | johannst <johannst@users.noreply.github.com> | 2023-12-07 23:53:44 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2023-12-07 23:53:44 +0000 |
commit | d3e1eff9593501ff8677b9399e1f0625f415ec78 (patch) | |
tree | fbc8aa062fdd4ca510fae17ea515354549636f29 /src/add/add.rs.html | |
parent | 2294180c3778d0fcfa877818e98c420fcd54bb8a (diff) | |
download | juicebox-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.html | 8 |
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">"x86_64"</span>, target_os = <span class="string">"linux"</span>)))] </span><span class="macro">compile_error!</span>(<span class="string">"Only supported on x86_64 with SystemV abi"</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">"C" </span><span class="kw">fn </span>add(a: u32, b: u32) -> u32 { a + b @@ -59,9 +59,9 @@ // rdi -> first argument // rsi -> second argument // rax -> 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(); |