From 9ebb4b9d82decbd9e8ea901e6d240e1af9f190b3 Mon Sep 17 00:00:00 2001 From: johannst Date: Wed, 11 Dec 2024 21:52:27 +0000 Subject: deploy: aedbcbf6c8e45367364a852d5b10d45b27b61c44 --- bf/index.html | 2 +- crates.js | 4 +- gen/all.html | 1 + gen/index.html | 4 + gen/sidebar-items.js | 1 + help.html | 2 +- juicebox_asm/all.html | 2 +- juicebox_asm/enum.MemOp.html | 4 +- juicebox_asm/enum.Reg64.html | 4 +- juicebox_asm/insn/index.html | 4 +- juicebox_asm/insn/sidebar-items.js | 2 +- juicebox_asm/insn/trait.Add.html | 6 +- juicebox_asm/insn/trait.Call.html | 4 +- juicebox_asm/insn/trait.Cmovnz.html | 4 +- juicebox_asm/insn/trait.Cmovz.html | 4 +- juicebox_asm/insn/trait.Cmp.html | 4 +- juicebox_asm/insn/trait.Dec.html | 4 +- juicebox_asm/insn/trait.Inc.html | 4 +- juicebox_asm/insn/trait.Jmp.html | 4 +- juicebox_asm/insn/trait.Jnz.html | 4 +- juicebox_asm/insn/trait.Jz.html | 4 +- juicebox_asm/insn/trait.Mov.html | 4 +- juicebox_asm/insn/trait.Pop.html | 4 +- juicebox_asm/insn/trait.Push.html | 4 +- juicebox_asm/insn/trait.Sub.html | 6 + juicebox_asm/insn/trait.Test.html | 4 +- juicebox_asm/insn/trait.Xor.html | 4 +- juicebox_asm/struct.Asm.html | 4 +- juicebox_asm/struct.Imm16.html | 2 +- juicebox_asm/struct.Imm8.html | 4 +- search-index.js | 4 +- search.desc/gen/gen-desc-0-.js | 1 + search.desc/juicebox_asm/juicebox_asm-desc-0-.js | 2 +- settings.html | 2 +- src-files.js | 4 +- src/bf/bf.rs.html | 144 ++++++++++++++++++----- src/gen/gen.rs.html | 91 ++++++++++++++ src/juicebox_asm/insn.rs.html | 24 +++- src/juicebox_asm/insn/add.rs.html | 16 ++- src/juicebox_asm/insn/sub.rs.html | 29 +++++ trait.impl/juicebox_asm/insn/trait.Sub.js | 9 ++ 41 files changed, 344 insertions(+), 90 deletions(-) create mode 100644 gen/all.html create mode 100644 gen/index.html create mode 100644 gen/sidebar-items.js create mode 100644 juicebox_asm/insn/trait.Sub.html create mode 100644 search.desc/gen/gen-desc-0-.js create mode 100644 src/gen/gen.rs.html create mode 100644 src/juicebox_asm/insn/sub.rs.html create mode 100644 trait.impl/juicebox_asm/insn/trait.Sub.js diff --git a/bf/index.html b/bf/index.html index 05273e9..e0a73bd 100644 --- a/bf/index.html +++ b/bf/index.html @@ -1,4 +1,4 @@ -bf - Rust

Crate bf

source
Expand description

Brainfuck VM.

+bf - Rust

Crate bf

source
Expand description

Brainfuck VM.

This example implements a simple brainfuck interpreter [BrainfuckInterp] and a jit compiler [BrainfuckJit].

diff --git a/crates.js b/crates.js index 63a44e3..11e0064 100644 --- a/crates.js +++ b/crates.js @@ -1,2 +1,2 @@ -window.ALL_CRATES = ["add","bf","fib","juicebox_asm","tiny_vm"]; -//{"start":21,"fragment_lengths":[5,5,6,15,10]} \ No newline at end of file +window.ALL_CRATES = ["add","bf","fib","gen","juicebox_asm","tiny_vm"]; +//{"start":21,"fragment_lengths":[5,5,6,6,15,10]} \ No newline at end of file diff --git a/gen/all.html b/gen/all.html new file mode 100644 index 0000000..1e0c258 --- /dev/null +++ b/gen/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

\ No newline at end of file diff --git a/gen/index.html b/gen/index.html new file mode 100644 index 0000000..df51ecc --- /dev/null +++ b/gen/index.html @@ -0,0 +1,4 @@ +gen - Rust

Crate gen

source
Expand description

Add example.

+

Jit compile a function at runtime (generate native host code) which calls a function defined in +the example based on the SystemV abi to demonstrate the juicebox_asm crate.

+
\ No newline at end of file diff --git a/gen/sidebar-items.js b/gen/sidebar-items.js new file mode 100644 index 0000000..5244ce0 --- /dev/null +++ b/gen/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/help.html b/help.html index 86f2973..8f7d8a9 100644 --- a/help.html +++ b/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/juicebox_asm/all.html b/juicebox_asm/all.html index 8d73603..33ad1d4 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 1a413d6..9f6bc5f 100644 --- a/juicebox_asm/enum.MemOp.html +++ b/juicebox_asm/enum.MemOp.html @@ -1,4 +1,4 @@ -MemOp in juicebox_asm - Rust
juicebox_asm

Enum MemOp

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

Enum MemOp

source
pub enum MemOp {
     Indirect(Reg64),
     IndirectDisp(Reg64, i32),
     IndirectBaseIndex(Reg64, Reg64),
@@ -6,7 +6,7 @@
 

Variants§

§

Indirect(Reg64)

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

§

IndirectDisp(Reg64, i32)

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

§

IndirectBaseIndex(Reg64, Reg64)

An indirect memory operand in the form base + index, eg mov [rax + rcx], rdx.

-

Trait Implementations§

source§

impl Add<MemOp, Imm16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm16)

Emit an add instruction.
source§

impl Add<MemOp, Reg16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg16)

Emit an add instruction.
source§

impl Add<MemOp, Reg64> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg64)

Emit an add instruction.
source§

impl Add<Reg64, MemOp> for Asm

source§

fn add(&mut self, op1: Reg64, op2: MemOp)

Emit an add instruction.
source§

impl Clone for MemOp

source§

fn clone(&self) -> MemOp

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Cmp<MemOp, Imm16> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm16)

Emit a compare instruction. Read more
source§

impl Cmp<MemOp, Imm8> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm8)

Emit a compare instruction. Read more
source§

impl Mov<MemOp, Imm16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Imm16)

Emit an move instruction.
source§

impl Mov<MemOp, Reg16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg16)

Emit an move instruction.
source§

impl Mov<MemOp, Reg32> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg32)

Emit an move instruction.
source§

impl Mov<MemOp, Reg64> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg64)

Emit an move instruction.
source§

impl Mov<MemOp, Reg8> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg8)

Emit an move instruction.
source§

impl Mov<Reg16, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg32, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg32, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg64, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg8, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: MemOp)

Emit an move instruction.
source§

impl Test<MemOp, Imm16> for Asm

source§

fn test(&mut self, op1: MemOp, op2: Imm16)

Emit a logical compare instruction. Read more
source§

impl Copy for MemOp

Auto Trait Implementations§

§

impl Freeze for MemOp

§

impl RefUnwindSafe for MemOp

§

impl Send for MemOp

§

impl Sync for MemOp

§

impl Unpin for MemOp

§

impl UnwindSafe for MemOp

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Add<MemOp, Imm16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm16)

Emit an add instruction.
source§

impl Add<MemOp, Imm8> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm8)

Emit an add instruction.
source§

impl Add<MemOp, Reg16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg16)

Emit an add instruction.
source§

impl Add<MemOp, Reg64> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg64)

Emit an add instruction.
source§

impl Add<Reg64, MemOp> for Asm

source§

fn add(&mut self, op1: Reg64, op2: MemOp)

Emit an add instruction.
source§

impl Clone for MemOp

source§

fn clone(&self) -> MemOp

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Cmp<MemOp, Imm16> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm16)

Emit a compare instruction. Read more
source§

impl Cmp<MemOp, Imm8> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm8)

Emit a compare instruction. Read more
source§

impl Mov<MemOp, Imm16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Imm16)

Emit an move instruction.
source§

impl Mov<MemOp, Reg16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg16)

Emit an move instruction.
source§

impl Mov<MemOp, Reg32> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg32)

Emit an move instruction.
source§

impl Mov<MemOp, Reg64> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg64)

Emit an move instruction.
source§

impl Mov<MemOp, Reg8> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg8)

Emit an move instruction.
source§

impl Mov<Reg16, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg32, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg32, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg64, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg8, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: MemOp)

Emit an move instruction.
source§

impl Sub<MemOp, Imm8> for Asm

source§

fn sub(&mut self, op1: MemOp, op2: Imm8)

Emit an sub instruction.
source§

impl Test<MemOp, Imm16> for Asm

source§

fn test(&mut self, op1: MemOp, op2: Imm16)

Emit a logical compare instruction. Read more
source§

impl Copy for MemOp

Auto Trait Implementations§

§

impl Freeze for MemOp

§

impl RefUnwindSafe for MemOp

§

impl Send for MemOp

§

impl Sync for MemOp

§

impl Unpin for MemOp

§

impl UnwindSafe for MemOp

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where diff --git a/juicebox_asm/enum.Reg64.html b/juicebox_asm/enum.Reg64.html index af6ed81..137f8ea 100644 --- a/juicebox_asm/enum.Reg64.html +++ b/juicebox_asm/enum.Reg64.html @@ -1,4 +1,4 @@ -Reg64 in juicebox_asm - Rust
juicebox_asm

Enum Reg64

source
#[repr(u8)]
pub enum Reg64 { +Reg64 in juicebox_asm - Rust
juicebox_asm

Enum Reg64

source
#[repr(u8)]
pub enum Reg64 {
Show 16 variants rax = 0, rcx = 1, rdx = 2, @@ -16,7 +16,7 @@ r14 = 14, r15 = 15,
}
Expand description

Definition of 64 bit registers.

-

Variants§

§

rax = 0

§

rcx = 1

§

rdx = 2

§

rbx = 3

§

rsp = 4

§

rbp = 5

§

rsi = 6

§

rdi = 7

§

r8 = 8

§

r9 = 9

§

r10 = 10

§

r11 = 11

§

r12 = 12

§

r13 = 13

§

r14 = 14

§

r15 = 15

Trait Implementations§

source§

impl Add<MemOp, Reg64> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg64)

Emit an add instruction.
source§

impl Add<Reg64, MemOp> for Asm

source§

fn add(&mut self, op1: Reg64, op2: MemOp)

Emit an add instruction.
source§

impl Add<Reg64, Reg64> for Asm

source§

fn add(&mut self, op1: Reg64, op2: Reg64)

Emit an add instruction.
source§

impl Call<Reg64> for Asm

source§

fn call(&mut self, op1: Reg64)

Emit a call instruction.
source§

impl Clone for Reg64

source§

fn clone(&self) -> Reg64

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Cmovnz<Reg64, Reg64> for Asm

source§

fn cmovnz(&mut self, op1: Reg64, op2: Reg64)

Emit a (conditional) move if not zero instruction. Read more
source§

impl Cmovz<Reg64, Reg64> for Asm

source§

fn cmovz(&mut self, op1: Reg64, op2: Reg64)

Emit a (conditional) move if zero instruction. Read more
source§

impl Dec<Reg64> for Asm

source§

fn dec(&mut self, op1: Reg64)

Emit a decrement instruction.
source§

impl Inc<Reg64> for Asm

source§

fn inc(&mut self, op1: Reg64)

Emit a increment instruction.
source§

impl Mov<MemOp, Reg64> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg64)

Emit an move instruction.
source§

impl Mov<Reg64, Imm64> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: Imm64)

Emit an move instruction.
source§

impl Mov<Reg64, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg64, Reg64> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: Reg64)

Emit an move instruction.
source§

impl Pop<Reg64> for Asm

source§

fn pop(&mut self, op1: Reg64)

Emit a pop instruction.
source§

impl Push<Reg64> for Asm

source§

fn push(&mut self, op1: Reg64)

Emit a push instruction.
source§

impl Test<Reg64, Reg64> for Asm

source§

fn test(&mut self, op1: Reg64, op2: Reg64)

Emit a logical compare instruction. Read more
source§

impl Xor<Reg64, Reg64> for Asm

source§

fn xor(&mut self, op1: Reg64, op2: Reg64)

Emit a xor instruction.
source§

impl Copy for Reg64

Auto Trait Implementations§

§

impl Freeze for Reg64

§

impl RefUnwindSafe for Reg64

§

impl Send for Reg64

§

impl Sync for Reg64

§

impl Unpin for Reg64

§

impl UnwindSafe for Reg64

