From 865c1d3231fd57c648121d961be91793d0bfe690 Mon Sep 17 00:00:00 2001 From: johannst Date: Sun, 5 Mar 2023 20:47:28 +0000 Subject: deploy: 1ea7de2ba46b58b4afe3e65b95d8a45160218a5c --- juicebox_asm/all.html | 2 +- juicebox_asm/enum.MemOp.html | 7 +++- juicebox_asm/enum.Reg16.html | 24 +++++++++++ juicebox_asm/enum.Reg32.html | 24 +++++++++++ juicebox_asm/enum.Reg64.html | 24 +++++++++++ juicebox_asm/enum.Reg8.html | 28 +++++++++++++ juicebox_asm/index.html | 73 +++++++++++++++++++++++++++++++++- juicebox_asm/prelude/enum.Reg16.html | 6 +-- juicebox_asm/prelude/enum.Reg32.html | 6 +-- juicebox_asm/prelude/enum.Reg64.html | 6 +-- juicebox_asm/prelude/enum.Reg8.html | 6 +-- juicebox_asm/prelude/index.html | 3 +- juicebox_asm/prelude/sidebar-items.js | 2 +- juicebox_asm/prelude/struct.Imm16.html | 4 +- juicebox_asm/prelude/struct.Imm32.html | 4 +- juicebox_asm/prelude/struct.Imm64.html | 4 +- juicebox_asm/prelude/struct.Imm8.html | 4 +- juicebox_asm/prelude/struct.Label.html | 6 +-- juicebox_asm/prelude/trait.Add.html | 4 +- juicebox_asm/prelude/trait.Dec.html | 4 +- juicebox_asm/prelude/trait.Jmp.html | 4 +- juicebox_asm/prelude/trait.Jnz.html | 4 +- juicebox_asm/prelude/trait.Jz.html | 4 +- juicebox_asm/prelude/trait.Mov.html | 4 +- juicebox_asm/prelude/trait.Test.html | 4 +- juicebox_asm/rt/index.html | 1 - juicebox_asm/rt/sidebar-items.js | 1 - juicebox_asm/rt/struct.Runtime.html | 19 +++++---- juicebox_asm/sidebar-items.js | 2 +- juicebox_asm/struct.Asm.html | 7 +++- juicebox_asm/struct.Imm16.html | 6 +++ juicebox_asm/struct.Imm32.html | 6 +++ juicebox_asm/struct.Imm64.html | 6 +++ juicebox_asm/struct.Imm8.html | 6 +++ juicebox_asm/struct.Label.html | 20 ++++++++++ juicebox_asm/struct.Runtime.html | 8 ++++ 36 files changed, 287 insertions(+), 56 deletions(-) create mode 100644 juicebox_asm/enum.Reg16.html create mode 100644 juicebox_asm/enum.Reg32.html create mode 100644 juicebox_asm/enum.Reg64.html create mode 100644 juicebox_asm/enum.Reg8.html delete mode 100644 juicebox_asm/rt/index.html delete mode 100644 juicebox_asm/rt/sidebar-items.js create mode 100644 juicebox_asm/struct.Imm16.html create mode 100644 juicebox_asm/struct.Imm32.html create mode 100644 juicebox_asm/struct.Imm64.html create mode 100644 juicebox_asm/struct.Imm8.html create mode 100644 juicebox_asm/struct.Label.html create mode 100644 juicebox_asm/struct.Runtime.html (limited to 'juicebox_asm') diff --git a/juicebox_asm/all.html b/juicebox_asm/all.html index aa7a8df..201b868 100644 --- a/juicebox_asm/all.html +++ b/juicebox_asm/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/juicebox_asm/enum.MemOp.html b/juicebox_asm/enum.MemOp.html index 0ea0a71..e126e68 100644 --- a/juicebox_asm/enum.MemOp.html +++ b/juicebox_asm/enum.MemOp.html @@ -1,7 +1,10 @@ -MemOp in juicebox_asm - Rust

Enum juicebox_asm::MemOp

source ·
pub enum MemOp {
+MemOp in juicebox_asm - Rust

Enum juicebox_asm::MemOp

source ·
pub enum MemOp {
     Indirect(Reg64),
     IndirectDisp(Reg64i32),
-}

Variants§

§

Indirect(Reg64)

§

IndirectDisp(Reg64i32)

Trait Implementations§

Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+}
Expand description

