mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MIT-Scheme-devel] [commit acae7a5] svm: Port to 64 bit words.


From: Matt Birkholz
Subject: Re: [MIT-Scheme-devel] [commit acae7a5] svm: Port to 64 bit words.
Date: Fri, 23 Mar 2012 16:18:33 -0700

> From: Matt Birkholz <address@hidden>
> Date: Sun, 4 Mar 2012 16:09:17 -0700
> 
> [...]
> 
> I believe the only remaining trick is the 32<->64bit fasloader.

Here's another trick to master: references to constants.  Constants
are currently referenced by pc-relative address, aka byte offsets.

        (load word (r 6) (pc-relative (- |OBJECT-12| *pc*)))

Unfortunately these offsets are sensitive to the word size because of
the padding between the instructions and the constants.  Different
alignment requirements mean different amounts of padding and thus
different byte offsets and thus different instructions.

If we had something like a "pc-relative-aligned" addressing mode that
added the variable padding at runtime, we would be in business.  It
would presumably take a byte offset (to the end of the instruction
stream) and a word offset (index into constants section) --
word-size-independent assembler immediates.  That's not a bad trick.

And why IS address-units-per-object referenced in opncod.scm and
rtlty2.scm.  Surely that's a third trick or two?

I'm think'n' I'll just wait to see the BIG trick, the 32->64bit and
64->32bit fasloaders, before I sink more brain-grease into this... ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]