mescc: Remove jump calculation, use labels: and, or.
* module/language/c99/compiler.mes (expr->accu): Refactor (and ...), (or ...).
This commit is contained in:
parent
0a94b499fa
commit
36e0219af3
|
@ -738,27 +738,27 @@
|
|||
((lt ,a ,b) ((binop->accu info) b a (i386:base-sub)))
|
||||
|
||||
((or ,a ,b)
|
||||
(let* ((empty (clone info #:text '()))
|
||||
(b-length (length (append (i386:Xjump-nz 0)
|
||||
(i386:accu-test))))
|
||||
(let* ((here (number->string (length (.text info))))
|
||||
(skip-b-label (string-append (.function info) "_skip_b_" here))
|
||||
(info ((expr->accu info) a))
|
||||
(info (append-text info (wrap-as (i386:accu-test))))
|
||||
(info (append-text info (wrap-as (append (i386:Xjump-nz (- b-length 1))
|
||||
(i386:accu-test)))))
|
||||
(info (append-text info (wrap-as (i386:jump-label-nz `(#:local ,skip-b-label)))))
|
||||
(info (append-text info (wrap-as (i386:accu-test))))
|
||||
(info ((expr->accu info) b))
|
||||
(info (append-text info (wrap-as (i386:accu-test)))))
|
||||
(info (append-text info (wrap-as (i386:accu-test))))
|
||||
(info (append-text info (wrap-as `(#:label ,skip-b-label)))))
|
||||
info))
|
||||
|
||||
((and ,a ,b)
|
||||
(let* ((empty (clone info #:text '()))
|
||||
(b-length (length (append (i386:Xjump-z 0)
|
||||
(i386:accu-test))))
|
||||
(let* ((here (number->string (length (.text info))))
|
||||
(skip-b-label (string-append (.function info) "_skip_b_" here))
|
||||
(info ((expr->accu info) a))
|
||||
(info (append-text info (wrap-as (i386:accu-test))))
|
||||
(info (append-text info (wrap-as (append (i386:Xjump-z (- b-length 1))
|
||||
(i386:accu-test)))))
|
||||
(info (append-text info (wrap-as (i386:jump-label-z `(#:local ,skip-b-label)))))
|
||||
(info (append-text info (wrap-as (i386:accu-test))))
|
||||
(info ((expr->accu info) b))
|
||||
(info (append-text info (wrap-as (i386:accu-test)))))
|
||||
(info (append-text info (wrap-as (i386:accu-test))))
|
||||
(info (append-text info (wrap-as `(#:label ,skip-b-label)))))
|
||||
info))
|
||||
|
||||
((cast ,cast ,o)
|
||||
|
|
Loading…
Reference in a new issue