aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-12-07 22:26:57 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-12-07 22:26:57 +0100
commit647e3646c2f686ce236059b935336c43c8a9a074 (patch)
treebd6e29ed3735be0de45fddd3ad78403c466f02bd
parent968a77876c611b4977d137670aaee2b379af5880 (diff)
downloadjuicebox-asm-647e3646c2f686ce236059b935336c43c8a9a074.tar.gz
juicebox-asm-647e3646c2f686ce236059b935336c43c8a9a074.zip
insn: enhance cmp doc
-rw-r--r--src/insn.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/insn.rs b/src/insn.rs
index 11405c1..e5a597e 100644
--- a/src/insn.rs
+++ b/src/insn.rs
@@ -23,7 +23,10 @@ pub trait Call<T> {
}
pub trait Cmp<T, U> {
- /// Emit a compare call instruction.
+ /// Emit a compare instruction.
+ ///
+ /// Computes `op2 - op1` and sets the status flags in the same way as the `sub` instruction,
+ /// the result is discarded.
fn cmp(&mut self, op1: T, op2: U);
}