RE: Open Source BlackBox compiler - Win64 version?

From: CFB Software <"CFB>
Date: Thu, 9 Dec 2004 12:08:21 +1030

----boundary-LibPST-iamunique-2140806731_-_-
Content-type: text/plain

>
> Actually, it might (just might) be easier to implement the
> compiler for a subset of the language first, is why the
> discussion may not be entirely academic. Remember that there
> is both AMD and Itanium.
>

I was only thinking of AMD64 and Intel EMT64 (e.g. Xeon). NOT the
Itanium - that would be significantly more difficult.

I might be wrong, but my understanding is that the X86-64 instruction
set is a superset of the existing X86 instruction set used by BlackBox.
It may be possible to keep close to 100% of the existing compiler code
and just extend / replace the parts where necessary to exploit any
advantages of the 64-bit capabilities. It might even be possible to do
this in independent stages, for example:

1. Make any necessary changes to the object file / exe file format as
required to be recognised as a 64-bit native application by Win64.

2. Implement the existing 64-bit LONG operations using the new 64-bit
instructions.

3. Implement 128-bit REALs (LONGREAL?) using the new instructions.

4. Implement 64-bit pointers to enable direct addressing of RAM > 2GB.
This would break any existing code that relied on the size of pointers
being 32-bits. These sorts of dependencies may justifiably exist in the
lower levels of BB (debugger, garbage collector etc.), but I would not
expect them to be present in application-level code.

5. Make use of the increased register availability (twice as many) for
optimisation.

6. Implement 64-element sets? This would have to be carefully considered
to maintain backward capability.

7. Anything else?

Some more detailed information about what is involved can be obtained by
looking at the work that ModulaWare did when porting their Modula-2 and
Oberon compilers to a 64-bit environment i.e. Compaq's OpenVMS:

http://www.modulaware.com/mw64bit.htm

Component Pascal has a slight advantage in that the use of 64-bit long
integers is already well-established.

Once the compiler had been developed, it should then be possible to
extend the BB libraries / framework where necessary (e.g. garbage
collector?) or desirable (e.g. maths libraries).

I have neither the X86 experience nor the time to embark on such a
project, but I would guesstimate that, given suitably qualified
programmers, it would be feasible to complete at least a major part of
it in man-months rather than man-years.

Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp





--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-2140806731_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gXHBhcg0KPiBBY3R1YWxseSwgaXQgbWlnaHQg
KGp1c3QgbWlnaHQpIGJlIGVhc2llciB0byBpbXBsZW1lbnQgdGhlIFxwYXINCj4gY29tcGlsZXIg
Zm9yIGEgc3Vic2V0IG9mIHRoZSBsYW5ndWFnZSBmaXJzdCwgaXMgd2h5IHRoZSBccGFyDQo+IGRp
c2N1c3Npb24gbWF5IG5vdCBiZSBlbnRpcmVseSBhY2FkZW1pYy4gUmVtZW1iZXIgdGhhdCB0aGVy
ZSBccGFyDQo+IGlzIGJvdGggQU1EIGFuZCBJdGFuaXVtLlxwYXINCj4gXHBhcg0KXHBhcg0KSSB3
YXMgb25seSB0aGlua2luZyBvZiBBTUQ2NCBhbmQgSW50ZWwgRU1UNjQgKGUuZy4gWGVvbikuIE5P
VCB0aGV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