build: Use released M0 intead of M1.

This commit is contained in:
Jan Nieuwenhuizen 2017-07-12 19:41:31 +02:00
parent 6a391df5e0
commit aef03ebd39
3 changed files with 13 additions and 7 deletions

1
configure vendored
View file

@ -174,6 +174,7 @@ exec ${GUILE} --no-auto-compile -L $(pwd) -C $(pwd) -e 'main' -s "$0" ${1+"$@"}
(if (member ARCH '("i686" "arm")) (string-append BUILD_TRIPLET "-" CC)
"i686-unknown-linux-gnu-gcc")))
(define HEX2 (or (getenv "HEX2") "hex2"))
(define M1 (or (getenv "M1") "M0"))
(define (parse-opts args)
(let* ((option-spec

View file

@ -319,10 +319,10 @@
(store #:add-file "guile/mes/as-i386.go")
(store #:add-file "guile/mes/M1.go")))))
(define %M1 (PATH-search-path "M1"))
(define %M1 (PATH-search-path "M0")) ; M1 is in unreleased mescc-tools 0.2
(define %M1-FLAGS
'("--LittleEndian"
"--Architecture=1"
;;"--Architecture=1"
;;"--BaseAddress=0x1000000"
))
(define* (M1.asm #:key (m1 %M1) (m1-flags %M1-FLAGS))

View file

@ -73,11 +73,15 @@
(define (hex2:offset1 o)
(string-append "!" o))
(define hex? #f) ; We need unreleased messc-tools 0.2 wih 0xXX support for this
(define (hex2:immediate o)
(string-append "%0x" (dec->hex o)))
(if hex? (string-append "%0x" (dec->hex o))
(format #f "%~a" o)))
(define (hex2:immediate1 o)
(string-append "!0x" (dec->hex o)))
(if hex? (string-append "!0x" (dec->hex o))
(format #f "!~a" o)))
(define (object->M1 o)
(let* ((functions (assoc-ref o 'functions))
@ -104,9 +108,10 @@
(_ (cond ((char? o) (text->M1 (char->integer o)))
((string? o) (format #f "~a" o))
((number? o) (let ((o (if (< o #x80) o (- o #x100))))
(string-append "!0x"
(if (and (>= o 0) (< o 16)) "0" "")
(number->string o 16))))
(if hex? (string-append "!0x"
(if (and (>= o 0) (< o 16)) "0" "")
(number->string o 16))
(string-append "!" (number->string o)))))
(else (format #f "~a" o))))))
(define (write-function o)
(let ((name (car o))