Type representing a memory operand.

+

Variants§

§

Indirect(Reg64)

An indirect memory operand, eg mov [rax], rcx.

+
§

IndirectDisp(Reg64i32)

An indirect memory operand with additional displacement, eg mov [rax + 0x10], rcx.

+

Trait Implementations§

Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/enum.Reg16.html b/juicebox_asm/enum.Reg16.html new file mode 100644 index 0000000..6815ce4 --- /dev/null +++ b/juicebox_asm/enum.Reg16.html @@ -0,0 +1,24 @@ +Reg16 in juicebox_asm - Rust

Enum juicebox_asm::Reg16

source ·
#[repr(u8)]
+pub enum Reg16 {
+
Show 16 variants ax, + cx, + dx, + bx, + sp, + bp, + si, + di, + r8w, + r9w, + r10w, + r11w, + r12w, + r13w, + r14w, + r15w, +
}
Expand description

Definition of 16 bit registers.

+

Variants§

§

ax

§

cx

§

dx

§

bx

§

sp

§

bp

§

si

§

di

§

r8w

§

r9w

§

r10w

§

r11w

§

r12w

§

r13w

§

r14w

§

r15w

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/enum.Reg32.html b/juicebox_asm/enum.Reg32.html new file mode 100644 index 0000000..b6b1c0f --- /dev/null +++ b/juicebox_asm/enum.Reg32.html @@ -0,0 +1,24 @@ +Reg32 in juicebox_asm - Rust

Enum juicebox_asm::Reg32

source ·
#[repr(u8)]
+pub enum Reg32 {
+
Show 16 variants eax, + ecx, + edx, + ebx, + esp, + ebp, + esi, + edi, + r8d, + r9d, + r10d, + r11d, + r12d, + r13d, + r14d, + r15d, +
}
Expand description

Definition of 32 bit registers.

+

Variants§

§

eax

§

ecx

§

edx

§

ebx

§

esp

§

ebp

§

esi

§

edi

§

r8d

§

r9d

§

r10d

§

r11d

§

r12d

§

r13d

§

r14d

§

r15d

Trait Implementations§

Emit an add instruction.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit a decrement instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit a logical compare instruction. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/enum.Reg64.html b/juicebox_asm/enum.Reg64.html new file mode 100644 index 0000000..75eaf41 --- /dev/null +++ b/juicebox_asm/enum.Reg64.html @@ -0,0 +1,24 @@ +Reg64 in juicebox_asm - Rust

Enum juicebox_asm::Reg64

source ·
#[repr(u8)]
+pub enum Reg64 {
+
Show 16 variants rax, + rcx, + rdx, + rbx, + rsp, + rbp, + rsi, + rdi, + r8, + r9, + r10, + r11, + r12, + r13, + r14, + r15, +
}
Expand description

Definition of 64 bit registers.

+

Variants§

§

rax

§

rcx

§

rdx

§

rbx

§

rsp

§

rbp

§

rsi

§

rdi

§

r8

§

r9

§

r10

§

r11

§

r12

§

r13

§

r14

§

r15

Trait Implementations§

Emit an add instruction.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit a decrement instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit a logical compare instruction. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/enum.Reg8.html b/juicebox_asm/enum.Reg8.html new file mode 100644 index 0000000..4643a63 --- /dev/null +++ b/juicebox_asm/enum.Reg8.html @@ -0,0 +1,28 @@ +Reg8 in juicebox_asm - Rust

Enum juicebox_asm::Reg8

source ·
#[repr(u8)]
+pub enum Reg8 {
+
Show 20 variants al, + cl, + dl, + bl, + spl, + bpl, + sil, + dil, + r8l, + r9l, + r10l, + r11l, + r12l, + r13l, + r14l, + r15l, + ah, + ch, + dh, + bh, +
}
Expand description

Definition of 8 bit registers.

+

Variants§

§

al

§

cl

§

dl

§

bl

§

spl

§

bpl

§

sil

§

dil

§

r8l

§

r9l

§

r10l

§

r11l

§

r12l

§

r13l

§

r14l

§

r15l

§

ah

§

ch

§

dh

§

bh

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/index.html b/juicebox_asm/index.html index a58f940..226978d 100644 --- a/juicebox_asm/index.html +++ b/juicebox_asm/index.html @@ -1 +1,72 @@ -juicebox_asm - Rust
\ No newline at end of file +juicebox_asm - Rust

