DUALNUM: Improve/fix edge cases of unary minus.
Thanks to Sergey Kaplun. #1422 #1418
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user