diff options
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(); |