Crate juicebox_asm

source ·
Expand description

A simple x64 jit assembler with a minimal runtime to execute emitted code for fun.

+

The following is an fibonacci example implementation.

+ +
use juicebox_asm::prelude::*;
+use juicebox_asm::Runtime;
+
+const fn fib_rs(n: u64) -> u64 {
+    match n {
+        0 => 0,
+        1 => 1,
+        _ => fib_rs(n - 2) + fib_rs(n - 1),
+    }
+}
+
+fn main() {
+    let mut asm = Asm::new();
+
+    let mut lp = Label::new();
+    let mut end = Label::new();
+
+    // Reference implementation:
+    //
+    // int fib(int n) {
+    //   int tmp = 0;
+    //   int prv = 1;
+    //   int sum = 0;
+    // loop:
+    //   if (n == 0) goto end;
+    //   tmp = sum;
+    //   sum += prv;
+    //   prv = tmp;
+    //   --n;
+    //   goto loop;
+    // end:
+    //   return sum;
+    // }
+
+    // SystemV abi:
+    //   rdi -> first argument
+    //   rax -> return value
+    let n = Reg64::rdi;
+    let sum = Reg64::rax;
+
+    let tmp = Reg64::rcx;
+    let prv = Reg64::rbx;
+
+    asm.mov(tmp, Imm64::from(0));
+    asm.mov(prv, Imm64::from(1));
+    asm.mov(sum, Imm64::from(0));
+
+    asm.bind(&mut lp);
+    asm.test(n, n);
+    asm.jz(&mut end);
+    asm.mov(tmp, sum);
+    asm.add(sum, prv);
+    asm.mov(prv, tmp);
+    asm.dec(n);
+    asm.jmp(&mut lp);
+    asm.bind(&mut end);
+    asm.ret();
+
+    // Move code into executable page and get function pointer to it.
+    let rt = Runtime::new(&asm.into_code());
+    let fib = unsafe { rt.as_fn::<extern "C" fn(u64) -> u64>() };
+
+    for n in 0..15 {
+        let fib_jit = fib(n);
+        println!("fib({}) = {}", n, fib_jit);
+        assert_eq!(fib_jit, fib_rs(n));
+    }
+}
+

Modules

Crate prelude, which can be used to import the most important types at once.

Structs

x64 jit assembler.
Type representing an 8 bit immediate.
Type representing a 16 bit immediate.
Type representing a 32 bit immediate.
Type representing a 64 bit immediate.
A label which is used as target for jump instructions.
A simple mmaped runtime with executable pages.

Enums

Type representing a memory operand.
Definition of 8 bit registers.
Definition of 16 bit registers.
Definition of 32 bit registers.
Definition of 64 bit registers.
\ No newline at end of file diff --git a/juicebox_asm/prelude/enum.Reg16.html b/juicebox_asm/prelude/enum.Reg16.html index a51ea1f..cd9ed8b 100644 --- a/juicebox_asm/prelude/enum.Reg16.html +++ b/juicebox_asm/prelude/enum.Reg16.html @@ -1,4 +1,4 @@ -Reg16 in juicebox_asm::prelude - Rust
#[repr(u8)]
+Reg16 in juicebox_asm::prelude - Rust
#[repr(u8)]
 pub enum Reg16 {
 
Show 16 variants ax, cx, @@ -16,8 +16,8 @@ pub enum Reg16 { r13w, r14w, r15w, -
}
Expand description

General purpose register operands.

-

Variants§

§

ax

§

cx

§

dx

§

bx

§

sp

§

bp

§

si

§

di

§

r8w

§

r9w

§

r10w

§

r11w

§

r12w

§

r13w

§

r14w

§

r15w

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+
}
Expand description

Definition of 16 bit registers.

+

Variants§

§

ax

§

cx

§

dx

§

bx

§

sp

§

bp

§

si

§

di

§

r8w

§

r9w

§

r10w

§

r11w

§

r12w

§

r13w

§

r14w

§

