mescc: Fix hex2:immediate8 to work with mes/m2-compiled mes.
* module/mescc/M1.scm (hex2:immediate8): Remove mesc? exception. (mesc?): Remove.
This commit is contained in:
parent
516b5849f2
commit
2e13faa3c2
|
@ -88,16 +88,13 @@
|
||||||
(if hex? (string-append "%0x" (dec->hex o))
|
(if hex? (string-append "%0x" (dec->hex o))
|
||||||
(string-append "%" (number->string o))))
|
(string-append "%" (number->string o))))
|
||||||
|
|
||||||
(define mesc? (string=? %compiler "mesc"))
|
|
||||||
|
|
||||||
(define (hex2:immediate8 o)
|
(define (hex2:immediate8 o)
|
||||||
;; FIXME: #x100000000 => 0 divide-by-zero when compiled with 64 bit mesc
|
(if hex? (string-append "%0x" (dec->hex (modulo o #x100000000))
|
||||||
(if hex? (string-append "%0x" (dec->hex (if mesc? 0 (modulo o #x100000000)))
|
|
||||||
" %0x" (if (< o 0) "-1"
|
" %0x" (if (< o 0) "-1"
|
||||||
(dec->hex (if mesc? o (quotient o #x100000000)))))
|
(dec->hex (quotient o #x100000000))))
|
||||||
(string-append "%" (number->string (dec->hex (if mesc? 0 (modulo o #x100000000))))
|
(string-append "%" (number->string (dec->hex (modulo o #x100000000)))
|
||||||
" %" (if (< o 0) "-1"
|
" %" (if (< o 0) "-1"
|
||||||
(number->string (dec->hex (if mesc? o (quotient o #x100000000))))))))
|
(number->string (dec->hex (quotient o #x100000000)))))))
|
||||||
|
|
||||||
(define* (display-join o #:optional (sep ""))
|
(define* (display-join o #:optional (sep ""))
|
||||||
(let loop ((o o))
|
(let loop ((o o))
|
||||||
|
|
Loading…
Reference in a new issue