comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian3@shapes.demon.co.uk>
Subject: Re: Cross-toolchain for DS [was: Newcomers to comp.lang.ada: welcome and how did you end up here ?]
Date: Thu, 16 Oct 2014 12:04:43 GMT
Date: 2014-10-16T12:04:43+00:00	[thread overview]
Message-ID: <vvO%v.397126$le3.155208@fx06.fr7> (raw)
In-Reply-To: slrnm3sj9t.nrc.lithiumcat@nat.rebma.instinctive.eu

On Wed, 15 Oct 2014 10:32:32 +0000, Natasha Kerensikova wrote:

> Hello,
> 
> On 2014-10-15, Brian Drummond <brian3@shapes.demon.co.uk> wrote:
>> On Sun, 12 Oct 2014 10:56:07 +0000, Natasha Kerensikova wrote:
>>> The reason why I'm asking, is I'm stilling working on updating gela
>>> and building on it a RTS-limited LLVM-based Ada 95 compiler seems
>>> realistic (albeit far away down the road).
>>
>> How is that coming along?
> 
> I don't have much time to put into it, so it is indeed coming along but
> very slowly.
> 
> From what I gathered, Gela doesn't even fully cover Ada 95, so my first
> intermediate goal is turning into a fully-featured Ada 95 ASIS provider
> (which is what I meant with "updating" in the quote above).

I thought it was pretty close. But completing Ada-95 coverage would be a 
necessary prerequisite (if only from learning how) to extending it to 
Ada-2005 coverage, so ... has very good longer term potential.

> To reach that intermediate goal, I'm using AdaControl as an ASIS test
> suite, so the very first step is plugging Gela into AdaControl. That
> plugging is what I'm currently dealing with, and it feels almost
> complete.

Now that could be an excellent project! As ASIS is only a specification, 
and implementations differ, how the differences affect a sizeable 
application *using* Asis, seems like fairly unexplored territory. 
I look forward to seeing it when it's ready, and learning from it. And if 
it "feels almost complete" that's encouraging, that the variations 
between at least two ASIS implementations are manageable.

>> For me, Gela built successfully, and I started to look at connecting it
>> to an intermediate representation which already has translators to gcc
>> and experimentally, LLVM (and more, specifically a JIT targetting x86,
>> which would make a very lightweight compiler).

This is part of GHDL, of course, and I expect to plunge back into GHDL 
which is overdue for another release. But along the way I want to look 
into the possibility of repurposing its IR language as a back end for 
Gela...

> Basically building a compiler is an awefully large task, and it would
> still feel daunting to me even if everybody here gathered to magically
> work on it without any communication/coordination overhead.

I don't pretend to have answers to that!

> For example, I recently realized that Standard package cannot be written
> in Ada (think of the declaration of Wide_Character type), it probably
> has to involve some compiler magic, but I don't know yet how compatible
> with Gela architecture such a magic is.

GHDL has possibly similar problems with its Standard package, and there 
is indeed some compiler magic involved. I can't remember the details 
offhand but I believe it involves the translation phase onwards mimicking 
the process of compilation so Gela may never encounter actual "standard.ad
[sb]" source, and I believe an Ada compiler could do likewise.

Please say a little more about the problems you see with Wide_Character, 
it's not obvious to me what they are.

> And once basic code generation is operation, only then would I starting
> looking at RTS issues, because once again, and RTS-less Ada compiler has
> some use, while RTS fragments without a good compiler is useless. I just
> wonder whether a significant part of the RTS can be targeting LLVM
> itself, and thereby be automatically portable across all backend
> targets. That would be a very nice perk for the project.

RTS is fairly separable from the compiler, and somewhat divisible into 
general and target-specific parts. When I moved the AVR-Ada minimal RTS 
(no tasking, basic exceptions) to MSP430 I found most of it transferred 
wholesale; possibly 40% of the files needed some change. I didn't attempt 
to divide it into target-dependent and target-independent parts. Yet...

One disappointment in Gnat is they don't separate the RTS sources from 
the compiler. That would make the process of plugging in a different RTS 
easier to understand. I learned a lot from the AVR-Ada project, and 
Luke's Tamp is another good starting point, but there will be more to 
learn as the RTS effort rolls on to encompass tasking.

So there may be no need to specifically target LLVM with the RTS (but 
when we get to tasking, priorities, scheduling there may be advantages in 
doing so.)

But there seem to be a bunch of people looking at RTS for ARM, possibly 
aiming at Ravenscar tasking, so that may happen independently of compiler 
work.

> However please note that this is only a personal strategic choice, I
> won't blame or criticize anybody starting to look at code generation
> now, I'm just explaining the rationale behind my not looking at it yet.