r15w

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/enum.Reg32.html b/juicebox_asm/prelude/enum.Reg32.html index 8b82fc5..27ef00c 100644 --- a/juicebox_asm/prelude/enum.Reg32.html +++ b/juicebox_asm/prelude/enum.Reg32.html @@ -1,4 +1,4 @@ -Reg32 in juicebox_asm::prelude - Rust
#[repr(u8)]
+Reg32 in juicebox_asm::prelude - Rust
#[repr(u8)]
 pub enum Reg32 {
 
Show 16 variants eax, ecx, @@ -16,8 +16,8 @@ pub enum Reg32 { r13d, r14d, r15d, -
}
Expand description

General purpose register operands.

-

Variants§

§

eax

§

ecx

§

edx

§

ebx

§

esp

§

ebp

§

esi

§

edi

§

r8d

§

r9d

§

r10d

§

r11d

§

r12d

§

r13d

§

r14d

§

r15d

Trait Implementations§

Emit an add instruction.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit a decrement instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit a logical compare instruction. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+
}
Expand description

Definition of 32 bit registers.

+

Variants§

§

eax

§

ecx

§

edx

§

ebx

§

esp

§

ebp

§

esi

§

edi

§

r8d

§

r9d

§

r10d

§

r11d

§

r12d

§

r13d

§

r14d

§

r15d

Trait Implementations§

Emit an add instruction.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit a decrement instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit a logical compare instruction. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/enum.Reg64.html b/juicebox_asm/prelude/enum.Reg64.html index 7dc291f..7682091 100644 --- a/juicebox_asm/prelude/enum.Reg64.html +++ b/juicebox_asm/prelude/enum.Reg64.html @@ -1,4 +1,4 @@ -Reg64 in juicebox_asm::prelude - Rust
#[repr(u8)]
+Reg64 in juicebox_asm::prelude - Rust
#[repr(u8)]
 pub enum Reg64 {
 
Show 16 variants rax, rcx, @@ -16,8 +16,8 @@ pub enum Reg64 { r13, r14, r15, -
}
Expand description

General purpose register operands.

-

Variants§

§

rax

§

rcx

§

rdx

§

rbx

§

rsp

§

rbp

§

rsi

§

rdi

§

r8

§

r9

§

r10

§

r11

§

r12

§

r13

§

r14

§

r15

Trait Implementations§

Emit an add instruction.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit a decrement instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit a logical compare instruction. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+
}
Expand description

Definition of 64 bit registers.

+

Variants§

§

rax

§

rcx

§

rdx

§

rbx

§

rsp

§

rbp

§

rsi

§

rdi

§

r8

§

r9

§

r10

§

r11

§

r12

§

r13

§

r14

§

r15

Trait Implementations§

Emit an add instruction.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit a decrement instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit a logical compare instruction. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/enum.Reg8.html b/juicebox_asm/prelude/enum.Reg8.html index 40d7cda..09ac1e5 100644 --- a/juicebox_asm/prelude/enum.Reg8.html +++ b/juicebox_asm/prelude/enum.Reg8.html @@ -1,4 +1,4 @@ -Reg8 in juicebox_asm::prelude - Rust
#[repr(u8)]
+Reg8 in juicebox_asm::prelude - Rust
#[repr(u8)]
 pub enum Reg8 {
 
Show 20 variants al, cl, @@ -20,8 +20,8 @@ pub enum Reg8 { ch, dh, bh, -
}
Expand description

General purpose register operands.

-

Variants§

§

al

§

cl

§

dl

§

bl

§

spl

§

bpl

§

sil

§

dil

§

r8l

§

r9l

§

r10l

§

r11l

§

r12l

§

r13l

§

r14l

§

r15l

§

ah

§

ch

§

dh

§

bh

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+
}
Expand description

Definition of 8 bit registers.

+

Variants§

§

al

§

cl

§

dl

§

bl

§

spl

§

bpl

§

sil

§

dil

§

r8l

§

r9l

§

r10l

§

r11l

§

r12l

§

r13l

§

r14l

§

r15l

§

ah

§

ch

§

dh

§

bh

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/index.html b/juicebox_asm/prelude/index.html index beedf58..bc32b86 100644 --- a/juicebox_asm/prelude/index.html +++ b/juicebox_asm/prelude/index.html @@ -1 +1,2 @@ -juicebox_asm::prelude - Rust

Module juicebox_asm::prelude

source ·

Re-exports

pub use crate::Asm;
pub use crate::MemOp;

Structs

Immediate operand.
Immediate operand.
Immediate operand.
Immediate operand.
A label which is used as target for jump instructions.

Enums

General purpose register operands.
General purpose register operands.
General purpose register operands.
General purpose register operands.

