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

@@ -3125,13 +3125,16 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
| bhi ->vmeta_unm
| eorne CARG2, CARG2, #0x80000000
| bne >5
| rsbseq CARG1, CARG1, #0
| rsbs CARG1, CARG1, #0
| ldrdeq CARG12, >8
| ldrdvs CARG12, >9
|5:
| strd CARG12, [BASE, RA]
| ins_next3
|
|.align 8
|8:
| .long 0x00000000, 0x80000000 // -0.
|9:
| .long 0x00000000, 0x41e00000 // 2^31.
break;