Blanket Implementations§

source§

impl<T> Any for T
where +

Variants§

§

rax = 0

§

rcx = 1

§

rdx = 2

§

rbx = 3

§

rsp = 4

§

rbp = 5

§

rsi = 6

§

rdi = 7

§

r8 = 8

§

r9 = 9

§

r10 = 10

§

r11 = 11

§

r12 = 12

§

r13 = 13

§

r14 = 14

§

r15 = 15

Trait Implementations§

source§

impl Add<MemOp, Reg64> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg64)

Emit an add instruction.
source§

impl Add<Reg64, MemOp> for Asm

source§

fn add(&mut self, op1: Reg64, op2: MemOp)

Emit an add instruction.
source§

impl Add<Reg64, Reg64> for Asm

source§

fn add(&mut self, op1: Reg64, op2: Reg64)

Emit an add instruction.
source§

impl Call<Reg64> for Asm

source§

fn call(&mut self, op1: Reg64)

Emit a call instruction.
source§

impl Clone for Reg64

source§

fn clone(&self) -> Reg64

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Cmovnz<Reg64, Reg64> for Asm

source§

fn cmovnz(&mut self, op1: Reg64, op2: Reg64)

Emit a (conditional) move if not zero instruction. Read more
source§

impl Cmovz<Reg64, Reg64> for Asm

source§

fn cmovz(&mut self, op1: Reg64, op2: Reg64)

Emit a (conditional) move if zero instruction. Read more
source§

impl Dec<Reg64> for Asm

source§

fn dec(&mut self, op1: Reg64)

Emit a decrement instruction.
source§

impl Inc<Reg64> for Asm

source§

fn inc(&mut self, op1: Reg64)

Emit a increment instruction.
source§

impl Mov<MemOp, Reg64> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg64)

Emit an move instruction.
source§

impl Mov<Reg64, Imm64> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: Imm64)

Emit an move instruction.
source§

impl Mov<Reg64, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg64, Reg64> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: Reg64)

Emit an move instruction.
source§

impl Pop<Reg64> for Asm

source§

fn pop(&mut self, op1: Reg64)

Emit a pop instruction.
source§

impl Push<Reg64> for Asm

source§

fn push(&mut self, op1: Reg64)

Emit a push instruction.
source§

impl Sub<Reg64, Reg64> for Asm

source§

fn sub(&mut self, op1: Reg64, op2: Reg64)

Emit an sub instruction.
source§

impl Test<Reg64, Reg64> for Asm

source§

fn test(&mut self, op1: Reg64, op2: Reg64)

Emit a logical compare instruction. Read more
source§

impl Xor<Reg64, Reg64> for Asm

source§

fn xor(&mut self, op1: Reg64, op2: Reg64)

Emit a xor instruction.
source§

impl Copy for Reg64

Auto Trait Implementations§

§

impl Freeze for Reg64

§

impl RefUnwindSafe for Reg64

§

impl Send for Reg64

§

impl Sync for Reg64

§

impl Unpin for Reg64

§

impl UnwindSafe for Reg64

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where diff --git a/juicebox_asm/insn/index.html b/juicebox_asm/insn/index.html index db96659..fde3f9e 100644 --- a/juicebox_asm/insn/index.html +++ b/juicebox_asm/insn/index.html @@ -1,2 +1,2 @@ -juicebox_asm::insn - Rust
juicebox_asm

Module insn

source
Expand description

Trait definitions of various instructions.

-

Traits§

  • Trait for add instruction kinds.
  • Trait for call instruction kinds.
  • Trait for cmovnz instruction kinds.
  • Trait for cmovz instruction kinds.
  • Trait for cmp instruction kinds.
  • Trait for dec instruction kinds.
  • Trait for inc instruction kinds.
  • Trait for jmp instruction kinds.
  • Trait for jnz instruction kinds.
  • Trait for jz instruction kinds.
  • Trait for mov instruction kinds.
  • Trait for pop instruction kinds.
  • Trait for push instruction kinds.
  • Trait for test instruction kinds.
  • Trait for xor instruction kinds.
\ No newline at end of file +juicebox_asm::insn - Rust
juicebox_asm

Module insn

source
Expand description

Trait definitions of various instructions.

+

Traits§

  • Trait for add instruction kinds.
  • Trait for call instruction kinds.
  • Trait for cmovnz instruction kinds.
  • Trait for cmovz instruction kinds.
  • Trait for cmp instruction kinds.
  • Trait for dec instruction kinds.
  • Trait for inc instruction kinds.
  • Trait for jmp instruction kinds.
  • Trait for jnz instruction kinds.
  • Trait for jz instruction kinds.
  • Trait for mov instruction kinds.
  • Trait for pop instruction kinds.
  • Trait for push instruction kinds.
  • Trait for sub instruction kinds.
  • Trait for test instruction kinds.
  • Trait for xor instruction kinds.
\ No newline at end of file diff --git a/juicebox_asm/insn/sidebar-items.js b/juicebox_asm/insn/sidebar-items.js index 19a48ac..d803043 100644 --- a/juicebox_asm/insn/sidebar-items.js +++ b/juicebox_asm/insn/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"trait":["Add","Call","Cmovnz","Cmovz","Cmp","Dec","Inc","Jmp","Jnz","Jz","Mov","Pop","Push","Test","Xor"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"trait":["Add","Call","Cmovnz","Cmovz","Cmp","Dec","Inc","Jmp","Jnz","Jz","Mov","Pop","Push","Sub","Test","Xor"]}; \ No newline at end of file diff --git a/juicebox_asm/insn/trait.Add.html b/juicebox_asm/insn/trait.Add.html index 54795b8..a7fc8e3 100644 --- a/juicebox_asm/insn/trait.Add.html +++ b/juicebox_asm/insn/trait.Add.html @@ -1,6 +1,6 @@ -Add in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Add

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

Trait Add

source
pub trait Add<T, U> {
     // Required method
     fn add(&mut self, op1: T, op2: U);
 }
Expand description

Trait for add instruction kinds.

-

Required Methods§

source

fn add(&mut self, op1: T, op2: U)

Emit an add instruction.

-

Implementors§

\ No newline at end of file +

Required Methods§

source

fn add(&mut self, op1: T, op2: U)

Emit an add instruction.

+

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Call.html b/juicebox_asm/insn/trait.Call.html index f3fb14f..f5ec17e 100644 --- a/juicebox_asm/insn/trait.Call.html +++ b/juicebox_asm/insn/trait.Call.html @@ -1,6 +1,6 @@ -Call in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Call