Traits

\ No newline at end of file +juicebox_asm::prelude - Rust

Module juicebox_asm::prelude

source ·
Expand description

Crate prelude, which can be used to import the most important types at once.

+

Re-exports

pub use crate::Asm;
pub use crate::MemOp;

Structs

Type representing an 8 bit immediate.
Type representing a 16 bit immediate.
Type representing a 32 bit immediate.
Type representing a 64 bit immediate.
A label which is used as target for jump instructions.

Enums

Definition of 8 bit registers.
Definition of 16 bit registers.
Definition of 32 bit registers.
Definition of 64 bit registers.

Traits

\ No newline at end of file diff --git a/juicebox_asm/prelude/sidebar-items.js b/juicebox_asm/prelude/sidebar-items.js index 5a5bcf1..6491a87 100644 --- a/juicebox_asm/prelude/sidebar-items.js +++ b/juicebox_asm/prelude/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":[["Reg16","General purpose register operands."],["Reg32","General purpose register operands."],["Reg64","General purpose register operands."],["Reg8","General purpose register operands."]],"struct":[["Imm16","Immediate operand."],["Imm32","Immediate operand."],["Imm64","Immediate operand."],["Imm8","Immediate operand."],["Label","A label which is used as target for jump instructions."]],"trait":[["Add",""],["Dec",""],["Jmp",""],["Jnz",""],["Jz",""],["Mov",""],["Test",""]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":[["Reg16","Definition of 16 bit registers."],["Reg32","Definition of 32 bit registers."],["Reg64","Definition of 64 bit registers."],["Reg8","Definition of 8 bit registers."]],"struct":[["Imm16","Type representing a 16 bit immediate."],["Imm32","Type representing a 32 bit immediate."],["Imm64","Type representing a 64 bit immediate."],["Imm8","Type representing an 8 bit immediate."],["Label","A label which is used as target for jump instructions."]],"trait":[["Add",""],["Dec",""],["Jmp",""],["Jnz",""],["Jz",""],["Mov",""],["Test",""]]}; \ No newline at end of file diff --git a/juicebox_asm/prelude/struct.Imm16.html b/juicebox_asm/prelude/struct.Imm16.html index 10d476b..e2e6bea 100644 --- a/juicebox_asm/prelude/struct.Imm16.html +++ b/juicebox_asm/prelude/struct.Imm16.html @@ -1,5 +1,5 @@ -Imm16 in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Imm16

source ·
pub struct Imm16(_);
Expand description

Immediate operand.

-

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+Imm16 in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Imm16

source ·
pub struct Imm16(_);
Expand description

Type representing a 16 bit immediate.

+

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/struct.Imm32.html b/juicebox_asm/prelude/struct.Imm32.html index cadbf85..df69edb 100644 --- a/juicebox_asm/prelude/struct.Imm32.html +++ b/juicebox_asm/prelude/struct.Imm32.html @@ -1,5 +1,5 @@ -Imm32 in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Imm32

source ·
pub struct Imm32(_);
Expand description

Immediate operand.

-

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+Imm32 in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Imm32

source ·
pub struct Imm32(_);
Expand description

Type representing a 32 bit immediate.

+

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/struct.Imm64.html b/juicebox_asm/prelude/struct.Imm64.html index 2df9f88..6fd7442 100644 --- a/juicebox_asm/prelude/struct.Imm64.html +++ b/juicebox_asm/prelude/struct.Imm64.html @@ -1,5 +1,5 @@ -Imm64 in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Imm64

source ·
pub struct Imm64(_);
Expand description

Immediate operand.

-

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+Imm64 in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Imm64

source ·
pub struct Imm64(_);
Expand description

Type representing a 64 bit immediate.

+

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/struct.Imm8.html b/juicebox_asm/prelude/struct.Imm8.html index 33bc618..7194fc2 100644 --- a/juicebox_asm/prelude/struct.Imm8.html +++ b/juicebox_asm/prelude/struct.Imm8.html @@ -1,5 +1,5 @@ -Imm8 in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Imm8

source ·
pub struct Imm8(_);
Expand description

Immediate operand.

-

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+Imm8 in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Imm8

source ·
pub struct Imm8(_);
Expand description

Type representing an 8 bit immediate.

