Floating point support

Igor Stasenko siguctua at gmail.com
Sun Mar 16 13:05:06 UTC 2008


Hello Bryce,

i'd like to ask you, how do you envision adding floating point support
to Exupery
to make it able to use FPU.

The problem i see, is that it would require adding a type to registers
to be able to use float-type values in intermediate code
representation.

Or else, how it would look like, when i need to encode floating point
operations like:

temp1 := floatValue1.
temp2 := floatValue2.
temp3 := temp1 + temp2. "here compiler should generate FPU
instructions instead of integer addition"

Or maybe i'm looking at problem at wrong angle?
Maybe easier to make intermediate in format like:

unaryFloatOp(argmunentAddress, resultAddress)
binaryFloatOp(argmunent1Address, argument2Address, resultAddress)
compareFloatsOp(arg1address, arg2address)

then compiler don't have to deal with float registers (in register
spilling code and other optimization patterns).

Another thing, is support of byte-wide operations, like
loading/storing byte at specific address. And of course being able to
do some operations with byte-sized values.
How do you plan to support this?

The reason, why i'm asking about this, is that i'm currently busy with
this: http://wiki.squeak.org/squeak/6041

As you maybe remember i had plans to do such system before. And now i
spent some time to push it to the point, where it can become a reality
:)

-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Exupery mailing list