From f0e217bbc7d646742e3a83dbeb36332ded9f9df4 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Wed, 9 Dec 2020 14:03:59 -0500 Subject: - 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. --- sux.h | 1 + 1 file changed, 1 insertion(+) 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); } -- cgit v1.2.3-13-gbd6f