Re: Gforth and gcc "progress"
- From: Krishna Myneni <krishnamyneni@xxxxxxxxxxxxx>
- Date: Sun, 24 Jun 2007 12:36:50 -0500
Anton Ertl wrote:
"slava@xxxxxxxxx" <slava@xxxxxxxxx> writes:
Why does gforth rely on gcc at all?
We want portability and speed. Gcc used to have outstanding
advantages there:
- Labels-as-values allowed us to do threaded code (factor of 2 over
switch dispatch) and dynamic superinstructions (another factor of 2).
- Explicit register allocation allowed us to get decent register
allocation.
- Long long allowed us to do doubles (they broke that many years ago
on the Alpha and "fixed" it by changing the documentation, so we
have had workarounds for BUGGY_LONG_LONG for a long time).
Unfortunately, the gcc maintainers are working hard at eliminating
these advantages, so I would love not to have to rely on gcc.
Maybe its time for a rewrite? :)
Yes, I have been thinking about compiling definitions to C source
code, then compiling it and dynamically linking it in. Thus the gcc
maintainers would have succeeded in their goal of weaning us off GNU C
extensions, and, thanks to gcc's long compile times, would have
successfully eliminated themselves from the competition.
- anton
Ok. I'll throw in my two cents worth of suggestions here. Eliminating gcc is a drastic option. However, it may be possible to isolate the critical parts of the code into a separate assembly source file. The critical code may then be tweaked without restrictions or compiler interference. This is the model we use in kForth, which is a mix of assembler, C, and C++ source. Of course, this means much more work in producing a system which can run on many platforms (David Williams can back me up on this statement!), since all of the source is no longer portable. But that seems to be the case anyway, now, for gforth's dependence on the gcc version.
Krishna
.
- Follow-Ups:
- Re: Gforth and gcc "progress"
- From: Anton Ertl
- Re: Gforth and gcc "progress"
- References:
- Gforth and gcc "progress"
- From: Anton Ertl
- Re: Gforth and gcc "progress"
- From: slava@xxxxxxxxx
- Re: Gforth and gcc "progress"
- From: Anton Ertl
- Gforth and gcc "progress"
- Prev by Date: Re: Build your own Forth for Microchip PIC (Episode 837)
- Next by Date: Re: Build your own Forth for microchip PIC (Episode 839)
- Previous by thread: Re: Gforth and gcc "progress"
- Next by thread: Re: Gforth and gcc "progress"
- Index(es):
Relevant Pages
|