From 872cf6d06f4d77637b4627fdc583bab79ee2372f Mon Sep 17 00:00:00 2001 From: johannst Date: Mon, 27 Feb 2023 22:52:40 +0000 Subject: deploy: 6486b862edc2750dba83848f62d6c9f3d4c6d3c2 --- src/juicebox_asm/insn.rs.html | 94 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/juicebox_asm/insn.rs.html (limited to 'src/juicebox_asm/insn.rs.html') diff --git a/src/juicebox_asm/insn.rs.html b/src/juicebox_asm/insn.rs.html new file mode 100644 index 0000000..93134d8 --- /dev/null +++ b/src/juicebox_asm/insn.rs.html @@ -0,0 +1,94 @@ +insn.rs - source
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
+46
+
mod add;
+mod dec;
+mod jmp;
+mod jnz;
+mod jz;
+mod mov;
+mod ret;
+mod test;
+
+pub trait Add<T, U> {
+    /// Emit an add instruction.
+    fn add(&mut self, op1: T, op2: U);
+}
+
+pub trait Dec<T> {
+    /// Emit a decrement instruction.
+    fn dec(&mut self, op1: T);
+}
+
+pub trait Jmp<T> {
+    /// Emit an unconditional jump instruction.
+    fn jmp(&mut self, op1: T);
+}
+
+pub trait Jnz<T> {
+    /// Emit a conditional jump if not zero instruction (`ZF = 0`).
+    fn jnz(&mut self, op1: T);
+}
+
+pub trait Jz<T> {
+    /// Emit a conditional jump if zero instruction (`ZF = 1`).
+    fn jz(&mut self, op1: T);
+}
+
+pub trait Mov<T, U> {
+    /// Emit an move instruction.
+    fn mov(&mut self, op1: T, op2: U);
+}
+
+pub trait Test<T, 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.
+    fn test(&mut self, op1: T, op2: U);
+}
+
+
\ No newline at end of file -- cgit v1.2.3