summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-12-09 14:03:59 -0500
committermrb0nk500 <b0nk@b0nk.xyz>2020-12-09 14:55:57 -0500
commitf0e217bbc7d646742e3a83dbeb36332ded9f9df4 (patch)
tree055869b11e2949e07a9cd482c6750a380c6bee59
parentb1cf9d8a524edab9363bb53c0fd70457a8bdbd76 (diff)
- Made the `set` instruction also set the Zero flag.
This was done in order to save three bytes whenever you want to immediatly do a conditional branch after the `set` instruction.
-rw-r--r--sux.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sux.h b/sux.h
index c532c6e..6d4d283 100644
--- a/sux.h
+++ b/sux.h
@@ -856,6 +856,7 @@ static /*inline*/ uint64_t mov(struct sux *cpu, uint64_t src, uint64_t size, uin
}
static /*inline*/ uint64_t set(struct sux *cpu, uint8_t flag, uint8_t thread) {
+ setflag(flag == 0, Z);
return (flag != 0);
}