source
pub trait Call<T> {
+Call in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Call

source
pub trait Call<T> {
     // Required method
     fn call(&mut self, op1: T);
 }
Expand description

Trait for call instruction kinds.

-

Required Methods§

source

fn call(&mut self, op1: T)

Emit a call instruction.

+

Required Methods§

source

fn call(&mut self, op1: T)

Emit a call instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Cmovnz.html b/juicebox_asm/insn/trait.Cmovnz.html index d68cab8..b11f5ba 100644 --- a/juicebox_asm/insn/trait.Cmovnz.html +++ b/juicebox_asm/insn/trait.Cmovnz.html @@ -1,7 +1,7 @@ -Cmovnz in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Cmovnz

source
pub trait Cmovnz<T, U> {
+Cmovnz in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Cmovnz

source
pub trait Cmovnz<T, U> {
     // Required method
     fn cmovnz(&mut self, op1: T, op2: U);
 }
Expand description

Trait for cmovnz instruction kinds.

-

Required Methods§

source

fn cmovnz(&mut self, op1: T, op2: U)

Emit a (conditional) move if not zero instruction.

+

Required Methods§

source

fn cmovnz(&mut self, op1: T, op2: U)

Emit a (conditional) move if not zero instruction.

Move is only commited if (ZF=0).

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Cmovz.html b/juicebox_asm/insn/trait.Cmovz.html index d3c8ac0..10383c4 100644 --- a/juicebox_asm/insn/trait.Cmovz.html +++ b/juicebox_asm/insn/trait.Cmovz.html @@ -1,7 +1,7 @@ -Cmovz in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Cmovz

source
pub trait Cmovz<T, U> {
+Cmovz in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Cmovz

source
pub trait Cmovz<T, U> {
     // Required method
     fn cmovz(&mut self, op1: T, op2: U);
 }
Expand description

Trait for cmovz instruction kinds.

-

Required Methods§

source

fn cmovz(&mut self, op1: T, op2: U)

Emit a (conditional) move if zero instruction.

+

Required Methods§

source

fn cmovz(&mut self, op1: T, op2: U)

Emit a (conditional) move if zero instruction.

Move is only commited if (ZF=1).

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Cmp.html b/juicebox_asm/insn/trait.Cmp.html index 340ac50..dae9656 100644 --- a/juicebox_asm/insn/trait.Cmp.html +++ b/juicebox_asm/insn/trait.Cmp.html @@ -1,8 +1,8 @@ -Cmp in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Cmp

source
pub trait Cmp<T, U> {
+Cmp in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Cmp

source
pub trait Cmp<T, U> {
     // Required method
     fn cmp(&mut self, op1: T, op2: U);
 }
Expand description

Trait for cmp instruction kinds.

-

Required Methods§

source

fn cmp(&mut self, op1: T, op2: U)

Emit a compare instruction.

+

Required Methods§

source

fn cmp(&mut self, op1: T, op2: U)

Emit a compare instruction.

Computes op2 - op1 and sets the status flags in the same way as the sub instruction, the result is discarded.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Dec.html b/juicebox_asm/insn/trait.Dec.html index 7d35a8d..dce0e58 100644 --- a/juicebox_asm/insn/trait.Dec.html +++ b/juicebox_asm/insn/trait.Dec.html @@ -1,6 +1,6 @@ -Dec in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Dec

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

Trait Dec

source
pub trait Dec<T> {
     // Required method
     fn dec(&mut self, op1: T);
 }
Expand description

Trait for dec instruction kinds.

-

Required Methods§

source

fn dec(&mut self, op1: T)

Emit a decrement instruction.

+

Required Methods§

source

fn dec(&mut self, op1: T)

Emit a decrement instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Inc.html b/juicebox_asm/insn/trait.Inc.html index df8af09..46bc9aa 100644 --- a/juicebox_asm/insn/trait.Inc.html +++ b/juicebox_asm/insn/trait.Inc.html @@ -1,6 +1,6 @@ -Inc in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Inc

source
pub trait Inc<T> {
+Inc in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Inc

source
pub trait Inc<T> {
     // Required method
     fn inc(&mut self, op1: T);
 }
Expand description

Trait for inc instruction kinds.

-

Required Methods§

source

fn inc(&mut self, op1: T)

Emit a increment instruction.

+

Required Methods§

source

fn inc(&mut self, op1: T)

Emit a increment instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Jmp.html b/juicebox_asm/insn/trait.Jmp.html index 21624f9..f50f85f 100644 --- a/juicebox_asm/insn/trait.Jmp.html +++ b/juicebox_asm/insn/trait.Jmp.html @@ -1,6 +1,6 @@ -Jmp in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Jmp

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

Trait Jmp

source
pub trait Jmp<T> {
     // Required method
     fn jmp(&mut self, op1: T);
 }
Expand description

Trait for jmp instruction kinds.

-

Required Methods§

source

fn jmp(&mut self, op1: T)

Emit an unconditional jump instruction.

+

Required Methods§

source

fn jmp(&mut self, op1: T)

Emit an unconditional jump instruction.

Implementors§

source§

impl Jmp<&mut Label> for Asm

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Jnz.html b/juicebox_asm/insn/trait.Jnz.html index cd1db1d..d4fe117 100644 --- a/juicebox_asm/insn/trait.Jnz.html +++ b/juicebox_asm/insn/trait.Jnz.html @@ -1,6 +1,6 @@ -Jnz in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Jnz

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

Trait Jnz

source
pub trait Jnz<T> {
     // Required method
     fn jnz(&mut self, op1: T);
 }
Expand description

Trait for jnz instruction kinds.

-

Required Methods§

source

fn jnz(&mut self, op1: T)

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

+

Required Methods§

source

fn jnz(&mut self, op1: T)

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

Implementors§

source§

impl Jnz<&mut Label> for Asm

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Jz.html b/juicebox_asm/insn/trait.Jz.html index 5a4a784..b661275 100644 --- a/juicebox_asm/insn/trait.Jz.html +++ b/juicebox_asm/insn/trait.Jz.html @@ -1,6 +1,6 @@ -Jz in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Jz

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

Trait Jz

source
pub trait Jz<T> {
     // Required method
     fn jz(&mut self, op1: T);
 }
Expand description

Trait for jz instruction kinds.

-

Required Methods§

source

fn jz(&mut self, op1: T)

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

+

Required Methods§

source

fn jz(&mut self, op1: T)

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

Implementors§

source§

impl Jz<&mut Label> for Asm

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Mov.html b/juicebox_asm/insn/trait.Mov.html index d492eae..1d1156c 100644 --- a/juicebox_asm/insn/trait.Mov.html +++ b/juicebox_asm/insn/trait.Mov.html @@ -1,6 +1,6 @@ -Mov in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Mov

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

Trait Mov

source
pub trait Mov<T, U> {
     // Required method
     fn mov(&mut self, op1: T, op2: U);
 }
Expand description

Trait for mov instruction kinds.

-

Required Methods§

source

fn mov(&mut self, op1: T, op2: U)

Emit an move instruction.

+

Required Methods§

source

fn mov(&mut self, op1: T, op2: U)

Emit an move instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Pop.html b/juicebox_asm/insn/trait.Pop.html index 424ecd7..449e2c6 100644 --- a/juicebox_asm/insn/trait.Pop.html +++ b/juicebox_asm/insn/trait.Pop.html @@ -1,6 +1,6 @@ -Pop in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Pop

source
pub trait Pop<T> {
+Pop in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Pop

source
pub trait Pop<T> {
     // Required method
     fn pop(&mut self, op1: T);
 }
Expand description

Trait for pop instruction kinds.

-

Required Methods§

source

fn pop(&mut self, op1: T)

Emit a pop instruction.

+

Required Methods§

source

fn pop(&mut self, op1: T)

Emit a pop instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Push.html b/juicebox_asm/insn/trait.Push.html index 8d9146b..96a9b3e 100644 --- a/juicebox_asm/insn/trait.Push.html +++ b/juicebox_asm/insn/trait.Push.html @@ -1,6 +1,6 @@ -Push in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Push

source
pub trait Push<T> {
+Push in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Push

source
pub trait Push<T> {
     // Required method
     fn push(&mut self, op1: T);
 }
Expand description

Trait for push instruction kinds.

-

Required Methods§

source

fn push(&mut self, op1: T)

Emit a push instruction.

+

Required Methods§

source

fn push(&mut self, op1: T)

Emit a push instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Sub.html b/juicebox_asm/insn/trait.Sub.html new file mode 100644 index 0000000..ff300fd --- /dev/null +++ b/juicebox_asm/insn/trait.Sub.html @@ -0,0 +1,6 @@ +Sub in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Sub

source
pub trait Sub<T, U> {
+    // Required method
+    fn sub(&mut self, op1: T, op2: U);
+}
Expand description

Trait for sub instruction kinds.

+

Required Methods§

source

fn sub(&mut self, op1: T, op2: U)

Emit an sub instruction.

+

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/insn/trait.Test.html b/juicebox_asm/insn/trait.Test.html index f5c10de..4cca689 100644 --- a/juicebox_asm/insn/trait.Test.html +++ b/juicebox_asm/insn/trait.Test.html @@ -1,8 +1,8 @@ -Test in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Test

source
pub trait Test<T, U> {
+Test in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Test

source
pub trait Test<T, U> {
     // Required method
     fn test(&mut self, op1: T, op2: U);
 }
Expand description

Trait for test instruction kinds.

-

Required Methods§

source

fn test(&mut self, op1: T, op2: U)

Emit a logical compare instruction.

+

Required Methods§

source

fn test(&mut self, op1: T, op2: U)

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/insn/trait.Xor.html b/juicebox_asm/insn/trait.Xor.html index 30afee6..589f007 100644 --- a/juicebox_asm/insn/trait.Xor.html +++ b/juicebox_asm/insn/trait.Xor.html @@ -1,6 +1,6 @@ -Xor in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Xor

source
pub trait Xor<T, U> {
+Xor in juicebox_asm::insn - Rust
juicebox_asm::insn

Trait Xor

source
pub trait Xor<T, U> {
     // Required method
     fn xor(&mut self, op1: T, op2: U);
 }
Expand description

Trait for xor instruction kinds.

-

Required Methods§

source

fn xor(&mut self, op1: T, op2: U)

Emit a xor instruction.

+

Required Methods§

source

fn xor(&mut self, op1: T, op2: U)

Emit a xor instruction.

Implementors§

\ No newline at end of file diff --git a/juicebox_asm/struct.Asm.html b/juicebox_asm/struct.Asm.html index 7bb4da2..c859d63 100644 --- a/juicebox_asm/struct.Asm.html +++ b/juicebox_asm/struct.Asm.html @@ -1,10 +1,10 @@ -Asm in juicebox_asm - Rust
juicebox_asm

Struct Asm

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

x64 jit assembler.

+Asm in juicebox_asm - Rust
juicebox_asm

Struct Asm

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

x64 jit assembler.

Implementations§

source§

impl Asm

source

pub fn new() -> Asm

Create a new x64 jit assembler.

source

pub fn into_code(self) -> Vec<u8>

Consume the assembler and get the emitted code.

source

pub fn bind(&mut self, label: &mut Label)

Bind the Label to the current location.

source§

impl Asm

source

pub fn nop(&mut self)

Emit a nop instruction.

source§

impl Asm

source

pub fn ret(&mut self)

Emit a ret instruction.

-

Trait Implementations§

source§

impl Add<MemOp, Imm16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm16)

Emit an add instruction.
source§

impl Add<MemOp, Reg16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg16)

Emit an add instruction.
source§

impl Add<MemOp, Reg64> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg64)

Emit an add instruction.
source§

impl Add<Reg32, Reg32> for Asm

source§

fn add(&mut self, op1: Reg32, op2: Reg32)

Emit an add instruction.
source§

impl Add<Reg64, MemOp> for Asm

source§

fn add(&mut self, op1: Reg64, op2: MemOp)

Emit an add instruction.
source§

impl Add<Reg64, Reg64> for Asm

source§

fn add(&mut self, op1: Reg64, op2: Reg64)

Emit an add instruction.
source§

impl Call<Reg64> for Asm

source§

fn call(&mut self, op1: Reg64)

Emit a call instruction.
source§

impl Cmovnz<Reg64, Reg64> for Asm

source§

fn cmovnz(&mut self, op1: Reg64, op2: Reg64)

Emit a (conditional) move if not zero instruction. Read more
source§

impl Cmovz<Reg64, Reg64> for Asm

source§

fn cmovz(&mut self, op1: Reg64, op2: Reg64)

Emit a (conditional) move if zero instruction. Read more
source§

impl Cmp<MemOp, Imm16> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm16)

Emit a compare instruction. Read more
source§

impl Cmp<MemOp, Imm8> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm8)

Emit a compare instruction. Read more
source§

impl Dec<MemOp16> for Asm

source§

fn dec(&mut self, op1: MemOp16)

Emit a decrement instruction.
source§

impl Dec<MemOp32> for Asm

source§

fn dec(&mut self, op1: MemOp32)

Emit a decrement instruction.
source§

impl Dec<MemOp64> for Asm

source§

fn dec(&mut self, op1: MemOp64)

Emit a decrement instruction.
source§

impl Dec<MemOp8> for Asm

source§

fn dec(&mut self, op1: MemOp8)

Emit a decrement instruction.
source§

impl Dec<Reg32> for Asm

source§

fn dec(&mut self, op1: Reg32)

Emit a decrement instruction.
source§

impl Dec<Reg64> for Asm

source§

fn dec(&mut self, op1: Reg64)

Emit a decrement instruction.
source§

impl Inc<MemOp16> for Asm

source§

fn inc(&mut self, op1: MemOp16)

Emit a increment instruction.
source§

impl Inc<MemOp32> for Asm

source§

fn inc(&mut self, op1: MemOp32)

Emit a increment instruction.
source§

impl Inc<MemOp64> for Asm

source§

fn inc(&mut self, op1: MemOp64)

Emit a increment instruction.
source§

impl Inc<MemOp8> for Asm

source§

fn inc(&mut self, op1: MemOp8)

Emit a increment instruction.
source§

impl Inc<Reg32> for Asm

source§

fn inc(&mut self, op1: Reg32)

Emit a increment instruction.
source§

impl Inc<Reg64> for Asm

source§

fn inc(&mut self, op1: Reg64)

Emit a increment instruction.
source§

impl Jmp<&mut Label> for Asm

source§

fn jmp(&mut self, op1: &mut Label)

Emit an unconditional jump instruction.
source§

impl Jnz<&mut Label> for Asm

source§

fn jnz(&mut self, op1: &mut Label)

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

impl Jz<&mut Label> for Asm

source§

fn jz(&mut self, op1: &mut Label)

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

impl Mov<MemOp, Imm16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Imm16)

Emit an move instruction.
source§

impl Mov<MemOp, Reg16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg16)

Emit an move instruction.
source§

impl Mov<MemOp, Reg32> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg32)

Emit an move instruction.
source§

impl Mov<MemOp, Reg64> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg64)

Emit an move instruction.
source§

impl Mov<MemOp, Reg8> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg8)

Emit an move instruction.
source§

impl Mov<Reg16, Imm16> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: Imm16)

Emit an move instruction.
source§

impl Mov<Reg16, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg16, Reg16> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: Reg16)

Emit an move instruction.
source§

impl Mov<Reg32, Imm32> for Asm

source§

fn mov(&mut self, op1: Reg32, op2: Imm32)

Emit an move instruction.
source§

impl Mov<Reg32, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg32, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg32, Reg32> for Asm

source§

fn mov(&mut self, op1: Reg32, op2: Reg32)

Emit an move instruction.
source§

impl Mov<Reg64, Imm64> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: Imm64)

Emit an move instruction.
source§

impl Mov<Reg64, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg64, Reg64> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: Reg64)

Emit an move instruction.
source§

impl Mov<Reg8, Imm8> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: Imm8)

Emit an move instruction.
source§

impl Mov<Reg8, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg8, Reg8> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: Reg8)

Emit an move instruction.
source§

impl Pop<Reg16> for Asm

source§

fn pop(&mut self, op1: Reg16)

Emit a pop instruction.
source§

impl Pop<Reg64> for Asm

source§

fn pop(&mut self, op1: Reg64)

Emit a pop instruction.
source§

impl Push<Reg16> for Asm

source§

fn push(&mut self, op1: Reg16)

Emit a push instruction.
source§

impl Push<Reg64> for Asm

source§

fn push(&mut self, op1: Reg64)

Emit a push instruction.
source§

impl Test<MemOp, Imm16> for Asm

source§

fn test(&mut self, op1: MemOp, op2: Imm16)

Emit a logical compare instruction. Read more
source§

impl Test<Reg32, Reg32> for Asm

source§

fn test(&mut self, op1: Reg32, op2: Reg32)

Emit a logical compare instruction. Read more
source§

impl Test<Reg64, Reg64> for Asm

source§

fn test(&mut self, op1: Reg64, op2: Reg64)

Emit a logical compare instruction. Read more
source§

impl Xor<Reg64, Reg64> for Asm

source§

fn xor(&mut self, op1: Reg64, op2: Reg64)

Emit a xor instruction.

Auto Trait Implementations§

§

impl Freeze for Asm

§

impl RefUnwindSafe for Asm

§

impl Send for Asm

§

impl Sync for Asm

§

impl Unpin for Asm

§

impl UnwindSafe for Asm

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Add<MemOp, Imm16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm16)

Emit an add instruction.
source§

impl Add<MemOp, Imm8> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm8)

Emit an add instruction.
source§

impl Add<MemOp, Reg16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg16)

Emit an add instruction.
source§

impl Add<MemOp, Reg64> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Reg64)

Emit an add instruction.
source§

impl Add<Reg32, Reg32> for Asm

source§

fn add(&mut self, op1: Reg32, op2: Reg32)

Emit an add instruction.
source§

impl Add<Reg64, MemOp> for Asm

source§

fn add(&mut self, op1: Reg64, op2: MemOp)

Emit an add instruction.
source§

impl Add<Reg64, Reg64> for Asm

source§

fn add(&mut self, op1: Reg64, op2: Reg64)

Emit an add instruction.
source§

impl Call<Reg64> for Asm

source§

fn call(&mut self, op1: Reg64)

Emit a call instruction.
source§

impl Cmovnz<Reg64, Reg64> for Asm

source§

fn cmovnz(&mut self, op1: Reg64, op2: Reg64)

Emit a (conditional) move if not zero instruction. Read more
source§

impl Cmovz<Reg64, Reg64> for Asm

source§

fn cmovz(&mut self, op1: Reg64, op2: Reg64)

Emit a (conditional) move if zero instruction. Read more
source§

impl Cmp<MemOp, Imm16> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm16)

Emit a compare instruction. Read more
source§

impl Cmp<MemOp, Imm8> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm8)

Emit a compare instruction. Read more
source§

impl Dec<MemOp16> for Asm

