fixed invalid code generation of (movl k0 (disp k1 k2)) which is
invalid in X86_64.
This commit is contained in:
parent
12f41f4a8a
commit
4c2b13ebe0
|
@ -2337,28 +2337,20 @@
|
|||
(E (make-asm-instr 'move u b))
|
||||
(E (make-asm-instr op a u))))]
|
||||
[else
|
||||
(let ([s1 (disp-s0 a)] [s2 (disp-s1 a)])
|
||||
(check-disp a
|
||||
(lambda (a)
|
||||
(let ([s0 (disp-s0 a)] [s1 (disp-s1 a)])
|
||||
(cond
|
||||
[(and (mem? s1) (mem? s2))
|
||||
[(and (constant? s0) (constant? s1))
|
||||
(let ([u (mku)])
|
||||
(make-seq
|
||||
(make-seq
|
||||
(E (make-asm-instr 'move u s1))
|
||||
(E (make-asm-instr 'int+ u s2)))
|
||||
(E (make-asm-instr 'move u s0))
|
||||
(E (make-asm-instr 'int+ u s1)))
|
||||
(make-asm-instr op
|
||||
(make-disp u (make-constant 0))
|
||||
b)))]
|
||||
[(mem? s1)
|
||||
(let ([u (mku)])
|
||||
(make-seq
|
||||
(E (make-asm-instr 'move u s1))
|
||||
(E (make-asm-instr op (make-disp u s2) b))))]
|
||||
[(mem? s2)
|
||||
(let ([u (mku)])
|
||||
(make-seq
|
||||
(E (make-asm-instr 'move u s2))
|
||||
(E (make-asm-instr op (make-disp u s1) b))))]
|
||||
[else x]))])]
|
||||
[else (make-asm-instr op a b)]))))])]
|
||||
[(fl:load fl:store fl:add! fl:sub! fl:mul! fl:div!
|
||||
fl:load-single fl:store-single)
|
||||
(check-disp-arg a
|
||||
|
|
|
@ -554,8 +554,8 @@
|
|||
(CODE c0 (CODE c1 (IMM32 i32 ac))))
|
||||
|
||||
|
||||
(define (dotrace orig ls)
|
||||
(printf "TRACE: ~s\n"
|
||||
(define (dotrace instr orig ls)
|
||||
(printf "TRACE: ~s ~s\n" instr
|
||||
(let f ([ls ls])
|
||||
(if (eq? ls orig)
|
||||
'()
|
||||
|
|
|
@ -139,6 +139,7 @@
|
|||
|
||||
open-directory-stream directory-stream?
|
||||
read-directory-stream close-directory-stream
|
||||
process*
|
||||
))
|
||||
|
||||
;(define-syntax assert* (identifier-syntax assert))
|
||||
|
|
|
@ -1 +1 @@
|
|||
1853
|
||||
1855
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
(put-u8 p b))
|
||||
(append stub1 (mkstub2 (length ls)) stub3 ls))
|
||||
(close-output-port p))
|
||||
(system "otool64 -tv tmp.o"))
|
||||
(system "otool -tv tmp.o"))
|
||||
|
||||
(printf "Trying a simple sequence ...\n")
|
||||
|
||||
|
|
Loading…
Reference in New Issue