[Top][All Lists]

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

assembler in scheme

From: Stefan Israelsson Tampe
Subject: assembler in scheme
Date: Sat, 26 May 2012 20:34:12 +0200

I got an idea,

why not design a portable assembler that have a unifying simple core and try
to model a VM on that e.g. simple things will be naitive and complex instructions
can be dispatched via a named goto.

The solution would fix a few registers like the bp and then have enough instructions
to be able to dispatch and move objects in memory and implement correct function call

I would use two fixed hardware - registers.
1. bp: to track the function stack
2. vm: to track vm local data.

It would be cool if we could say to gcc to not clobber those registers and compile the vm as before without
changing especially much but with some assembler to do the needed jump correctly and also reach the register
associated data.

One idea was to use sassy, but it does only support x86.

Another idea is to port the sbcl assembler to scheme. This means that we will get
assemblers for a larger set of targets but still not enough to be portable.

The final idea I got was to use the information in gcc or gas somehow.

Anyway I need somthing new to chew on, so why not port the sbcl assembler at some level.


reply via email to

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