[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Operand sizes in mescc compiler
From: |
W. J. van der Laan |
Subject: |
Re: Operand sizes in mescc compiler |
Date: |
Sat, 17 Apr 2021 19:39:04 +0000 |
> You'll notice that these cases are preceded by something like
>
> --8<---------------cut here---------------start------------->8---
>
> (size (if (= size reg-size) 0 size))
>
> --8<---------------cut here---------------end--------------->8---
>
> So 0 means register-size. The other sizes are byte counts, for if you
> need to move smaller units.
Ohh, that makes sense. I missed the reg-size assignment.
> You'll notice that it's implemented by <cpu>/as.scm
>
> --8<---------------cut here---------------start------------->8---
>
> (define (i386:mem->r info)
>
> (let ((r (get-r info)))
>
> `((,(string-append "mov____(%" r "),%" r)))))
>
> --8<---------------cut here---------------end--------------->8---
>
> so this just means: default register size.
Right! Yes I mimicked that and it came out working, but thanks for explaining
so I understand why :)
-W