Selaa lähdekoodia

Fix + on x86_64

This also means that from now on we *only* work on x86_64.
Lucas Stadler 8 vuotta sitten
vanhempi
commit
6b62f16f9f
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      scm/inc/compiler.scm

+ 2 - 2
scm/inc/compiler.scm

85
     (emit-compare))
85
     (emit-compare))
86
    ((+)
86
    ((+)
87
     (emit-expr (primcall-operand2 x) si)
87
     (emit-expr (primcall-operand2 x) si)
88
     (emit "movl %eax, ~a(%rbp)" si) ; move second arg on the stack
88
     (emit "movl %eax, ~a(%rsp)" si) ; move second arg on the stack
89
     (emit-expr (primcall-operand1 x) (- si wordsize))
89
     (emit-expr (primcall-operand1 x) (- si wordsize))
90
     (emit "addl ~a(%rbp), %eax" si))
90
     (emit "addl ~a(%rsp), %eax" si))
91
    ))
91
    ))
92
92
93
(define (compile-program x)
93
(define (compile-program x)