+

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/struct.Label.html b/juicebox_asm/prelude/struct.Label.html index a9346b4..7675857 100644 --- a/juicebox_asm/prelude/struct.Label.html +++ b/juicebox_asm/prelude/struct.Label.html @@ -1,4 +1,4 @@ -Label in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Label

source ·
pub struct Label { /* private fields */ }
Expand description

A label which is used as target for jump instructions.

+Label in juicebox_asm::prelude - Rust

Struct juicebox_asm::prelude::Label

source ·
pub struct Label { /* private fields */ }
Expand description

A label which is used as target for jump instructions.

use juicebox_asm::prelude::*;
 
@@ -12,8 +12,8 @@ asm.bind(&mut lbl);

Panics

Panics if the label is dropped while not yet bound, or having unresolved relocations. This is mainly a safety-guard to detect wrong usage.

-

Implementations§

Create a new unbound Label.

-

Trait Implementations§

Executes the destructor for this type. Read more
Emit an unconditional jump instruction.
Emit a conditional jump if not zero instruction (ZF = 0).
Emit a conditional jump if zero instruction (ZF = 1).

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Implementations§

Create a new unbound Label.

+

Trait Implementations§

Executes the destructor for this type. Read more
Emit an unconditional jump instruction.
Emit a conditional jump if not zero instruction (ZF = 0).
Emit a conditional jump if zero instruction (ZF = 1).

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/juicebox_asm/prelude/trait.Add.html b/juicebox_asm/prelude/trait.Add.html index 71c02d9..38d3ac0 100644 --- a/juicebox_asm/prelude/trait.Add.html +++ b/juicebox_asm/prelude/trait.Add.html @@ -1,4 +1,4 @@ -Add in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Add

source ·
pub trait Add<T, U> {
+Add in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Add

source ·
pub trait Add<T, U> {
     fn add(&mut self, op1: T, op2: U);
-}

Required Methods§

Emit an add instruction.

+}

Required Methods§

Emit an add instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/prelude/trait.Dec.html b/juicebox_asm/prelude/trait.Dec.html index 099f88f..d99761d 100644 --- a/juicebox_asm/prelude/trait.Dec.html +++ b/juicebox_asm/prelude/trait.Dec.html @@ -1,4 +1,4 @@ -Dec in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Dec

source ·
pub trait Dec<T> {
+Dec in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Dec

source ·
pub trait Dec<T> {
     fn dec(&mut self, op1: T);
-}

Required Methods§

Emit a decrement instruction.

+}

Required Methods§

Emit a decrement instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/prelude/trait.Jmp.html b/juicebox_asm/prelude/trait.Jmp.html index 4d2bc46..282a71c 100644 --- a/juicebox_asm/prelude/trait.Jmp.html +++ b/juicebox_asm/prelude/trait.Jmp.html @@ -1,4 +1,4 @@ -Jmp in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Jmp

source ·
pub trait Jmp<T> {
+Jmp in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Jmp

source ·
pub trait Jmp<T> {
     fn jmp(&mut self, op1: T);
-}

Required Methods§

Emit an unconditional jump instruction.

+}

Required Methods§

Emit an unconditional jump instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/prelude/trait.Jnz.html b/juicebox_asm/prelude/trait.Jnz.html index 8bd9098..a1172bd 100644 --- a/juicebox_asm/prelude/trait.Jnz.html +++ b/juicebox_asm/prelude/trait.Jnz.html @@ -1,4 +1,4 @@ -Jnz in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Jnz

source ·
pub trait Jnz<T> {
+Jnz in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Jnz

source ·
pub trait Jnz<T> {
     fn jnz(&mut self, op1: T);
-}

Required Methods§

Emit a conditional jump if not zero instruction (ZF = 0).

+}

Required Methods§

Emit a conditional jump if not zero instruction (ZF = 0).

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/prelude/trait.Jz.html b/juicebox_asm/prelude/trait.Jz.html index 1e8cba2..6e7d6fb 100644 --- a/juicebox_asm/prelude/trait.Jz.html +++ b/juicebox_asm/prelude/trait.Jz.html @@ -1,4 +1,4 @@ -Jz in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Jz

source ·
pub trait Jz<T> {
+Jz in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Jz

source ·
pub trait Jz<T> {
     fn jz(&mut self, op1: T);
-}

Required Methods§

Emit a conditional jump if zero instruction (ZF = 1).

+}

Required Methods§