source§

fn dec(&mut self, op1: MemOp16)

Emit a decrement instruction.
source§

impl Dec<MemOp32> for Asm

source§

fn dec(&mut self, op1: MemOp32)

Emit a decrement instruction.
source§

impl Dec<MemOp64> for Asm

source§

fn dec(&mut self, op1: MemOp64)

Emit a decrement instruction.
source§

impl Dec<MemOp8> for Asm

source§

fn dec(&mut self, op1: MemOp8)

Emit a decrement instruction.
source§

impl Dec<Reg32> for Asm

source§

fn dec(&mut self, op1: Reg32)

Emit a decrement instruction.
source§

impl Dec<Reg64> for Asm

source§

fn dec(&mut self, op1: Reg64)

Emit a decrement instruction.
source§

impl Inc<MemOp16> for Asm

source§

fn inc(&mut self, op1: MemOp16)

Emit a increment instruction.
source§

impl Inc<MemOp32> for Asm

source§

fn inc(&mut self, op1: MemOp32)

Emit a increment instruction.
source§

impl Inc<MemOp64> for Asm

source§

fn inc(&mut self, op1: MemOp64)

Emit a increment instruction.
source§

impl Inc<MemOp8> for Asm

source§

fn inc(&mut self, op1: MemOp8)

Emit a increment instruction.
source§

impl Inc<Reg32> for Asm

source§

fn inc(&mut self, op1: Reg32)

Emit a increment instruction.
source§

impl Inc<Reg64> for Asm

source§

fn inc(&mut self, op1: Reg64)

Emit a increment instruction.
source§

impl Jmp<&mut Label> for Asm

source§

fn jmp(&mut self, op1: &mut Label)

Emit an unconditional jump instruction.
source§

impl Jnz<&mut Label> for Asm

source§

fn jnz(&mut self, op1: &mut Label)

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

impl Jz<&mut Label> for Asm

source§

fn jz(&mut self, op1: &mut Label)

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

impl Mov<MemOp, Imm16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Imm16)

Emit an move instruction.
source§

impl Mov<MemOp, Reg16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg16)

Emit an move instruction.
source§

impl Mov<MemOp, Reg32> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg32)

Emit an move instruction.
source§

impl Mov<MemOp, Reg64> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg64)

Emit an move instruction.
source§

impl Mov<MemOp, Reg8> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Reg8)

Emit an move instruction.
source§

impl Mov<Reg16, Imm16> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: Imm16)

Emit an move instruction.
source§

impl Mov<Reg16, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg16, Reg16> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: Reg16)

Emit an move instruction.
source§

impl Mov<Reg32, Imm32> for Asm

source§

fn mov(&mut self, op1: Reg32, op2: Imm32)

Emit an move instruction.
source§

impl Mov<Reg32, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg32, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg32, Reg32> for Asm

source§

fn mov(&mut self, op1: Reg32, op2: Reg32)

Emit an move instruction.
source§

impl Mov<Reg64, Imm64> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: Imm64)

Emit an move instruction.
source§

impl Mov<Reg64, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg64, Reg64> for Asm

source§

fn mov(&mut self, op1: Reg64, op2: Reg64)

Emit an move instruction.
source§

impl Mov<Reg8, Imm8> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: Imm8)

Emit an move instruction.
source§

impl Mov<Reg8, MemOp> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: MemOp)

Emit an move instruction.
source§

impl Mov<Reg8, Reg8> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: Reg8)

Emit an move instruction.
source§

impl Pop<Reg16> for Asm

source§

fn pop(&mut self, op1: Reg16)

Emit a pop instruction.
source§

impl Pop<Reg64> for Asm

source§

fn pop(&mut self, op1: Reg64)

Emit a pop instruction.
source§

impl Push<Reg16> for Asm

source§

fn push(&mut self, op1: Reg16)

Emit a push instruction.
source§

impl Push<Reg64> for Asm

source§

fn push(&mut self, op1: Reg64)

Emit a push instruction.
source§

impl Sub<MemOp, Imm8> for Asm

source§

fn sub(&mut self, op1: MemOp, op2: Imm8)

Emit an sub instruction.
source§

impl Sub<Reg64, Reg64> for Asm

source§

fn sub(&mut self, op1: Reg64, op2: Reg64)

Emit an sub instruction.
source§

impl Test<MemOp, Imm16> for Asm

source§

fn test(&mut self, op1: MemOp, op2: Imm16)

Emit a logical compare instruction. Read more
source§

impl Test<Reg32, Reg32> for Asm

source§

fn test(&mut self, op1: Reg32, op2: Reg32)

Emit a logical compare instruction. Read more
source§

impl Test<Reg64, Reg64> for Asm

source§

fn test(&mut self, op1: Reg64, op2: Reg64)

Emit a logical compare instruction. Read more
source§

impl Xor<Reg64, Reg64> for Asm

source§

fn xor(&mut self, op1: Reg64, op2: Reg64)

Emit a xor instruction.

Auto Trait Implementations§

§

impl Freeze for Asm

§

impl RefUnwindSafe for Asm

§

impl Send for Asm

§

impl Sync for Asm

§

impl Unpin for Asm

§

impl UnwindSafe for Asm

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/juicebox_asm/struct.Imm16.html b/juicebox_asm/struct.Imm16.html index c6e11c1..3cd2347 100644 --- a/juicebox_asm/struct.Imm16.html +++ b/juicebox_asm/struct.Imm16.html @@ -1,5 +1,5 @@ Imm16 in juicebox_asm - Rust
juicebox_asm

Struct Imm16

source
pub struct Imm16(/* private fields */);
Expand description

Type representing a 16 bit immediate.

-

Trait Implementations§

source§

impl Add<MemOp, Imm16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm16)

Emit an add instruction.
source§

impl Cmp<MemOp, Imm16> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm16)

Emit a compare instruction. Read more
source§

impl From<i16> for Imm16

source§

fn from(imm: i16) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Imm16

source§

fn from(imm: i8) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Imm16

source§

fn from(imm: u16) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Imm16

source§

fn from(imm: u8) -> Self

Converts to this type from the input type.
source§

impl Mov<MemOp, Imm16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Imm16)

Emit an move instruction.
source§

impl Mov<Reg16, Imm16> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: Imm16)

Emit an move instruction.
source§

impl Test<MemOp, Imm16> for Asm

source§

fn test(&mut self, op1: MemOp, op2: Imm16)

Emit a logical compare instruction. Read more

Auto Trait Implementations§

§

impl Freeze for Imm16

§

impl RefUnwindSafe for Imm16

§

impl Send for Imm16

§

impl Sync for Imm16

§

impl Unpin for Imm16

§

impl UnwindSafe for Imm16

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Add<MemOp, Imm16> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm16)

Emit an add instruction.
source§

impl Cmp<MemOp, Imm16> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm16)

Emit a compare instruction. Read more
source§

impl From<i16> for Imm16

source§

fn from(imm: i16) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Imm16

source§

fn from(imm: i8) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Imm16

source§

fn from(imm: u16) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Imm16

source§

fn from(imm: u8) -> Self

Converts to this type from the input type.
source§

impl Mov<MemOp, Imm16> for Asm

source§

fn mov(&mut self, op1: MemOp, op2: Imm16)

Emit an move instruction.
source§

impl Mov<Reg16, Imm16> for Asm

source§

fn mov(&mut self, op1: Reg16, op2: Imm16)

Emit an move instruction.
source§

impl Test<MemOp, Imm16> for Asm

source§

fn test(&mut self, op1: MemOp, op2: Imm16)

Emit a logical compare instruction. Read more

Auto Trait Implementations§

§

impl Freeze for Imm16

§

impl RefUnwindSafe for Imm16

§

impl Send for Imm16

§

impl Sync for Imm16

§

impl Unpin for Imm16

§

impl UnwindSafe for Imm16

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/juicebox_asm/struct.Imm8.html b/juicebox_asm/struct.Imm8.html index 09ac7f4..cf81cbe 100644 --- a/juicebox_asm/struct.Imm8.html +++ b/juicebox_asm/struct.Imm8.html @@ -1,5 +1,5 @@ -Imm8 in juicebox_asm - Rust
juicebox_asm

Struct Imm8

source
pub struct Imm8(/* private fields */);
Expand description

Type representing an 8 bit immediate.

-

Trait Implementations§

source§

impl Cmp<MemOp, Imm8> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm8)

Emit a compare instruction. Read more
source§

impl From<i8> for Imm8

source§

fn from(imm: i8) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Imm8

source§

fn from(imm: u8) -> Self

Converts to this type from the input type.
source§

impl Mov<Reg8, Imm8> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: Imm8)

Emit an move instruction.

Auto Trait Implementations§

§

impl Freeze for Imm8

§

impl RefUnwindSafe for Imm8

§

impl Send for Imm8

§

impl Sync for Imm8

§

impl Unpin for Imm8

§

impl UnwindSafe for Imm8

Blanket Implementations§

source§

impl<T> Any for T
where +Imm8 in juicebox_asm - Rust
juicebox_asm

Struct Imm8

source
pub struct Imm8(/* private fields */);
Expand description

Type representing an 8 bit immediate.

+

Trait Implementations§

source§

impl Add<MemOp, Imm8> for Asm

source§

fn add(&mut self, op1: MemOp, op2: Imm8)

Emit an add instruction.
source§

impl Cmp<MemOp, Imm8> for Asm

source§

fn cmp(&mut self, op1: MemOp, op2: Imm8)

Emit a compare instruction. Read more
source§

impl From<i8> for Imm8

source§

fn from(imm: i8) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Imm8

source§

fn from(imm: u8) -> Self

Converts to this type from the input type.
source§

impl Mov<Reg8, Imm8> for Asm

source§

fn mov(&mut self, op1: Reg8, op2: Imm8)

Emit an move instruction.
source§

impl Sub<MemOp, Imm8> for Asm

source§

fn sub(&mut self, op1: MemOp, op2: Imm8)

Emit an sub instruction.

Auto Trait Implementations§

§

impl Freeze for Imm8

§

impl RefUnwindSafe for Imm8

§

impl Send for Imm8

§

impl Sync for Imm8

§

impl Unpin for Imm8

§

