[squeak-dev] what assembler should I use?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] what assembler should I use?

Eliot Miranda-2
Hi All,

    I now have an x86 simulator integrated into Squeak that can execute code form a ByteArray, Bitmap etc.  So I'm now ready to write the JIT code generator.  I want a simple framework that can convert from an abstract register-transfer-level instruction set to a concrete machine code, x86/IA32 in the first instance.  I wonder what frameworks there are that I can, um, exploit.  The end result must be Smalltalk code that can generate machine code and can be translated via Slang to C.  I've already extended Slang somewhat for the Stack VM so that simple classes can be converted to structs.  But the Slang technology I have is still a long way from translating arbitrary Smalltalk to C, so when you think "Smalltalk framework" think "Limited Smalltalk/C hybrid framework".

I know that Exupery has an assembler in it but it is quite high-level and oriented to textual assembly whereas my JIT will have no assembler level in it, just stack contents abstractions (to model receiver, arguments, temporaries, intermediates, constants, etc), register transfer level and concrete machine code.  I know Ian has written the exact framework I need but in C.  Are there any other candidates?

Ian, how difficult would it be to translate your framework (ccg?) into Smalltalk so that it can be translated back into C via Slang?  My guess is not too hard.  Have you got a pointer to an up-to-date ccg?  Also, what other ISAs does it target?

best
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] what assembler should I use?

Karl Ramberg
Eliot Miranda wrote:

> Hi All,
>
>     I now have an x86 simulator integrated into Squeak that can
> execute code form a ByteArray, Bitmap etc.  So I'm now ready to write
> the JIT code generator.  I want a simple framework that can convert
> from an abstract register-transfer-level instruction set to a concrete
> machine code, x86/IA32 in the first instance.  I wonder what
> frameworks there are that I can, um, exploit.  The end result must be
> Smalltalk code that can generate machine code and can be translated
> via Slang to C.  I've already extended Slang somewhat for the Stack VM
> so that simple classes can be converted to structs.  But the Slang
> technology I have is still a long way from translating arbitrary
> Smalltalk to C, so when you think "Smalltalk framework" think "Limited
> Smalltalk/C hybrid framework".
>
> I know that Exupery has an assembler in it but it is quite high-level
> and oriented to textual assembly whereas my JIT will have no assembler
> level in it, just stack contents abstractions (to model receiver,
> arguments, temporaries, intermediates, constants, etc), register
> transfer level and concrete machine code.  I know Ian has written the
> exact framework I need but in C.  Are there any other candidates?
>
> Ian, how difficult would it be to translate your framework (ccg?) into
> Smalltalk so that it can be translated back into C via Slang?  My
> guess is not too hard.  Have you got a pointer to an up-to-date ccg?
>  Also, what other ISAs does it target?
>
> best
> Eliot
> ------------------------------------------------------------------------
>
>
>  
Hi,
I don't know of any stuff for x86
There was a framework to make ARM code directly from Squeak by the
Interval people. Tim Rowledge hosted that code before. There is also
PIC/Smaltalk.

Karl


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] what assembler should I use?

Michael Haupt-3
In reply to this post by Eliot Miranda-2
Hi Eliot,

On Sat, Dec 13, 2008 at 9:19 PM, Eliot Miranda <[hidden email]> wrote:
> I know Ian has written the exact framework I need
> but in C.  Are there any other candidates?
> Ian, how difficult would it be to translate your framework (ccg?) into
> Smalltalk so that it can be translated back into C via Slang?  My guess is
> not too hard.  Have you got a pointer to an up-to-date ccg?  Also, what
> other ISAs does it target?

the ccg documentation looks as if ccg also was oriented towards
textual assembly representations... maybe I'm getting it wrong.

There's Ian's Jolt compiler, which is written in the "Pepsi" language;
it generates native code. Could that be what you mean with
"up-to-date"? (Entry point at
http://piumarta.com/svn2/idst/trunk/function/jolt-burg/.)

Best,

Michael