DUALNUM: Improve/fix edge cases of unary minus.

Thanks to Sergey Kaplun. #1422 #1418
This commit is contained in:
Mike Pall
2026-01-09 18:46:32 +01:00
parent 3015b6187e
commit 707c12bf00
8 changed files with 33 additions and 7 deletions

View File

@@ -3962,11 +3962,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
| bne >5
|.if GPR64
| lus TMP2, 0x8000
| neg TMP0, TMP0
| neg. TMP0, TMP0
| beq >8
| cmplw TMP0, TMP2
| beq >4
|.else
| nego. TMP0, TMP0
| beq >8
| bso >4
|1:
|.endif
@@ -3993,6 +3995,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
| stw TMP0, 4(RA)
|.if DUALNUM
| b <3
|8:
| lus TMP1, 0x8000 // -0.
| b <7
|.else
| ins_next2
|.endif