Re: Gforth and gcc "progress"



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
.



Relevant Pages

  • Re: Anyone interested in building a vms-like OS?
    ... then you have a good reason for preferring the BSD license over GPL. ... geeks :-) is that it is fast, 5-10 times faster than gcc, while still ... Compiling 10 times faster with almost no optimization does not ... It is compiling much faster but doing less optimizations. ...
    (comp.os.vms)
  • Conexant HCF Modem Problems
    ... Conexant HCF modem, which is a "controllerless" modem, not a HSF which ... files to compile and to install but the problem is when I try to config ... compiling (gcc) mod_osspec.c ...
    (comp.os.linux.hardware)
  • [ANN] macstl 0.1.5 -- Xcode compatibility
    ... The new version also has fixes for older gcc ... Now builds with Xcode 1.0. ... Fixed altivec functions not compiling in gcc 3.1: ...
    (comp.lang.cpp)
  • Re: Finally one site with all the C fundas
    ... was pretty lenient and we did not actively pursue compiling the tool ... the CPU/memory architecture doesn't allow unaligned accesses. ... Also gcc 3.3.6 would have spotted that if invoked with the '-W' ... Casting the return value of mallocis never necessary ...
    (comp.lang.c)
  • Re: A bug in gnat/gcc 3.3.3?
    ... > Compiling ASIS and GLADE for a newer version isn't that difficult - ... harping on GCC 3.4, but I'd like reports about ASIS and GLADE for GCC ... GCC 3.4 does not "have" PolyORB, ...
    (comp.lang.ada)