Emit a conditional jump if zero instruction (ZF = 1).

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/prelude/trait.Mov.html b/juicebox_asm/prelude/trait.Mov.html index 96188d4..453e913 100644 --- a/juicebox_asm/prelude/trait.Mov.html +++ b/juicebox_asm/prelude/trait.Mov.html @@ -1,4 +1,4 @@ -Mov in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Mov

source ·
pub trait Mov<T, U> {
+Mov in juicebox_asm::prelude - Rust

Trait juicebox_asm::prelude::Mov

source ·
pub trait Mov<T, U> {
     fn mov(&mut self, op1: T, op2: U);
-}

Required Methods§

Emit an move instruction.

+}

Required Methods§

Emit an move instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/prelude/trait.Test.html b/juicebox_asm/prelude/trait.Test.html index 4dacf0b..7ac23e5 100644 --- a/juicebox_asm/prelude/trait.Test.html +++ b/juicebox_asm/prelude/trait.Test.html @@ -1,6 +1,6 @@ -Test in juicebox_asm::prelude - Rust
pub trait Test<T, U> {
+Test in juicebox_asm::prelude - Rust
pub trait Test<T, U> {
     fn test(&mut self, op1: T, op2: U);
-}

Required Methods§

Emit a logical compare instruction.

+}

Required Methods§

Emit a logical compare instruction.

Computes the bit-wise logical AND of first operand and the second operand and sets the SF, ZF, and PF status flags, the result is discarded.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/rt/index.html b/juicebox_asm/rt/index.html deleted file mode 100644 index d6ffe84..0000000 --- a/juicebox_asm/rt/index.html +++ /dev/null @@ -1 +0,0 @@ -juicebox_asm::rt - Rust

Module juicebox_asm::rt

source ·

Structs

A simple mmaped runtime with executable pages.
\ No newline at end of file diff --git a/juicebox_asm/rt/sidebar-items.js b/juicebox_asm/rt/sidebar-items.js deleted file mode 100644 index 9040803..0000000 --- a/juicebox_asm/rt/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":[["Runtime","A simple `mmap`ed runtime with executable pages."]]}; \ No newline at end of file diff --git a/juicebox_asm/rt/struct.Runtime.html b/juicebox_asm/rt/struct.Runtime.html index 59812f1..801189d 100644 --- a/juicebox_asm/rt/struct.Runtime.html +++ b/juicebox_asm/rt/struct.Runtime.html @@ -1,8 +1,11 @@ -Runtime in juicebox_asm::rt - Rust

Struct juicebox_asm::rt::Runtime

source ·
pub struct Runtime { /* private fields */ }
Expand description

A simple mmaped runtime with executable pages.

-

Implementations§

Create a new Runtime.

-

Reinterpret the block of code as F.

-

Trait Implementations§

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

-

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file + + + + + Redirection + + +

Redirecting to ../../juicebox_asm/struct.Runtime.html...

+ + + \ No newline at end of file diff --git a/juicebox_asm/sidebar-items.js b/juicebox_asm/sidebar-items.js index a1b0c17..3f5deba 100644 --- a/juicebox_asm/sidebar-items.js +++ b/juicebox_asm/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":[["MemOp",""]],"mod":[["prelude",""],["rt",""]],"struct":[["Asm",""]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":[["MemOp","Type representing a memory operand."],["Reg16","Definition of 16 bit registers."],["Reg32","Definition of 32 bit registers."],["Reg64","Definition of 64 bit registers."],["Reg8","Definition of 8 bit registers."]],"mod":[["prelude","Crate prelude, which can be used to import the most important types at once."]],"struct":[["Asm","`x64` jit assembler."],["Imm16","Type representing a 16 bit immediate."],["Imm32","Type representing a 32 bit immediate."],["Imm64","Type representing a 64 bit immediate."],["Imm8","Type representing an 8 bit immediate."],["Label","A label which is used as target for jump instructions."],["Runtime","A simple `mmap`ed runtime with executable pages."]]}; \ No newline at end of file diff --git a/juicebox_asm/struct.Asm.html b/juicebox_asm/struct.Asm.html index d227900..31abbb5 100644 --- a/juicebox_asm/struct.Asm.html +++ b/juicebox_asm/struct.Asm.html @@ -1,5 +1,8 @@ -Asm in juicebox_asm - Rust

Struct juicebox_asm::Asm

