Revert "mescc: Only use signed division when numerator is signed."
This breaks tcc-boot0 on ARM.
This reverts commit 348dcbcbd7
.
This commit is contained in:
parent
7a4ed0d535
commit
25cbc48686
|
@ -1218,9 +1218,9 @@
|
||||||
((rshift ,a ,b) ((binop->r info) a b 'r0>>r1))
|
((rshift ,a ,b) ((binop->r info) a b 'r0>>r1))
|
||||||
((div ,a ,b)
|
((div ,a ,b)
|
||||||
((binop->r info) a b 'r0/r1
|
((binop->r info) a b 'r0/r1
|
||||||
(signed? (ast->type a info))))
|
(or (signed? (ast->type a info)) (signed? (ast->type b info)))))
|
||||||
((mod ,a ,b) ((binop->r info) a b 'r0%r1
|
((mod ,a ,b) ((binop->r info) a b 'r0%r1
|
||||||
(signed? (ast->type a info))))
|
(or (signed? (ast->type a info)) (signed? (ast->type b info)))))
|
||||||
((mul ,a ,b) ((binop->r info) a b 'r0*r1))
|
((mul ,a ,b) ((binop->r info) a b 'r0*r1))
|
||||||
|
|
||||||
((not ,expr)
|
((not ,expr)
|
||||||
|
@ -1361,7 +1361,7 @@
|
||||||
info)))
|
info)))
|
||||||
(info (expr->register a info))
|
(info (expr->register a info))
|
||||||
(info (append-text info (wrap-as (as info 'swap-r0-r1))))
|
(info (append-text info (wrap-as (as info 'swap-r0-r1))))
|
||||||
(signed? (signed? type))
|
(signed? (or (signed? type) (signed? type-b)))
|
||||||
(info (append-text info (cond ((equal? op "+=") (wrap-as (as info 'r0+r1)))
|
(info (append-text info (cond ((equal? op "+=") (wrap-as (as info 'r0+r1)))
|
||||||
((equal? op "-=") (wrap-as (as info 'r0-r1)))
|
((equal? op "-=") (wrap-as (as info 'r0-r1)))
|
||||||
((equal? op "*=") (wrap-as (as info 'r0*r1)))
|
((equal? op "*=") (wrap-as (as info 'r0*r1)))
|
||||||
|
|
Loading…
Reference in New Issue