impl UnwindSafe for Imm8

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/search-index.js b/search-index.js index a99d130..618b125 100644 --- a/search-index.js +++ b/search-index.js @@ -1,4 +1,4 @@ -var searchIndex = new Map(JSON.parse('[["add",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["bf",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["fib",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["juicebox_asm",{"t":"FFFFFPPPFGFFFFGGGGFNNNNNNNPPPPNPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPNPPNNNNNNNNNNNNNNNNNNNPNNNNNNPPPPNNNPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKKKKKKKKKKKKKKMMMMMMMMMMMMMMM","n":["Asm","Imm16","Imm32","Imm64","Imm8","Indirect","IndirectBaseIndex","IndirectDisp","Label","MemOp","MemOp16","MemOp32","MemOp64","MemOp8","Reg16","Reg32","Reg64","Reg8","Runtime","add","","","","","","add_code","ah","al","ax","bh","bind","bl","borrow","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","bp","bpl","bx","call","ch","cl","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cmovnz","cmovz","cmp","","cx","dec","","","","","","dh","di","dil","dl","drop","","dump","dx","eax","ebp","ebx","ecx","edi","edx","esi","esp","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","inc","","","","","","insn","into","","","","","","","","","","","","","","","","into_code","jmp","jnz","jz","mov","","","","","","","","","","","","","","","","","new","","","nop","pop","","push","","r10","r10d","r10l","r10w","r11","r11d","r11l","r11w","r12","r12d","r12l","r12w","r13","r13d","r13l","r13w","r14","r14d","r14l","r14w","r15","r15d","r15l","r15w","r8","r8d","r8l","r8w","r9","r9d","r9l","r9w","rax","rbp","rbx","rcx","rdi","rdx","ret","rsi","rsp","si","sil","sp","spl","test","","","to_owned","","","","","try_from","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","","with_profile","xor","Add","Call","Cmovnz","Cmovz","Cmp","Dec","Inc","Jmp","Jnz","Jz","Mov","Pop","Push","Test","Xor","add","call","cmovnz","cmovz","cmp","dec","inc","jmp","jnz","jz","mov","pop","push","test","xor"],"q":[[0,"juicebox_asm"],[309,"juicebox_asm::insn"],[339,"juicebox_asm::asm"],[340,"juicebox_asm::reg"],[341,"juicebox_asm::imm"],[342,"juicebox_asm::rt"],[343,"core::convert"],[344,"juicebox_asm::label"],[345,"alloc::vec"],[346,"core::result"],[347,"core::any"]],"i":"`````h00```````````d00000AdAn0j1313Al3B`A`C`CfnAb78;BhBbBfBd>:=987654;<<54;>>>;>>>>>><;<<:==;44444444>:=9998888877777776666666666654;>>>>>`>:=987654;>>>>>>>>>>>>>>>>>>>>>:=>>>>>54<;54<;54<;54<;54<;54<;54<;54<;555555>55;<;<>>>54;:=987654;:=987654;:=987654;```````````````DfDhDjDlDnE`EbEdEfEhEjElEnF`Fb","f":"```````````````````{{{f{bd}}hj}l}{{{f{bd}}nh}l}{{{f{bd}}hA`}l}{{{f{bd}}hn}l}{{{f{bd}}AbAb}l}{{{f{bd}}nn}l}{{{f{bAd}}c}e{{Aj{{Ah{Af}}}}}{}}````{{{f{bd}}{f{bAl}}}l}`{f{{f{c}}}{}}000000000000000{{{f{b}}}{{f{bc}}}{}}000000000000000```{{{f{bd}}n}l}``{{{f{n}}}n}{{{f{Ab}}}Ab}{{{f{j}}}j}{{{f{An}}}An}{{{f{h}}}h}{{f{f{bc}}}l{}}0000{fl}0000<<{{{f{bd}}hB`}l}{{{f{bd}}hA`}l}`{{{f{bd}}Ab}l}{{{f{bd}}Bb}l}{{{f{bd}}Bd}l}{{{f{bd}}Bf}l}={{{f{bd}}Bh}l}````{{{f{bAl}}}l}{{{f{bAd}}}l}{{{f{Ad}}}l}`````````{cc{}}00{AfB`}{BjB`}22{AfA`}{BjA`}{BlA`}{BnA`}{BjC`}{BnC`}{CbC`}{BlC`}:{AfC`}{CdC`}{CbCf}{BjCf}{ChCf}?{CjCf}{CdCf}{BlCf}{AfCf}{ClCf}{CnCf}{BnCf}{cc{}}0000{hBh}11{hBb}2{hBf}{hBd}4{{{f{bd}}Bh}l}{{{f{bd}}Ab}l}{{{f{bd}}Bb}l}{{{f{bd}}Bf}l}{{{f{bd}}Bd}l}{{{f{bd}}n}l}`{{}c{}}000000000000000{d{{D`{Af}}}}{{{f{bd}}{f{bAl}}}l}00{{{f{bd}}AnAn}l}{{{f{bd}}nCf}l}{{{f{bd}}jA`}l}{{{f{bd}}nh}l}{{{f{bd}}hAn}l}{{{f{bd}}hj}l}{{{f{bd}}AnB`}l}{{{f{bd}}hA`}l}{{{f{bd}}hAb}l}{{{f{bd}}Abh}l}{{{f{bd}}AbC`}l}{{{f{bd}}jj}l}{{{f{bd}}AbAb}l}{{{f{bd}}nn}l}{{{f{bd}}jh}l}{{{f{bd}}Anh}l}{{{f{bd}}hn}l}{{}d}{{}Al}{{}Ad}{{{f{bd}}}l}{{{f{bd}}n}l}{{{f{bd}}j}l}10``````````````````````````````````````2``````9?:{fc{}}0000{c{{Db{e}}}{}{}}000000000000000{{}{{Db{c}}}{}}000000000000000{fDd}0000000000000007=```````````````{{{f{bDf}}ce}l{}{}}{{{f{bDh}}c}l{}}{{{f{bDj}}ce}l{}{}}{{{f{bDl}}ce}l{}{}}{{{f{bDn}}ce}l{}{}}{{{f{bE`}}c}l{}}{{{f{bEb}}c}l{}}{{{f{bEd}}c}l{}}{{{f{bEf}}c}l{}}{{{f{bEh}}c}l{}}{{{f{bEj}}ce}l{}{}}{{{f{bEl}}c}l{}}{{{f{bEn}}c}l{}}{{{f{bF`}}ce}l{}{}}{{{f{bFb}}ce}l{}{}}","D":"Ld","p":[[0,"mut"],[5,"Asm",0,339],[1,"reference"],[6,"MemOp",0],[6,"Reg16",0,340],[1,"unit"],[6,"Reg64",0,340],[5,"Imm16",0,341],[6,"Reg32",0,340],[5,"Runtime",0,342],[1,"u8"],[1,"slice"],[10,"AsRef",343],[5,"Label",0,344],[6,"Reg8",0,340],[5,"Imm8",0,341],[5,"MemOp16",0],[5,"MemOp64",0],[5,"MemOp32",0],[5,"MemOp8",0],[1,"i8"],[1,"i16"],[1,"u16"],[5,"Imm32",0,341],[1,"u32"],[1,"i32"],[5,"Imm64",0,341],[1,"i64"],[1,"u64"],[1,"isize"],[1,"usize"],[5,"Vec",345],[6,"Result",346],[5,"TypeId",347],[10,"Add",309],[10,"Call",309],[10,"Cmovnz",309],[10,"Cmovz",309],[10,"Cmp",309],[10,"Dec",309],[10,"Inc",309],[10,"Jmp",309],[10,"Jnz",309],[10,"Jz",309],[10,"Mov",309],[10,"Pop",309],[10,"Push",309],[10,"Test",309],[10,"Xor",309]],"r":[[0,339],[1,341],[2,341],[3,341],[4,341],[8,344],[14,340],[15,340],[16,340],[17,340],[18,342]],"b":[[19,"impl-Add%3CMemOp,+Reg16%3E-for-Asm"],[20,"impl-Add%3CReg64,+MemOp%3E-for-Asm"],[21,"impl-Add%3CMemOp,+Imm16%3E-for-Asm"],[22,"impl-Add%3CMemOp,+Reg64%3E-for-Asm"],[23,"impl-Add%3CReg32,+Reg32%3E-for-Asm"],[24,"impl-Add%3CReg64,+Reg64%3E-for-Asm"],[87,"impl-Cmp%3CMemOp,+Imm8%3E-for-Asm"],[88,"impl-Cmp%3CMemOp,+Imm16%3E-for-Asm"],[90,"impl-Dec%3CReg32%3E-for-Asm"],[91,"impl-Dec%3CMemOp16%3E-for-Asm"],[92,"impl-Dec%3CMemOp64%3E-for-Asm"],[93,"impl-Dec%3CMemOp32%3E-for-Asm"],[94,"impl-Dec%3CReg64%3E-for-Asm"],[95,"impl-Dec%3CMemOp8%3E-for-Asm"],[115,"impl-From%3Cu8%3E-for-Imm8"],[116,"impl-From%3Ci8%3E-for-Imm8"],[119,"impl-From%3Cu8%3E-for-Imm16"],[120,"impl-From%3Ci8%3E-for-Imm16"],[121,"impl-From%3Ci16%3E-for-Imm16"],[122,"impl-From%3Cu16%3E-for-Imm16"],[123,"impl-From%3Ci8%3E-for-Imm32"],[124,"impl-From%3Cu16%3E-for-Imm32"],[125,"impl-From%3Cu32%3E-for-Imm32"],[126,"impl-From%3Ci16%3E-for-Imm32"],[128,"impl-From%3Cu8%3E-for-Imm32"],[129,"impl-From%3Ci32%3E-for-Imm32"],[130,"impl-From%3Cu32%3E-for-Imm64"],[131,"impl-From%3Ci8%3E-for-Imm64"],[132,"impl-From%3Ci64%3E-for-Imm64"],[134,"impl-From%3Cu64%3E-for-Imm64"],[135,"impl-From%3Ci32%3E-for-Imm64"],[136,"impl-From%3Ci16%3E-for-Imm64"],[137,"impl-From%3Cu8%3E-for-Imm64"],[138,"impl-From%3Cisize%3E-for-Imm64"],[139,"impl-From%3Cusize%3E-for-Imm64"],[140,"impl-From%3Cu16%3E-for-Imm64"],[154,"impl-Inc%3CMemOp8%3E-for-Asm"],[155,"impl-Inc%3CReg32%3E-for-Asm"],[156,"impl-Inc%3CMemOp16%3E-for-Asm"],[157,"impl-Inc%3CMemOp32%3E-for-Asm"],[158,"impl-Inc%3CMemOp64%3E-for-Asm"],[159,"impl-Inc%3CReg64%3E-for-Asm"],[181,"impl-Mov%3CReg8,+Reg8%3E-for-Asm"],[182,"impl-Mov%3CReg64,+Imm64%3E-for-Asm"],[183,"impl-Mov%3CReg16,+Imm16%3E-for-Asm"],[184,"impl-Mov%3CReg64,+MemOp%3E-for-Asm"],[185,"impl-Mov%3CMemOp,+Reg8%3E-for-Asm"],[186,"impl-Mov%3CMemOp,+Reg16%3E-for-Asm"],[187,"impl-Mov%3CReg8,+Imm8%3E-for-Asm"],[188,"impl-Mov%3CMemOp,+Imm16%3E-for-Asm"],[189,"impl-Mov%3CMemOp,+Reg32%3E-for-Asm"],[190,"impl-Mov%3CReg32,+MemOp%3E-for-Asm"],[191,"impl-Mov%3CReg32,+Imm32%3E-for-Asm"],[192,"impl-Mov%3CReg16,+Reg16%3E-for-Asm"],[193,"impl-Mov%3CReg32,+Reg32%3E-for-Asm"],[194,"impl-Mov%3CReg64,+Reg64%3E-for-Asm"],[195,"impl-Mov%3CReg16,+MemOp%3E-for-Asm"],[196,"impl-Mov%3CReg8,+MemOp%3E-for-Asm"],[197,"impl-Mov%3CMemOp,+Reg64%3E-for-Asm"],[202,"impl-Pop%3CReg64%3E-for-Asm"],[203,"impl-Pop%3CReg16%3E-for-Asm"],[204,"impl-Push%3CReg64%3E-for-Asm"],[205,"impl-Push%3CReg16%3E-for-Asm"],[251,"impl-Test%3CReg64,+Reg64%3E-for-Asm"],[252,"impl-Test%3CMemOp,+Imm16%3E-for-Asm"],[253,"impl-Test%3CReg32,+Reg32%3E-for-Asm"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAPEADQAUAAUAGwADACAARQBoAAgAdAABAHgABwCBAAQAhwAGAJsABQCzABMAywApAPYAPQA1AQAA"}],["tiny_vm",{"t":"PPPPPPPFPPPFPGGFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNN","n":["A","Add","Addi","B","Branch","BranchZero","C","Fixup","Halt","Load","LoadImm","PhysAddr","Store","TinyInsn","TinyReg","TinyVm","bind","borrow","","","","","borrow_mut","","","","","clone","","clone_into","","clone_to_uninit","","dump","eq","","fmt","","from","","","","","interp","into","","","","","","jit","make_tinyvm_fib","make_tinyvm_jit_perf","make_tinyvm_jit_test","new","","read_mem","read_reg","to_owned","","try_from","","","","","try_into","","","","","type_id","","","","","write_mem","write_reg"],"q":[[0,"tiny_vm"],[77,"alloc::vec"],[78,"core::fmt"],[79,"core::result"],[80,"core::any"]],"i":"nf01001`000`0```bAhA`24310243434343043431024301102430```02004310243102431024300","f":"````````````````{{b{j{d{h{f}}}}}l}{j{{j{c}}}{}}0000{{{j{d}}}{{j{dc}}}{}}0000{{{j{n}}}n}{{{j{f}}}f}{{j{j{dc}}}l{}}0{jl}0{{{j{A`}}}l}{{{j{n}}{j{n}}}Ab}{{{j{f}}{j{f}}}Ab}{{{j{n}}{j{dAd}}}Af}{{{j{f}}{j{dAd}}}Af}{cc{}}0000{{{j{dA`}}}l}{AhAj}{{}c{}}00002{Al{{h{f}}}}{{}{{h{f}}}}0{{{h{f}}}A`}{Ajb}{{{j{A`}}Ah}Al}{{{j{A`}}n}Al}{jc{}}0{c{{An{e}}}{}{}}0000{{}{{An{c}}}{}}0000{jB`}0000{{{j{dA`}}AhAl}l}{{{j{dA`}}nAl}l}","D":"Dj","p":[[5,"Fixup",0],[0,"mut"],[6,"TinyInsn",0],[5,"Vec",77],[1,"reference"],[1,"unit"],[6,"TinyReg",0],[5,"TinyVm",0],[1,"bool"],[5,"Formatter",78],[8,"Result",78],[5,"PhysAddr",0],[1,"usize"],[1,"u16"],[6,"Result",79],[5,"TypeId",80]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAACgABwABAAAABAAAAAcAAAASAA8AIwADAC0AAAA7ABAA"}]]')); +var searchIndex = new Map(JSON.parse('[["add",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["bf",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["fib",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["gen",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["juicebox_asm",{"t":"FFFFFPPPFGFFFFGGGGFNNNNNNNNPPPPNPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPNPPNNNNNNNNNNNNNNNNNNNPNNNNNNPPPPNNNPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKKKKKKKKKKKKKKKMMMMMMMMMMMMMMMM","n":["Asm","Imm16","Imm32","Imm64","Imm8","Indirect","IndirectBaseIndex","IndirectDisp","Label","MemOp","MemOp16","MemOp32","MemOp64","MemOp8","Reg16","Reg32","Reg64","Reg8","Runtime","add","","","","","","","add_code","ah","al","ax","bh","bind","bl","borrow","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","bp","bpl","bx","call","ch","cl","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cmovnz","cmovz","cmp","","cx","dec","","","","","","dh","di","dil","dl","drop","","dump","dx","eax","ebp","ebx","ecx","edi","edx","esi","esp","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","inc","","","","","","insn","into","","","","","","","","","","","","","","","","into_code","jmp","jnz","jz","mov","","","","","","","","","","","","","","","","","new","","","nop","pop","","push","","r10","r10d","r10l","r10w","r11","r11d","r11l","r11w","r12","r12d","r12l","r12w","r13","r13d","r13l","r13w","r14","r14d","r14l","r14w","r15","r15d","r15l","r15w","r8","r8d","r8l","r8w","r9","r9d","r9l","r9w","rax","rbp","rbx","rcx","rdi","rdx","ret","rsi","rsp","si","sil","sp","spl","sub","","test","","","to_owned","","","","","try_from","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","","with_profile","xor","Add","Call","Cmovnz","Cmovz","Cmp","Dec","Inc","Jmp","Jnz","Jz","Mov","Pop","Push","Sub","Test","Xor","add","call","cmovnz","cmovz","cmp","dec","inc","jmp","jnz","jz","mov","pop","push","sub","test","xor"],"q":[[0,"juicebox_asm"],[312,"juicebox_asm::insn"],[344,"juicebox_asm::asm"],[345,"juicebox_asm::reg"],[346,"juicebox_asm::imm"],[347,"juicebox_asm::rt"],[348,"core::convert"],[349,"juicebox_asm::label"],[350,"alloc::vec"],[351,"core::result"],[352,"core::any"]],"i":"`````l00```````````d000000AfB`0Ab1313An3A`nC`CfhAd78;BhBdBfBb>:=987654;<<54;>>>;>>>>>><;<<:==;44444444>:=9998888877777776666666666654;>>>>>`>:=987654;>>>>>>>>>>>>>>>>>>>>>:=>>>>>54<;54<;54<;54<;54<;54<;54<;54<;555555>55;<;<>>>>>54;:=987654;:=987654;:=987654;````````````````DfDhDjDlDnE`EbEdEfEhEjElEnF`FbFd","f":"```````````````````{{{f{bd}}hh}j}{{{f{bd}}hl}j}{{{f{bd}}ln}j}{{{f{bd}}lA`}j}{{{f{bd}}lAb}j}{{{f{bd}}lh}j}{{{f{bd}}AdAd}j}{{{f{bAf}}c}e{{Al{{Aj{Ah}}}}}{}}````{{{f{bd}}{f{bAn}}}j}`{f{{f{c}}}{}}000000000000000{{{f{b}}}{{f{bc}}}{}}000000000000000```{{{f{bd}}h}j}``{{{f{h}}}h}{{{f{Ad}}}Ad}{{{f{Ab}}}Ab}{{{f{B`}}}B`}{{{f{l}}}l}{{f{f{bc}}}j{}}0000{fj}0000{{{f{bd}}hh}j}0{{{f{bd}}ln}j}{{{f{bd}}lA`}j}`{{{f{bd}}Ad}j};{{{f{bd}}Bb}j}{{{f{bd}}Bd}j}{{{f{bd}}Bf}j}{{{f{bd}}Bh}j}````{{{f{bAn}}}j}{{{f{bAf}}}j}{{{f{Af}}}j}`````````{cc{}}000{AhA`}{BjA`}{Ahn}3{Bjn}{Bln}{Bnn}6{BjC`}{AhC`}{BnC`}{BlC`}{CbC`}{CdC`}{AhCf}{ChCf}>{CjCf}{ClCf}{BjCf}{BnCf}{BlCf}{CbCf}{CdCf}{CnCf}{cc{}}00000{lBh}{lBd}2{lBf}3{lBb}4{{{f{bd}}Bb}j}{{{f{bd}}h}j}{{{f{bd}}Ad}j}{{{f{bd}}Bh}j}{{{f{bd}}Bd}j}{{{f{bd}}Bf}j}`{{}c{}}000000000000000{d{{D`{Ah}}}}{{{f{bd}}{f{bAn}}}j}00{{{f{bd}}lAd}j}{{{f{bd}}Abl}j}{{{f{bd}}Adl}j}{{{f{bd}}hl}j}{{{f{bd}}lB`}j}{{{f{bd}}lAb}j}{{{f{bd}}Abn}j}{{{f{bd}}B`A`}j}{{{f{bd}}B`l}j}{{{f{bd}}lh}j}{{{f{bd}}B`B`}j}{{{f{bd}}AbAb}j}{{{f{bd}}AdAd}j}{{{f{bd}}hh}j}{{{f{bd}}hCf}j}{{{f{bd}}ln}j}{{{f{bd}}AdC`}j}{{}d}{{}An}{{}Af}{{{f{bd}}}j}{{{f{bd}}h}j}{{{f{bd}}Ab}j}01``````````````````````````````````````2``````9{{{f{bd}}lA`}j}8;:{fc{}}0000{c{{Db{e}}}{}{}}000000000000000{{}{{Db{c}}}{}}000000000000000{fDd}0000000000000008>````````````````{{{f{bDf}}ce}j{}{}}{{{f{bDh}}c}j{}}{{{f{bDj}}ce}j{}{}}{{{f{bDl}}ce}j{}{}}{{{f{bDn}}ce}j{}{}}{{{f{bE`}}c}j{}}{{{f{bEb}}c}j{}}{{{f{bEd}}c}j{}}{{{f{bEf}}c}j{}}{{{f{bEh}}c}j{}}{{{f{bEj}}ce}j{}{}}{{{f{bEl}}c}j{}}{{{f{bEn}}c}j{}}{{{f{bF`}}ce}j{}{}}{{{f{bFb}}ce}j{}{}}{{{f{bFd}}ce}j{}{}}","D":"Lh","p":[[0,"mut"],[5,"Asm",0,344],[1,"reference"],[6,"Reg64",0,345],[1,"unit"],[6,"MemOp",0],[5,"Imm16",0,346],[5,"Imm8",0,346],[6,"Reg16",0,345],[6,"Reg32",0,345],[5,"Runtime",0,347],[1,"u8"],[1,"slice"],[10,"AsRef",348],[5,"Label",0,349],[6,"Reg8",0,345],[5,"MemOp64",0],[5,"MemOp16",0],[5,"MemOp32",0],[5,"MemOp8",0],[1,"i8"],[1,"u16"],[1,"i16"],[5,"Imm32",0,346],[1,"i32"],[1,"u32"],[5,"Imm64",0,346],[1,"i64"],[1,"isize"],[1,"usize"],[1,"u64"],[5,"Vec",350],[6,"Result",351],[5,"TypeId",352],[10,"Add",312],[10,"Call",312],[10,"Cmovnz",312],[10,"Cmovz",312],[10,"Cmp",312],[10,"Dec",312],[10,"Inc",312],[10,"Jmp",312],[10,"Jnz",312],[10,"Jz",312],[10,"Mov",312],[10,"Pop",312],[10,"Push",312],[10,"Sub",312],[10,"Test",312],[10,"Xor",312]],"r":[[0,344],[1,346],[2,346],[3,346],[4,346],[8,349],[14,345],[15,345],[16,345],[17,345],[18,347]],"b":[[19,"impl-Add%3CReg64,+Reg64%3E-for-Asm"],[20,"impl-Add%3CReg64,+MemOp%3E-for-Asm"],[21,"impl-Add%3CMemOp,+Imm16%3E-for-Asm"],[22,"impl-Add%3CMemOp,+Imm8%3E-for-Asm"],[23,"impl-Add%3CMemOp,+Reg16%3E-for-Asm"],[24,"impl-Add%3CMemOp,+Reg64%3E-for-Asm"],[25,"impl-Add%3CReg32,+Reg32%3E-for-Asm"],[88,"impl-Cmp%3CMemOp,+Imm16%3E-for-Asm"],[89,"impl-Cmp%3CMemOp,+Imm8%3E-for-Asm"],[91,"impl-Dec%3CReg32%3E-for-Asm"],[92,"impl-Dec%3CReg64%3E-for-Asm"],[93,"impl-Dec%3CMemOp64%3E-for-Asm"],[94,"impl-Dec%3CMemOp16%3E-for-Asm"],[95,"impl-Dec%3CMemOp32%3E-for-Asm"],[96,"impl-Dec%3CMemOp8%3E-for-Asm"],[117,"impl-From%3Cu8%3E-for-Imm8"],[118,"impl-From%3Ci8%3E-for-Imm8"],[119,"impl-From%3Cu8%3E-for-Imm16"],[121,"impl-From%3Ci8%3E-for-Imm16"],[122,"impl-From%3Cu16%3E-for-Imm16"],[123,"impl-From%3Ci16%3E-for-Imm16"],[125,"impl-From%3Ci8%3E-for-Imm32"],[126,"impl-From%3Cu8%3E-for-Imm32"],[127,"impl-From%3Ci16%3E-for-Imm32"],[128,"impl-From%3Cu16%3E-for-Imm32"],[129,"impl-From%3Ci32%3E-for-Imm32"],[130,"impl-From%3Cu32%3E-for-Imm32"],[131,"impl-From%3Cu8%3E-for-Imm64"],[132,"impl-From%3Ci64%3E-for-Imm64"],[134,"impl-From%3Cisize%3E-for-Imm64"],[135,"impl-From%3Cusize%3E-for-Imm64"],[136,"impl-From%3Ci8%3E-for-Imm64"],[137,"impl-From%3Ci16%3E-for-Imm64"],[138,"impl-From%3Cu16%3E-for-Imm64"],[139,"impl-From%3Ci32%3E-for-Imm64"],[140,"impl-From%3Cu32%3E-for-Imm64"],[141,"impl-From%3Cu64%3E-for-Imm64"],[155,"impl-Inc%3CMemOp64%3E-for-Asm"],[156,"impl-Inc%3CReg64%3E-for-Asm"],[157,"impl-Inc%3CReg32%3E-for-Asm"],[158,"impl-Inc%3CMemOp8%3E-for-Asm"],[159,"impl-Inc%3CMemOp16%3E-for-Asm"],[160,"impl-Inc%3CMemOp32%3E-for-Asm"],[182,"impl-Mov%3CMemOp,+Reg32%3E-for-Asm"],[183,"impl-Mov%3CReg16,+MemOp%3E-for-Asm"],[184,"impl-Mov%3CReg32,+MemOp%3E-for-Asm"],[185,"impl-Mov%3CReg64,+MemOp%3E-for-Asm"],[186,"impl-Mov%3CMemOp,+Reg8%3E-for-Asm"],[187,"impl-Mov%3CMemOp,+Reg16%3E-for-Asm"],[188,"impl-Mov%3CReg16,+Imm16%3E-for-Asm"],[189,"impl-Mov%3CReg8,+Imm8%3E-for-Asm"],[190,"impl-Mov%3CReg8,+MemOp%3E-for-Asm"],[191,"impl-Mov%3CMemOp,+Reg64%3E-for-Asm"],[192,"impl-Mov%3CReg8,+Reg8%3E-for-Asm"],[193,"impl-Mov%3CReg16,+Reg16%3E-for-Asm"],[194,"impl-Mov%3CReg32,+Reg32%3E-for-Asm"],[195,"impl-Mov%3CReg64,+Reg64%3E-for-Asm"],[196,"impl-Mov%3CReg64,+Imm64%3E-for-Asm"],[197,"impl-Mov%3CMemOp,+Imm16%3E-for-Asm"],[198,"impl-Mov%3CReg32,+Imm32%3E-for-Asm"],[203,"impl-Pop%3CReg64%3E-for-Asm"],[204,"impl-Pop%3CReg16%3E-for-Asm"],[205,"impl-Push%3CReg16%3E-for-Asm"],[206,"impl-Push%3CReg64%3E-for-Asm"],[252,"impl-Sub%3CReg64,+Reg64%3E-for-Asm"],[253,"impl-Sub%3CMemOp,+Imm8%3E-for-Asm"],[254,"impl-Test%3CMemOp,+Imm16%3E-for-Asm"],[255,"impl-Test%3CReg32,+Reg32%3E-for-Asm"],[256,"impl-Test%3CReg64,+Reg64%3E-for-Asm"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAPQADQAUAAYAHAADACEARQBpAAgAdgACAHoAAgB+AAcAhwAHAJwABQC0ABMAzAApAPcAPwA4AQAA"}],["tiny_vm",{"t":"PPPPPPPFPPPFPGGFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNN","n":["A","Add","Addi","B","Branch","BranchZero","C","Fixup","Halt","Load","LoadImm","PhysAddr","Store","TinyInsn","TinyReg","TinyVm","bind","borrow","","","","","borrow_mut","","","","","clone","","clone_into","","clone_to_uninit","","dump","eq","","fmt","","from","","","","","interp","into","","","","","","jit","make_tinyvm_fib","make_tinyvm_jit_perf","make_tinyvm_jit_test","new","","read_mem","read_reg","to_owned","","try_from","","","","","try_into","","","","","type_id","","","","","write_mem","write_reg"],"q":[[0,"tiny_vm"],[77,"alloc::vec"],[78,"core::fmt"],[79,"core::result"],[80,"core::any"]],"i":"nf01001`000`0```bAhA`24310243434343043431024301102430```02004310243102431024300","f":"````````````````{{b{j{d{h{f}}}}}l}{j{{j{c}}}{}}0000{{{j{d}}}{{j{dc}}}{}}0000{{{j{n}}}n}{{{j{f}}}f}{{j{j{dc}}}l{}}0{jl}0{{{j{A`}}}l}{{{j{n}}{j{n}}}Ab}{{{j{f}}{j{f}}}Ab}{{{j{n}}{j{dAd}}}Af}{{{j{f}}{j{dAd}}}Af}{cc{}}0000{{{j{dA`}}}l}{AhAj}{{}c{}}00002{Al{{h{f}}}}{{}{{h{f}}}}0{{{h{f}}}A`}{Ajb}{{{j{A`}}Ah}Al}{{{j{A`}}n}Al}{jc{}}0{c{{An{e}}}{}{}}0000{{}{{An{c}}}{}}0000{jB`}0000{{{j{dA`}}AhAl}l}{{{j{dA`}}nAl}l}","D":"Dj","p":[[5,"Fixup",0],[0,"mut"],[6,"TinyInsn",0],[5,"Vec",77],[1,"reference"],[1,"unit"],[6,"TinyReg",0],[5,"TinyVm",0],[1,"bool"],[5,"Formatter",78],[8,"Result",78],[5,"PhysAddr",0],[1,"usize"],[1,"u16"],[6,"Result",79],[5,"TypeId",80]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAACgABwABAAAABAAAAAcAAAASAA8AIwADAC0AAAA7ABAA"}]]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); -//{"start":39,"fragment_lengths":[111,111,112,7721,1542]} \ No newline at end of file +//{"start":39,"fragment_lengths":[111,111,112,112,7962,1542]} \ No newline at end of file diff --git a/search.desc/gen/gen-desc-0-.js b/search.desc/gen/gen-desc-0-.js new file mode 100644 index 0000000..dac6144 --- /dev/null +++ b/search.desc/gen/gen-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("gen", 0, "Add example.") \ No newline at end of file diff --git a/search.desc/juicebox_asm/juicebox_asm-desc-0-.js b/search.desc/juicebox_asm/juicebox_asm-desc-0-.js index 58108fc..169ae31 100644 --- a/search.desc/juicebox_asm/juicebox_asm-desc-0-.js +++ b/search.desc/juicebox_asm/juicebox_asm-desc-0-.js @@ -1 +1 @@ -searchState.loadedDescShard("juicebox_asm", 0, "A simple x64 jit assembler with a minimal runtime to …\nx64 jit assembler.\nType representing a 16 bit immediate.\nType representing a 32 bit immediate.\nType representing a 64 bit immediate.\nType representing an 8 bit immediate.\nAn indirect memory operand, eg mov [rax], rcx.\nAn indirect memory operand in the form base + index, eg …\nAn indirect memory operand with additional displacement, …\nA label which is used as target for jump instructions.\nType representing a memory operand.\nA memory operand with a word (16 bit) size hint.\nA memory operand with a dword (32 bit) size hint.\nA memory operand with a qword (64 bit) size hint.\nA memory operand with a word (8 bit) size hint.\nDefinition of 16 bit registers.\nDefinition of 32 bit registers.\nDefinition of 64 bit registers.\nDefinition of 8 bit registers.\nA simple mmaped runtime with executable pages.\nAdd the block of code to the runtime and a get function …\nBind the Label to the current location.\nUnmaps the code page. This invalidates all the function …\nDump the code added so far to the runtime into a file …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreate a memory with size hint from a raw memory operand.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreate a memory with size hint from a raw memory operand.\nReturns the argument unchanged.\nCreate a memory with size hint from a raw memory operand.\nCreate a memory with size hint from a raw memory operand.\nReturns the argument unchanged.\nTrait definitions of various instructions.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nConsume the assembler and get the emitted code.\nCreate a new x64 jit assembler.\nCreate a new unbound Label.\nCreate a new Runtime.\nEmit a nop instruction.\nEmit a ret instruction.\nCreate a new Runtime which also generates static perf …\nTrait for add instruction kinds.\nTrait for call instruction kinds.\nTrait for cmovnz instruction kinds.\nTrait for cmovz instruction kinds.\nTrait for cmp instruction kinds.\nTrait for dec instruction kinds.\nTrait for inc instruction kinds.\nTrait for jmp instruction kinds.\nTrait for jnz instruction kinds.\nTrait for jz instruction kinds.\nTrait for mov instruction kinds.\nTrait for pop instruction kinds.\nTrait for push instruction kinds.\nTrait for test instruction kinds.\nTrait for xor instruction kinds.\nEmit an add instruction.\nEmit a call instruction.\nEmit a (conditional) move if not zero instruction.\nEmit a (conditional) move if zero instruction.\nEmit a compare instruction.\nEmit a decrement instruction.\nEmit a increment instruction.\nEmit an unconditional jump instruction.\nEmit a conditional jump if not zero instruction (ZF = 0).\nEmit a conditional jump if zero instruction (ZF = 1).\nEmit an move instruction.\nEmit a pop instruction.\nEmit a push instruction.\nEmit a logical compare instruction.\nEmit a xor instruction.") \ No newline at end of file +searchState.loadedDescShard("juicebox_asm", 0, "A simple x64 jit assembler with a minimal runtime to …\nx64 jit assembler.\nType representing a 16 bit immediate.\nType representing a 32 bit immediate.\nType representing a 64 bit immediate.\nType representing an 8 bit immediate.\nAn indirect memory operand, eg mov [rax], rcx.\nAn indirect memory operand in the form base + index, eg …\nAn indirect memory operand with additional displacement, …\nA label which is used as target for jump instructions.\nType representing a memory operand.\nA memory operand with a word (16 bit) size hint.\nA memory operand with a dword (32 bit) size hint.\nA memory operand with a qword (64 bit) size hint.\nA memory operand with a word (8 bit) size hint.\nDefinition of 16 bit registers.\nDefinition of 32 bit registers.\nDefinition of 64 bit registers.\nDefinition of 8 bit registers.\nA simple mmaped runtime with executable pages.\nAdd the block of code to the runtime and a get function …\nBind the Label to the current location.\nUnmaps the code page. This invalidates all the function …\nDump the code added so far to the runtime into a file …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreate a memory with size hint from a raw memory operand.\nCreate a memory with size hint from a raw memory operand.\nReturns the argument unchanged.\nCreate a memory with size hint from a raw memory operand.\nReturns the argument unchanged.\nCreate a memory with size hint from a raw memory operand.\nReturns the argument unchanged.\nTrait definitions of various instructions.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nConsume the assembler and get the emitted code.\nCreate a new x64 jit assembler.\nCreate a new unbound Label.\nCreate a new Runtime.\nEmit a nop instruction.\nEmit a ret instruction.\nCreate a new Runtime which also generates static perf …\nTrait for add instruction kinds.\nTrait for call instruction kinds.\nTrait for cmovnz instruction kinds.\nTrait for cmovz instruction kinds.\nTrait for cmp instruction kinds.\nTrait for dec instruction kinds.\nTrait for inc instruction kinds.\nTrait for jmp instruction kinds.\nTrait for jnz instruction kinds.\nTrait for jz instruction kinds.\nTrait for mov instruction kinds.\nTrait for pop instruction kinds.\nTrait for push instruction kinds.\nTrait for sub instruction kinds.\nTrait for test instruction kinds.\nTrait for xor instruction kinds.\nEmit an add instruction.\nEmit a call instruction.\nEmit a (conditional) move if not zero instruction.\nEmit a (conditional) move if zero instruction.\nEmit a compare instruction.\nEmit a decrement instruction.\nEmit a increment instruction.\nEmit an unconditional jump instruction.\nEmit a conditional jump if not zero instruction (ZF = 0).\nEmit a conditional jump if zero instruction (ZF = 1).\nEmit an move instruction.\nEmit a pop instruction.\nEmit a push instruction.\nEmit an sub instruction.\nEmit a logical compare instruction.\nEmit a xor instruction.") \ No newline at end of file diff --git a/settings.html b/settings.html index 7542020..e36c771 100644 --- a/settings.html +++ b/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src-files.js b/src-files.js index e351449..b4498f6 100644 --- a/src-files.js +++ b/src-files.js @@ -1,3 +1,3 @@ -var srcIndex = new Map(JSON.parse('[["add",["",[],["add.rs"]]],["bf",["",[],["bf.rs"]]],["fib",["",[],["fib.rs"]]],["juicebox_asm",["",[["insn",[],["add.rs","call.rs","cmovnz.rs","cmovz.rs","cmp.rs","dec.rs","inc.rs","jmp.rs","jnz.rs","jz.rs","mov.rs","nop.rs","pop.rs","push.rs","ret.rs","test.rs","xor.rs"]]],["asm.rs","imm.rs","insn.rs","label.rs","lib.rs","reg.rs","rt.rs"]]],["tiny_vm",["",[],["tiny_vm.rs"]]]]')); +var srcIndex = new Map(JSON.parse('[["add",["",[],["add.rs"]]],["bf",["",[],["bf.rs"]]],["fib",["",[],["fib.rs"]]],["gen",["",[],["gen.rs"]]],["juicebox_asm",["",[["insn",[],["add.rs","call.rs","cmovnz.rs","cmovz.rs","cmp.rs","dec.rs","inc.rs","jmp.rs","jnz.rs","jz.rs","mov.rs","nop.rs","pop.rs","push.rs","ret.rs","sub.rs","test.rs","xor.rs"]]],["asm.rs","imm.rs","insn.rs","label.rs","lib.rs","reg.rs","rt.rs"]]],["tiny_vm",["",[],["tiny_vm.rs"]]]]')); createSrcSidebar(); -//{"start":36,"fragment_lengths":[26,25,27,265,35]} \ No newline at end of file +//{"start":36,"fragment_lengths":[26,25,27,27,274,35]} \ No newline at end of file diff --git a/src/bf/bf.rs.html b/src/bf/bf.rs.html index 25b814e..9bd6202 100644 --- a/src/bf/bf.rs.html +++ b/src/bf/bf.rs.html @@ -290,7 +290,50 @@ 289 290 291 -292

//! Brainfuck VM.
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
//! Brainfuck VM.
 //!
 //! This example implements a simple
 //! [brainfuck](https://en.wikipedia.org/wiki/Brainfuck) interpreter
@@ -313,7 +356,9 @@
 use juicebox_asm::Runtime;
 use juicebox_asm::{Asm, Imm64, Imm8, Label, MemOp, MemOp8, Reg64, Reg8};
 
-struct BrainfuckInterp {
+// -- BRAINFUCK INTERPRETER ----------------------------------------------------
+
+struct BrainfuckInterp {
     pc: usize,
     imem: Vec<char>,
     dptr: usize,
@@ -323,8 +368,9 @@
 
 impl BrainfuckInterp {
     fn new(prog: &str) -> Result<Self, String> {
-        // Do a first pass over the bf program to filter whitespace and detect invalid tokens.
-        // Additionally validate all conditional branches, and compute their branch target.
+        // Do a first pass over the bf program to filter whitespace and detect
+        // invalid tokens. Additionally validate all conditional branches, and
+        // compute their branch target.
         let (imem, branches) = {
             // Instruction memory holding the final bf program.
             let mut imem = Vec::new();
@@ -422,7 +468,7 @@
     }
 }
 
-// -- BRAINFUCK JIT --------------------------------------------------------------
+// -- BRAINFUCK JIT ------------------------------------------------------------
 
 #[cfg(not(any(target_arch = "x86_64", target_os = "linux")))]
 compile_error!("Only supported on x86_64 with SystemV abi");
@@ -434,7 +480,8 @@
 
 impl BrainfuckJit {
     fn new(prog: &str) -> Result<Self, String> {
-        // Do a first pass over the bf program to filter whitespace and detect invalid tokens.
+        // Do a first pass over the bf program to filter whitespace and detect
+        // invalid tokens.
         let imem = prog
             .chars()
             .filter(|c| !c.is_whitespace())
@@ -460,25 +507,25 @@
 fn run_jit(prog: &str) {
     let mut vm = BrainfuckJit::new(prog).unwrap();
 
-    // Use callee saved registers to hold vm state, such that we don't
-    // need to save any state before calling out to putchar.
+    // Use callee saved registers to hold vm state, such that we don't need to
+    // save any state before calling out to putchar.
     let dmem_base = Reg64::rbx;
     let dmem_idx = Reg64::r12;
 
     let mut asm = Asm::new();
-    // Move data memory pointer (argument on jit entry) into correct
-    // register.
+    // Move data memory pointer (argument on jit entry) into correct register.
     asm.mov(dmem_base, Reg64::rdi);
     // Clear data memory index.
     asm.xor(dmem_idx, dmem_idx);
 
-    // A stack of label pairs, used to link up forward and backward
-    // jumps for a given '[]' pair.
+    // A stack of label pairs, used to link up forward and backward jumps for a
+    // given '[]' pair.
     let mut label_stack = Vec::new();
 
     // Generate code for each instruction in the bf program.
-    for insn in vm.imem {
-        match insn {
+    let mut pc = 0;
+    while pc < vm.imem.len() {
+        match vm.imem[pc] {
             '>' => {
                 // TODO: generate runtime bounds check.
                 asm.inc(dmem_idx);
@@ -488,18 +535,53 @@
                 asm.dec(dmem_idx);
             }
             '+' => {
-                asm.inc(MemOp8::from(MemOp::IndirectBaseIndex(dmem_base, dmem_idx)));
+                // Apply optimization to fold consecutive '+' instructions to a
+                // single add instruction during compile time.
+
+                match vm.imem[pc..].iter().take_while(|&&i| i.eq(&'+')).count() {
+                    1 => asm.inc(MemOp8::from(MemOp::IndirectBaseIndex(dmem_base, dmem_idx))),
+                    cnt if cnt <= i8::MAX as usize => {
+                        // For add m64, imm8, the immediate is sign-extend and
+                        // hence treated as signed.
+                        asm.add(
+                            MemOp::IndirectBaseIndex(dmem_base, dmem_idx),
+                            Imm8::from(cnt as u8),
+                        );
+
+                        // Advance pc, but account for pc increment at the end
+                        // of the loop.
+                        pc += cnt - 1;
+                    }
+                    cnt @ _ => unimplemented!("cnt={cnt} oob, add with larger imm"),
+                }
             }
             '-' => {
-                asm.dec(MemOp8::from(MemOp::IndirectBaseIndex(dmem_base, dmem_idx)));
+                // Apply optimization to fold consecutive '-' instructions to a
+                // single sub instruction during compile time.
+
+                match vm.imem[pc..].iter().take_while(|&&i| i.eq(&'-')).count() {
+                    1 => asm.dec(MemOp8::from(MemOp::IndirectBaseIndex(dmem_base, dmem_idx))),
+                    cnt if cnt <= i8::MAX as usize => {
+                        // For sub m64, imm8, the immediate is sign-extend and
+                        // hence treated as signed.
+                        asm.sub(
+                            MemOp::IndirectBaseIndex(dmem_base, dmem_idx),
+                            Imm8::from(cnt as u8),
+                        );
+
+                        // Advance pc, but account for pc increment at the end
+                        // of the loop.
+                        pc += cnt - 1;
+                    }
+                    cnt @ _ => unimplemented!("cnt={cnt} oob, sub with larger imm"),
+                }
             }
             '.' => {
-                // Load data memory from active cell into di register,
-                // which is the first argument register according to
-                // the SystemV abi, then call into putchar. Since we
-                // stored all out vm state in callee saved registers
-                // we don't need to save any registers before the
-                // call.
+                // Load data memory from active cell into di register, which is
+                // the first argument register according to the SystemV abi,
+                // then call into putchar. Since we stored all out vm state in
+                // callee saved registers we don't need to save any registers
+                // before the call.
                 asm.mov(Reg8::dil, MemOp::IndirectBaseIndex(dmem_base, dmem_idx));
                 asm.mov(Reg64::rax, Imm64::from(putchar as usize));
                 asm.call(Reg64::rax);
@@ -521,8 +603,8 @@
                 );
                 asm.jz(&mut label_pair.0);
 
-                // Bind label_pair.1 after the jump instruction, which
-                // will be the branch target for the matching ']'.
+                // Bind label_pair.1 after the jump instruction, which will be
+                // the branch target for the matching ']'.
                 asm.bind(&mut label_pair.1);
             }
             ']' => {
@@ -530,8 +612,7 @@
                     .pop()
                     .expect("encountered un-balanced brackets, found ']' without matching '['");
 
-                // Goto label_pair.1 if data memory at active cell is
-                // not 0.
+                // Goto label_pair.1 if data memory at active cell is not 0.
                 //   if vm.dmem[vm.dptr] != 0 goto label_pair.1
                 asm.cmp(
                     MemOp::IndirectBaseIndex(dmem_base, dmem_idx),
@@ -539,12 +620,15 @@
                 );
                 asm.jnz(&mut label_pair.1);
 
-                // Bind label_pair.0 after the jump instruction, which
-                // is the branch target for the matching '['.
+                // Bind label_pair.0 after the jump instruction, which is the
+                // branch target for the matching '['.
                 asm.bind(&mut label_pair.0);
             }
             _ => unreachable!(),
         }
+
+        // Increment pc to next instruction.
+        pc += 1;
     }
 
     // Return from bf program.
@@ -560,7 +644,9 @@
     bf_entry(&mut vm.dmem as *mut u8);
 }
 
-fn main() {
+// -- MAIN ---------------------------------------------------------------------
+
+fn main() {
     // https://en.wikipedia.org/wiki/Brainfuck#Adding_two_values
     //let inp = "++>+++++ [<+>-] ++++++++[<++++++>-]<.";
     //println!("add-print-7 (wikipedia.org) - interp");
diff --git a/src/gen/gen.rs.html b/src/gen/gen.rs.html
new file mode 100644
index 0000000..1df336a
--- /dev/null
+++ b/src/gen/gen.rs.html
@@ -0,0 +1,91 @@
+gen.rs - source

gen/
gen.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
//! Add example.
+//!
+//! Jit compile a function at runtime (generate native host code) which calls a function defined in
+//! the example based on the SystemV abi to demonstrate the [`juicebox_asm`] crate.
+
+#[cfg(not(any(target_arch = "x86_64", target_os = "linux")))]
+compile_error!("Only supported on x86_64 with SystemV abi");
+
+use juicebox_asm::insn::*;
+use juicebox_asm::{Asm, Imm16, Imm64, Imm8, Label, Reg16, Reg64::*, Runtime};
+use juicebox_asm::{MemOp, MemOp16, MemOp32, MemOp64, MemOp8};
+
+extern "C" fn add(a: u32, b: u32) -> u32 {
+    a + b
+}
+
+fn main() {
+    let mut asm1 = Asm::new();
+    asm1.xor(r11, r11);
+
+    assert!(0x7fu8 <= i8::MAX as u8);
+
+    asm1.add(MemOp::IndirectBaseIndex(rdi, r11), Imm8::from(0x10u8));
+    asm1.ret();
+
+    let code = asm1.into_code();
+    std::fs::write("jit.asm", &code).unwrap();
+
+    let mut asm2 = Asm::new();
+    asm2.mov(Reg16::cx, Imm16::from(1u16));
+    asm2.mov(MemOp::Indirect(rdi), Reg16::cx);
+    asm2.ret();
+
+    let mut rt = Runtime::new();
+    let fn1 = unsafe { rt.add_code::<extern "C" fn(*mut u64)>(code) };
+    let fn2 = unsafe { rt.add_code::<extern "C" fn(*mut u64)>(asm2.into_code()) };
+
+    let mut data = 0xffff_ffff_ffff_ff00u64;
+    fn1(&mut data as *mut u64);
+    println!("data={:x}", data);
+
+    let mut data = 0xffff_ffff_ffff_ffffu64;
+    fn2(&mut data as *mut u64);
+    println!("data={:x}", data);
+}
+
\ No newline at end of file diff --git a/src/juicebox_asm/insn.rs.html b/src/juicebox_asm/insn.rs.html index 99a3dd6..432d3da 100644 --- a/src/juicebox_asm/insn.rs.html +++ b/src/juicebox_asm/insn.rs.html @@ -117,7 +117,14 @@ 116 117 118 -119
//! Trait definitions of various instructions.
+119
+120
+121
+122
+123
+124
+125
+126
//! Trait definitions of various instructions.
 
 mod add;
 mod call;
@@ -134,6 +141,7 @@
 mod pop;
 mod push;
 mod ret;
+mod sub;
 mod test;
 mod xor;
 
@@ -210,16 +218,22 @@
     fn mov(&mut self, op1: T, op2: U);
 }
 
+/// Trait for [`pop`](https://www.felixcloutier.com/x86/pop) instruction kinds.
+pub trait Pop<T> {
+    /// Emit a pop instruction.
+    fn pop(&mut self, op1: T);
+}
+
 /// Trait for [`push`](https://www.felixcloutier.com/x86/push) instruction kinds.
 pub trait Push<T> {
     /// Emit a push instruction.
     fn push(&mut self, op1: T);
 }
 
-/// Trait for [`pop`](https://www.felixcloutier.com/x86/pop) instruction kinds.
-pub trait Pop<T> {
-    /// Emit a pop instruction.
-    fn pop(&mut self, op1: T);
+/// Trait for [`sub`](https://www.felixcloutier.com/x86/sub) instruction kinds.
+pub trait Sub<T, U> {
+    /// Emit an sub instruction.
+    fn sub(&mut self, op1: T, op2: U);
 }
 
 /// Trait for [`test`](https://www.felixcloutier.com/x86/test) instruction kinds.
diff --git a/src/juicebox_asm/insn/add.rs.html b/src/juicebox_asm/insn/add.rs.html
index e62bc4a..f91aa25 100644
--- a/src/juicebox_asm/insn/add.rs.html
+++ b/src/juicebox_asm/insn/add.rs.html
@@ -36,8 +36,14 @@
 35
 36
 37
-38
use super::Add;
-use crate::{Asm, Imm16, MemOp, Reg16, Reg32, Reg64};
+38
+39
+40
+41
+42
+43
+44
use super::Add;
+use crate::{Asm, Imm16, Imm8, MemOp, Reg16, Reg32, Reg64};
 
 impl Add<Reg64, Reg64> for Asm {
     fn add(&mut self, op1: Reg64, op2: Reg64) {
@@ -63,6 +69,12 @@
     }
 }
 
+impl Add<MemOp, Imm8> for Asm {
+    fn add(&mut self, op1: MemOp, op2: Imm8) {
+        self.encode_mi(0x83, 0, op1, op2);
+    }
+}
+
 impl Add<MemOp, Imm16> for Asm {
     fn add(&mut self, op1: MemOp, op2: Imm16) {
         self.encode_mi(0x81, 0, op1, op2);
diff --git a/src/juicebox_asm/insn/sub.rs.html b/src/juicebox_asm/insn/sub.rs.html
new file mode 100644
index 0000000..f350d05
--- /dev/null
+++ b/src/juicebox_asm/insn/sub.rs.html
@@ -0,0 +1,29 @@
+sub.rs - source

juicebox_asm/insn/
sub.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
use super::Sub;
+use crate::{Asm, Imm8, MemOp, Reg64};
+
+impl Sub<Reg64, Reg64> for Asm {
+    fn sub(&mut self, op1: Reg64, op2: Reg64) {
+        self.encode_rr(&[0x29], op1, op2);
+    }
+}
+
+impl Sub<MemOp, Imm8> for Asm {
+    fn sub(&mut self, op1: MemOp, op2: Imm8) {
+        self.encode_mi(0x83, 5, op1, op2);
+    }
+}
+
\ No newline at end of file diff --git a/trait.impl/juicebox_asm/insn/trait.Sub.js b/trait.impl/juicebox_asm/insn/trait.Sub.js new file mode 100644 index 0000000..3fe7cac --- /dev/null +++ b/trait.impl/juicebox_asm/insn/trait.Sub.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["juicebox_asm",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[19]} \ No newline at end of file -- cgit v1.2.3