source ·
pub struct Asm { /* private fields */ }

Implementations§

Bind the Label to the current location.

-

If the Label is bound, patch any pending relocation.

+Asm in juicebox_asm - Rust

Struct juicebox_asm::Asm

source ·
pub struct Asm { /* private fields */ }
Expand description

x64 jit assembler.

+

Implementations§

Create a new x64 jit assembler.

+

Consume the assembler and get the emitted code.

+

Bind the Label to the current location.

+

If the Label is bound, patch any pending relocation.

Trait Implementations§

Emit an add instruction.
Emit an add instruction.
Emit a decrement instruction.
Emit a decrement instruction.
Emit an unconditional jump instruction.
Emit a conditional jump if not zero instruction (ZF = 0).
Emit a conditional jump if zero instruction (ZF = 1).
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit an move instruction.
Emit a logical compare instruction. Read more
Emit a logical compare instruction. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of diff --git a/juicebox_asm/struct.Imm16.html b/juicebox_asm/struct.Imm16.html new file mode 100644 index 0000000..5174881 --- /dev/null +++ b/juicebox_asm/struct.Imm16.html @@ -0,0 +1,6 @@ +Imm16 in juicebox_asm - Rust

Struct juicebox_asm::Imm16

source ·
pub struct Imm16(_);
Expand description

Type representing a 16 bit immediate.

+

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/struct.Imm32.html b/juicebox_asm/struct.Imm32.html new file mode 100644 index 0000000..2317786 --- /dev/null +++ b/juicebox_asm/struct.Imm32.html @@ -0,0 +1,6 @@ +Imm32 in juicebox_asm - Rust

Struct juicebox_asm::Imm32

source ·
pub struct Imm32(_);
Expand description

Type representing a 32 bit immediate.

+

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/struct.Imm64.html b/juicebox_asm/struct.Imm64.html new file mode 100644 index 0000000..e9dcc73 --- /dev/null +++ b/juicebox_asm/struct.Imm64.html @@ -0,0 +1,6 @@ +Imm64 in juicebox_asm - Rust

Struct juicebox_asm::Imm64

source ·
pub struct Imm64(_);
Expand description

Type representing a 64 bit immediate.

+

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/struct.Imm8.html b/juicebox_asm/struct.Imm8.html new file mode 100644 index 0000000..720b3cb --- /dev/null +++ b/juicebox_asm/struct.Imm8.html @@ -0,0 +1,6 @@ +Imm8 in juicebox_asm - Rust

Struct juicebox_asm::Imm8

source ·
pub struct Imm8(_);
Expand description

Type representing an 8 bit immediate.

+

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Emit an move instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/struct.Label.html b/juicebox_asm/struct.Label.html new file mode 100644 index 0000000..9b2a9c5 --- /dev/null +++ b/juicebox_asm/struct.Label.html @@ -0,0 +1,20 @@ +Label in juicebox_asm - Rust

Struct juicebox_asm::Label

source ·
pub struct Label { /* private fields */ }
Expand description

A label which is used as target for jump instructions.

+ +
use juicebox_asm::prelude::*;
+
+let mut lbl = Label::new();
+let mut asm = Asm::new();
+
+// Skip the mov instruction.
+asm.jmp(&mut lbl);
+asm.mov(Reg64::rax, Reg64::rax);
+asm.bind(&mut lbl);
+

Panics

+

Panics if the label is dropped while not yet bound, or having unresolved relocations. +This is mainly a safety-guard to detect wrong usage.

+

Implementations§

Create a new unbound Label.

+

Trait Implementations§

Executes the destructor for this type. Read more
Emit an unconditional jump instruction.
Emit a conditional jump if not zero instruction (ZF = 0).
Emit a conditional jump if zero instruction (ZF = 1).

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file diff --git a/juicebox_asm/struct.Runtime.html b/juicebox_asm/struct.Runtime.html new file mode 100644 index 0000000..9f0da89 --- /dev/null +++ b/juicebox_asm/struct.Runtime.html @@ -0,0 +1,8 @@ +Runtime in juicebox_asm - Rust

Struct juicebox_asm::Runtime

source ·
pub struct Runtime { /* private fields */ }
Expand description

A simple mmaped runtime with executable pages.

+

Implementations§

Create a new Runtime.

+

Reinterpret the block of code as F.

+

Trait Implementations§

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file -- cgit v1.2.3