Agreed - but it's good to discuss and at least not duplicate effort! Not 
that it would be a problem if we did duplicate - at this stage anything I 
do on code generation will be throwaway junk, just to teach myself about 
the process. 

- Brian

  reply	other threads:[~2014-10-16 12:04 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 22:42 Newcomers to comp.lang.ada: welcome and how did you end up here ? Simon Clubley
2014-10-06 23:18 ` brbarkstrom
2014-10-07  8:10 ` Gour
2014-10-07 10:49   ` Luke A. Guest
2014-10-08  7:23     ` Gour
2014-10-08  8:35       ` Brian Drummond
2014-10-08  9:15         ` Simon Wright
2014-10-08 19:14           ` -fdump-ada-spec (was: Newcomers to comp.lang.ada: welcome and how did you end up here ?) Ludovic Brenta
2014-10-08 19:48             ` -fdump-ada-spec Simon Wright
2014-10-08  9:17         ` Newcomers to comp.lang.ada: welcome and how did you end up here ? Gour
2014-10-08 11:23       ` Dmitry A. Kazakov
2014-10-10  9:18         ` Gour
2014-10-08 13:33       ` Luke A. Guest
2014-10-07 20:06 ` Stribor40
2014-10-07 20:21   ` Jeffrey Carter
2014-10-07 21:28     ` David Botton
2014-10-09  5:57       ` Dirk Craeynest
2014-10-10  0:58     ` rriehle
2014-10-08  7:08   ` Dmitry A. Kazakov
2014-10-09 11:58 ` Mark Carroll
2014-10-09 13:31   ` Simon Wright
2014-10-09 18:04     ` Brian Drummond
2014-10-09 20:02       ` Dmitry A. Kazakov
2014-10-09 18:35     ` Mark Carroll
2014-10-09 21:08       ` Simon Clubley
2014-10-10  7:28         ` Natasha Kerensikova
2014-10-10  9:07           ` Mark Carroll
2014-10-10  9:33             ` Björn Lundin
2014-10-10 11:41               ` Natasha Kerensikova
2014-10-10 13:35                 ` Björn Lundin
2014-10-10 17:10                   ` Natasha Kerensikova
2014-10-10 18:22                     ` Luke A. Guest
2014-10-10 14:51                 ` Lucretia
2014-10-10 14:28           ` Lucretia
2014-10-10 19:47           ` Simon Clubley
2014-10-10 21:38             ` Luke A. Guest
2014-10-12 10:56               ` Cross-toolchain for DS [was: Newcomers to comp.lang.ada: welcome and how did you end up here ?] Natasha Kerensikova
2014-10-12 11:40                 ` Simon Clubley
2014-10-12 12:27                   ` Peter Chapin
2014-10-12 19:42                     ` Simon Clubley
2014-10-12 13:25                 ` Luke A. Guest
2014-10-12 13:52                   ` Natasha Kerensikova
2014-10-12 14:40                     ` Luke A. Guest
2014-10-12 20:09                     ` Natasha Kerensikova
2014-10-19 14:34                       ` Natasha Kerensikova
2014-10-19 15:48                         ` Luke A. Guest
2014-10-23  8:22                           ` Natasha Kerensikova
2014-10-12 23:18                     ` Lucretia
2014-10-15  9:46                       ` Brian Drummond
2014-10-15 16:50                         ` Lucretia
2014-10-15  9:58                 ` Brian Drummond
2014-10-15 10:32                   ` Natasha Kerensikova
2014-10-16 12:04                     ` Brian Drummond [this message]
2014-10-11 10:53             ` Newcomers to comp.lang.ada: welcome and how did you end up here ? Brian Drummond
2014-10-12  1:33         ` David Botton
2014-10-12  1:25       ` David Botton
2014-10-12 14:40         ` Luke A. Guest
2014-10-09 19:06   ` Shark8
2014-11-04 16:28   ` Nicholas Collin Paul de Gloucester
2014-11-04 16:45     ` Barry Danforth
2014-11-04 17:18       ` David Botton
2014-10-09 12:50 ` john
2014-10-09 21:08 ` gdotone
2014-10-10 16:25 ` Stribor40
2014-10-10 17:09   ` Luke A. Guest
2014-10-10 17:59     ` Stribor40
2014-10-10 18:22       ` Luke A. Guest
2014-11-08 23:51 ` HerrDoktor
2014-11-09  7:44   ` Karl Stromberg
2014-11-09  9:28     ` HerrDoktor
2014-11-09  9:42     ` HerrDoktor
2014-11-09  9:59       ` Karl Stromberg
2014-11-09 10:25         ` HerrDoktor
2014-11-09 16:31           ` David Botton
2014-11-09 16:29         ` David Botton
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox