public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Ada and x86_64
@ 2002-08-27 14:18 Robert Dewar
  0 siblings, 0 replies; 37+ messages in thread
From: Robert Dewar @ 2002-08-27 14:18 UTC (permalink / raw)
  To: jh, kenner; +Cc: gcc

> Yes, that brings other question,
> is there way to check basic gnatlib functionality easilly?

The ACVC tests would be just fine for this purpose. Hopefully Laurent wlil be
able to complete the integration of these tests into the FSF environment soon.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-29  3:13 Robert Dewar
  0 siblings, 0 replies; 37+ messages in thread
From: Robert Dewar @ 2002-08-29  3:13 UTC (permalink / raw)
  To: dewar, jh, kenner; +Cc: gcc

>>I believe that Sam Tardieu did this port, or at least knows of it.

Sorry, I forgot to supply context

this port = port for Linux Alpha 64 bit

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-29  3:03 Robert Dewar
  0 siblings, 0 replies; 37+ messages in thread
From: Robert Dewar @ 2002-08-29  3:03 UTC (permalink / raw)
  To: jh, kenner; +Cc: gcc

I believe that Sam Tardieu did this port, or at least knows of it.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-28 16:07 Richard Kenner
  0 siblings, 0 replies; 37+ messages in thread
From: Richard Kenner @ 2002-08-28 16:07 UTC (permalink / raw)
  To: jh; +Cc: gcc

    > We have not ported GNAT to 64bit Alpha Linux, though I believe someone
    > else has done this port.

    Would be possible to see the code

The first step is to locate whoever did that port ...

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-27 14:17 Robert Dewar
@ 2002-08-28  9:45 ` Jan Hubicka
  0 siblings, 0 replies; 37+ messages in thread
From: Jan Hubicka @ 2002-08-28  9:45 UTC (permalink / raw)
  To: Robert Dewar; +Cc: jh, aj, gcc, kenner

> We have not ported GNAT to 64bit Alpha Linux, though I believe someone else
> has done this port.
Would be possible to see the code?

Honza
> 
> Honza said:
> 
> > Is that dificult even in the case that Linux port exists?  I would expect there
> > to already be working 64bit Alpha Linux vesion (or not?) so the stuff can just
> > be merged together, I hope.
> 
> That would certainly be a reasonable first step, and the machines are both
> little endian, which helps.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-28  4:49 Robert Dewar
@ 2002-08-28  4:50 ` Andreas Jaeger
  0 siblings, 0 replies; 37+ messages in thread
From: Andreas Jaeger @ 2002-08-28  4:50 UTC (permalink / raw)
  To: Robert Dewar; +Cc: dje, gcc, jh

dewar@gnat.com (Robert Dewar) writes:

>> > David Edelsohn <dje@watson.ibm.com> writes:
>> >
>> >> While knowing nothing about Ada,
>> >>
>> >>      private
>> >>         type sigset_t is array (0 .. 31) of unsigned_long;
>> >>         pragma Convention (C, sigset_t);
>> >>         for sigset_t'Size use 1024;
>> >
>> > unsigned_long is is 64 bit on x86-64, I think , so the minimum size
>> > for the array is indeed 2048 bits.  You could change unsigned_long to
>> > unsigned_int; this should in 1024 bits on x86-64, too.  However, I'm
>> > not sure if sigset_t really has this size on x86-64.
>> 
>> The solution we come up with is to use array (0..15) to get 1024
>> bytes,
>
>
> This is only the correct solution if that matches the definition of sigset_t
> in C. There is nothing sacred out the size in the size clause. it must be
> modified to meet the requirement of matching the C definition.

it does indeed match the spec this way,

thanks,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-28  4:49 Robert Dewar
  2002-08-28  4:50 ` Andreas Jaeger
  0 siblings, 1 reply; 37+ messages in thread
From: Robert Dewar @ 2002-08-28  4:49 UTC (permalink / raw)
  To: aj, dje; +Cc: dewar, gcc, jh

> > David Edelsohn <dje@watson.ibm.com> writes:
> >
> >> While knowing nothing about Ada,
> >>
> >>      private
> >>         type sigset_t is array (0 .. 31) of unsigned_long;
> >>         pragma Convention (C, sigset_t);
> >>         for sigset_t'Size use 1024;
> >
> > unsigned_long is is 64 bit on x86-64, I think , so the minimum size
> > for the array is indeed 2048 bits.  You could change unsigned_long to
> > unsigned_int; this should in 1024 bits on x86-64, too.  However, I'm
> > not sure if sigset_t really has this size on x86-64.
> 
> The solution we come up with is to use array (0..15) to get 1024
> bytes,


This is only the correct solution if that matches the definition of sigset_t
in C. There is nothing sacred out the size in the size clause. it must be
modified to meet the requirement of matching the C definition.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-28  4:47 Robert Dewar
  0 siblings, 0 replies; 37+ messages in thread
From: Robert Dewar @ 2002-08-28  4:47 UTC (permalink / raw)
  To: dje, fw; +Cc: aj, dewar, gcc, jh

> > While knowing nothing about Ada,
> >
> >       private
> >          type sigset_t is array (0 .. 31) of unsigned_long;
> >          pragma Convention (C, sigset_t);
> >          for sigset_t'Size use 1024;
> 
> unsigned_long is is 64 bit on x86-64, I think , so the minimum size
> for the array is indeed 2048 bits.  You could change unsigned_long to
> unsigned_int; this should in 1024 bits on x86-64, too.  However, I'm
> not sure if sigset_t really has this size on x86-64.


The whole point of these declarations is to match the C definition for 
sigset_t, and these declarations must be tailored to meet this requirement.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 17:35           ` David Brown
@ 2002-08-28  0:57             ` Florian Weimer
  0 siblings, 0 replies; 37+ messages in thread
From: Florian Weimer @ 2002-08-28  0:57 UTC (permalink / raw)
  To: David Brown; +Cc: David Edelsohn, Jan Hubicka, aj, dewar, gcc

David Brown <gcc@davidb.org> writes:

> Hmm.  I don't know of the history of this construct, but perhaps
>
>         pragma Pack (sigset_t);
>
> would give the intent better.

No, I don't think so, the intent is to create an array of 1024 bits to
match the GNU libc definition.

> If, what was really intended was that the structure should at least be
> 1024 bytes long, this would work:
>
>         for sigset_t'Size use Natural'Max (1024, unsigned_long'Size * 32);

Bits, not bytes.  ;-) And the length should probably be *exactly* 1024
bits, no more, no less.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-28  0:52           ` Florian Weimer
@ 2002-08-28  0:56             ` Andreas Jaeger
  0 siblings, 0 replies; 37+ messages in thread
From: Andreas Jaeger @ 2002-08-28  0:56 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Jan Hubicka, dewar, gcc

Florian Weimer <fw@deneb.enyo.de> writes:

> David Edelsohn <dje@watson.ibm.com> writes:
>
>> While knowing nothing about Ada,
>>
>> 	private
>> 	   type sigset_t is array (0 .. 31) of unsigned_long;
>> 	   pragma Convention (C, sigset_t);
>> 	   for sigset_t'Size use 1024;
>
> unsigned_long is is 64 bit on x86-64, I think , so the minimum size
> for the array is indeed 2048 bits.  You could change unsigned_long to
> unsigned_int; this should in 1024 bits on x86-64, too.  However, I'm
> not sure if sigset_t really has this size on x86-64.

The solution we come up with is to use array (0..15) to get 1024
bytes,

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 12:18         ` David Edelsohn
  2002-08-26 12:20           ` Jan Hubicka
  2002-08-26 17:35           ` David Brown
@ 2002-08-28  0:52           ` Florian Weimer
  2002-08-28  0:56             ` Andreas Jaeger
  2 siblings, 1 reply; 37+ messages in thread
From: Florian Weimer @ 2002-08-28  0:52 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Jan Hubicka, aj, dewar, gcc

David Edelsohn <dje@watson.ibm.com> writes:

> While knowing nothing about Ada,
>
> 	private
> 	   type sigset_t is array (0 .. 31) of unsigned_long;
> 	   pragma Convention (C, sigset_t);
> 	   for sigset_t'Size use 1024;

unsigned_long is is 64 bit on x86-64, I think , so the minimum size
for the array is indeed 2048 bits.  You could change unsigned_long to
unsigned_int; this should in 1024 bits on x86-64, too.  However, I'm
not sure if sigset_t really has this size on x86-64.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-27 14:19 Robert Dewar
  0 siblings, 0 replies; 37+ messages in thread
From: Robert Dewar @ 2002-08-27 14:19 UTC (permalink / raw)
  To: aj, dewar; +Cc: gcc, jh, kenner

> Just saying: Look at all files is not documentation.  Please make at
> least some pointer to which files should be looked at and what caveats
> are there.

No one is saying look at all the files, you just need to look at the system
dependent files. The makefile makes it clear what set of files are involved.
Yes, more external documentation on porting would certainly be useful.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-27 14:17 Robert Dewar
  2002-08-28  9:45 ` Jan Hubicka
  0 siblings, 1 reply; 37+ messages in thread
From: Robert Dewar @ 2002-08-27 14:17 UTC (permalink / raw)
  To: dewar, jh; +Cc: aj, gcc, kenner

We have not ported GNAT to 64bit Alpha Linux, though I believe someone else
has done this port.

Honza said:

> Is that dificult even in the case that Linux port exists?  I would expect there
> to already be working 64bit Alpha Linux vesion (or not?) so the stuff can just
> be merged together, I hope.

That would certainly be a reasonable first step, and the machines are both
little endian, which helps.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-27  5:57 Richard Kenner
  0 siblings, 0 replies; 37+ messages in thread
From: Richard Kenner @ 2002-08-27  5:57 UTC (permalink / raw)
  To: aj; +Cc: gcc

    Just saying: Look at all files is not documentation.  Please make at
    least some pointer to which files should be looked at and what caveats
    are there.

I listed the files.  As Robert said, those specs contain the specification
for that those subprograms need to do, so you need to implement them.  
Obviously, you'll want to use similar versions of these files as guides.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-27  4:58 Robert Dewar
  2002-08-27  5:42 ` Jan Hubicka
@ 2002-08-27  5:55 ` Andreas Jaeger
  1 sibling, 0 replies; 37+ messages in thread
From: Andreas Jaeger @ 2002-08-27  5:55 UTC (permalink / raw)
  To: Robert Dewar; +Cc: jh, kenner, gcc

dewar@gnat.com (Robert Dewar) writes:

> The documentation you need for porting the system dependent files is found
> in the specs of the files involved, but it is important to be aware that
> creating a new runtime for a new port is a non-trivial task that certainly
> requires a good knowledge of Ada and a good familiarity with the structure
> of the GNAT runtime (it's all documented, but there is a lot of it). There

Where exactly is this documented in the documentation?

> is no quick "port GNAT in half an hour" procedure, it just does not exist.

Just saying: Look at all files is not documentation.  Please make at
least some pointer to which files should be looked at and what caveats
are there.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-27  5:49 Richard Kenner
  0 siblings, 0 replies; 37+ messages in thread
From: Richard Kenner @ 2002-08-27  5:49 UTC (permalink / raw)
  To: jh; +Cc: gcc

    Is that dificult even in the case that Linux port exists?  I would
    expect there to already be working 64bit Alpha Linux vesion (or not?)
    so the stuff can just be merged together, I hope.

As I said, you can do this and will probably get it to compile.  It might
or might not work exactly correctly since things usually don't go *quite*
that smoothly.  But it's certainly a good "first cut".

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-27  4:24 Richard Kenner
@ 2002-08-27  5:43 ` Jan Hubicka
  0 siblings, 0 replies; 37+ messages in thread
From: Jan Hubicka @ 2002-08-27  5:43 UTC (permalink / raw)
  To: Richard Kenner; +Cc: jh, gcc

On Tue, Aug 27, 2002 at 07:24:39AM -0400, Richard Kenner wrote:
>     OK, there is quite number of them and I am not really familiar with Ada.
>     Is there, by any chance, GNAT porting documenation?
>     (or some nice nice document to learn Ada in one hour?)
> 
> The issue isn't "learning Ada" as much as it is knowing what parameters need
> to be changed for the run-time.  I can't help you much there, since I don't
> know it either.
> 
> What I'd suggest is looking at the files for Alpha and those for x86 and seeing
> if you can tell which are OS-dependent and which are wordsize-dependent and
> patch something together that's a mixture of both.  It shouldn't be hard to
> get something that will *compile*, but getting something that will actually
> properly supporting tasking might indeed be harder.
Yes, that brings other question,
is there way to check basic gnatlib functionality easilly?

Honza

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-27  4:58 Robert Dewar
@ 2002-08-27  5:42 ` Jan Hubicka
  2002-08-27  5:55 ` Andreas Jaeger
  1 sibling, 0 replies; 37+ messages in thread
From: Jan Hubicka @ 2002-08-27  5:42 UTC (permalink / raw)
  To: Robert Dewar; +Cc: jh, kenner, aj, gcc

On Tue, Aug 27, 2002 at 07:58:45AM -0400, Robert Dewar wrote:
> The documentation you need for porting the system dependent files is found
> in the specs of the files involved, but it is important to be aware that
> creating a new runtime for a new port is a non-trivial task that certainly
> requires a good knowledge of Ada and a good familiarity with the structure
> of the GNAT runtime (it's all documented, but there is a lot of it). There
> is no quick "port GNAT in half an hour" procedure, it just does not exist.

Is that dificult even in the case that Linux port exists?  I would expect there
to already be working 64bit Alpha Linux vesion (or not?) so the stuff can just
be merged together, I hope.

Honza

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-27  1:17 ` Andreas Jaeger
@ 2002-08-27  5:12   ` Joseph S. Myers
  0 siblings, 0 replies; 37+ messages in thread
From: Joseph S. Myers @ 2002-08-27  5:12 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: Richard Kenner, jh, gcc

On Tue, 27 Aug 2002, Andreas Jaeger wrote:

> > It's definitely a new port and you need to add new library files for it.
> 
> Which files exactly need to be added or checked?

And could some note about this, with a reference to any relevant GNAT
documentation, be added to the checklist in sourcebuild.texi (Anatomy of a
Target Back End) of what's included in a GCC port?  (Alongside the
relevant FIXME for details of support needed in runtime libraries - that's
still the right place though the Ada library isn't yet outside the gcc
directory.)

-- 
Joseph S. Myers
jsm28@cam.ac.uk

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-27  4:58 Robert Dewar
  2002-08-27  5:42 ` Jan Hubicka
  2002-08-27  5:55 ` Andreas Jaeger
  0 siblings, 2 replies; 37+ messages in thread
From: Robert Dewar @ 2002-08-27  4:58 UTC (permalink / raw)
  To: jh, kenner; +Cc: aj, gcc

The documentation you need for porting the system dependent files is found
in the specs of the files involved, but it is important to be aware that
creating a new runtime for a new port is a non-trivial task that certainly
requires a good knowledge of Ada and a good familiarity with the structure
of the GNAT runtime (it's all documented, but there is a lot of it). There
is no quick "port GNAT in half an hour" procedure, it just does not exist.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-27  4:24 Richard Kenner
  2002-08-27  5:43 ` Jan Hubicka
  0 siblings, 1 reply; 37+ messages in thread
From: Richard Kenner @ 2002-08-27  4:24 UTC (permalink / raw)
  To: jh; +Cc: gcc

    OK, there is quite number of them and I am not really familiar with Ada.
    Is there, by any chance, GNAT porting documenation?
    (or some nice nice document to learn Ada in one hour?)

The issue isn't "learning Ada" as much as it is knowing what parameters need
to be changed for the run-time.  I can't help you much there, since I don't
know it either.

What I'd suggest is looking at the files for Alpha and those for x86 and seeing
if you can tell which are OS-dependent and which are wordsize-dependent and
patch something together that's a mixture of both.  It shouldn't be hard to
get something that will *compile*, but getting something that will actually
properly supporting tasking might indeed be harder.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-27  4:08 Richard Kenner
@ 2002-08-27  4:13 ` Jan Hubicka
  0 siblings, 0 replies; 37+ messages in thread
From: Jan Hubicka @ 2002-08-27  4:13 UTC (permalink / raw)
  To: Richard Kenner; +Cc: aj, gcc

On Tue, Aug 27, 2002 at 07:08:03AM -0400, Richard Kenner wrote:
>     Which files exactly need to be added or checked?
> 
> All the system-dependent files.  Take a look at the Makefile to see which
> are replaced by different files on different targets.
OK, there is quite number of them and I am not really familiar with Ada.
Is there, by any chance, GNAT porting documenation?
(or some nice nice document to learn Ada in one hour?)

Honza

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-27  4:08 Richard Kenner
  2002-08-27  4:13 ` Jan Hubicka
  0 siblings, 1 reply; 37+ messages in thread
From: Richard Kenner @ 2002-08-27  4:08 UTC (permalink / raw)
  To: aj; +Cc: gcc

    Which files exactly need to be added or checked?

All the system-dependent files.  Take a look at the Makefile to see which
are replaced by different files on different targets.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 13:49 Richard Kenner
@ 2002-08-27  3:09 ` Jan Hubicka
  0 siblings, 0 replies; 37+ messages in thread
From: Jan Hubicka @ 2002-08-27  3:09 UTC (permalink / raw)
  To: Richard Kenner; +Cc: jh, gcc

On Mon, Aug 26, 2002 at 04:41:39PM -0400, Richard Kenner wrote:
>     Does this mean that Ada is basically broken on any 64bit architecture
>     not having TImode arithmetics?
> 
> It means TImode arithmetic is required.  But why isn't it present on such
> archictures?
It is.  THere was just problem with libgcc2 not producing the libcalls.
I've sent patch for this in separate mail.

Honza

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 20:50 Robert Dewar
@ 2002-08-27  2:46 ` Jan Hubicka
  0 siblings, 0 replies; 37+ messages in thread
From: Jan Hubicka @ 2002-08-27  2:46 UTC (permalink / raw)
  To: Robert Dewar; +Cc: dje, jh, aj, gcc

On Mon, Aug 26, 2002 at 11:50:29PM -0400, Robert Dewar wrote:
> The file ??osinte.ads must generally be tailored for each architecture, so you
> need to write a version of this suitable for the x86_64.
Any pointers to other files that needs to be rewriten?

Honza

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 13:58 Richard Kenner
@ 2002-08-27  1:17 ` Andreas Jaeger
  2002-08-27  5:12   ` Joseph S. Myers
  0 siblings, 1 reply; 37+ messages in thread
From: Andreas Jaeger @ 2002-08-27  1:17 UTC (permalink / raw)
  To: Richard Kenner; +Cc: jh, gcc

kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

>     I guess ada has no preprocessor, but perhaps there is a way.  Ada
>     experts, please?  Also what else needs to be changed?
>
> It's a 64-bit machine, so the library files need to be a mix of those for
> 64-bit machines (such as Alpha) and those for the x86 architecture.
>
> It's definitely a new port and you need to add new library files for it.

Which files exactly need to be added or checked?

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-26 20:50 Robert Dewar
  2002-08-27  2:46 ` Jan Hubicka
  0 siblings, 1 reply; 37+ messages in thread
From: Robert Dewar @ 2002-08-26 20:50 UTC (permalink / raw)
  To: dje, jh; +Cc: aj, dewar, gcc

The file ??osinte.ads must generally be tailored for each architecture, so you
need to write a version of this suitable for the x86_64.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 12:18         ` David Edelsohn
  2002-08-26 12:20           ` Jan Hubicka
@ 2002-08-26 17:35           ` David Brown
  2002-08-28  0:57             ` Florian Weimer
  2002-08-28  0:52           ` Florian Weimer
  2 siblings, 1 reply; 37+ messages in thread
From: David Brown @ 2002-08-26 17:35 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Jan Hubicka, aj, dewar, gcc

On Mon, Aug 26, 2002 at 03:18:36PM -0400, David Edelsohn wrote:

> While knowing nothing about Ada,
> 
> 	private
> 	   type sigset_t is array (0 .. 31) of unsigned_long;
> 	   pragma Convention (C, sigset_t);
> 	   for sigset_t'Size use 1024;
> 
> implies that it is setting the size of sigset_t to 1024.  I don't know
> whether this can be changed in the file based on __x86_64__ flag or
> whether one needs a separate file for x64-64 configuration.

Hmm.  I don't know of the history of this construct, but perhaps

        pragma Pack (sigset_t);

would give the intent better.

I'm not sure why the constant would depend on the size of unsigned_long,
but if you want to do if with the for .. Size expression:

        for sigset_t'Size use 32 * unsigned_long'Size;

but that would really ever be different than the pragma Pack.

If, what was really intended was that the structure should at least be
1024 bytes long, this would work:

        for sigset_t'Size use Natural'Max (1024, unsigned_long'Size * 32);

Dave Brown

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-26 13:58 Richard Kenner
  2002-08-27  1:17 ` Andreas Jaeger
  0 siblings, 1 reply; 37+ messages in thread
From: Richard Kenner @ 2002-08-26 13:58 UTC (permalink / raw)
  To: jh; +Cc: gcc

    I guess ada has no preprocessor, but perhaps there is a way.  Ada
    experts, please?  Also what else needs to be changed?

It's a 64-bit machine, so the library files need to be a mix of those for
64-bit machines (such as Alpha) and those for the x86 architecture.

It's definitely a new port and you need to add new library files for it.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
@ 2002-08-26 13:49 Richard Kenner
  2002-08-27  3:09 ` Jan Hubicka
  0 siblings, 1 reply; 37+ messages in thread
From: Richard Kenner @ 2002-08-26 13:49 UTC (permalink / raw)
  To: jh; +Cc: gcc

    Does this mean that Ada is basically broken on any 64bit architecture
    not having TImode arithmetics?

It means TImode arithmetic is required.  But why isn't it present on such
archictures?

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 12:18         ` David Edelsohn
@ 2002-08-26 12:20           ` Jan Hubicka
  2002-08-26 17:35           ` David Brown
  2002-08-28  0:52           ` Florian Weimer
  2 siblings, 0 replies; 37+ messages in thread
From: Jan Hubicka @ 2002-08-26 12:20 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Jan Hubicka, aj, dewar, gcc

On Mon, Aug 26, 2002 at 03:18:36PM -0400, David Edelsohn wrote:
> >>>>> Jan Hubicka writes:
> 
> Jan> I've addressed the compilation crashes (and sent patches to gcc-patches for
> Jan> those interested), but I am still not able to build library (because of the
> Jan> sigset_t is too small).  I guess I am having wrong os dependnent stuff.  Is
> Jan> there some documentation about what needs to be done and where for those wo
> Jan> don't really understand Ada very well?
> 
> 	From which file did the Makefile create s-osinte.ads?
> 5iosinte.ads?

Yes.  I am using just copy of x86 configuration as I hoped that it will work as
it is.

> 
> While knowing nothing about Ada,
> 
> 	private
> 	   type sigset_t is array (0 .. 31) of unsigned_long;
> 	   pragma Convention (C, sigset_t);
> 	   for sigset_t'Size use 1024;

Yes, I already noticed it.
> 
> implies that it is setting the size of sigset_t to 1024.  I don't know
> whether this can be changed in the file based on __x86_64__ flag or
> whether one needs a separate file for x64-64 configuration.

I guess ada has no preprocessor, but perhaps there is a way.  Ada experts, please?
Also what else needs to be changed?

Honza
> 
> 	On the other hand, this is just a wild guess on my part based on
> grep and Makefile.in.
> 
> David

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 11:56       ` Jan Hubicka
@ 2002-08-26 12:18         ` David Edelsohn
  2002-08-26 12:20           ` Jan Hubicka
                             ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: David Edelsohn @ 2002-08-26 12:18 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: aj, dewar, gcc

>>>>> Jan Hubicka writes:

Jan> I've addressed the compilation crashes (and sent patches to gcc-patches for
Jan> those interested), but I am still not able to build library (because of the
Jan> sigset_t is too small).  I guess I am having wrong os dependnent stuff.  Is
Jan> there some documentation about what needs to be done and where for those wo
Jan> don't really understand Ada very well?

	From which file did the Makefile create s-osinte.ads?
5iosinte.ads?

While knowing nothing about Ada,

	private
	   type sigset_t is array (0 .. 31) of unsigned_long;
	   pragma Convention (C, sigset_t);
	   for sigset_t'Size use 1024;

implies that it is setting the size of sigset_t to 1024.  I don't know
whether this can be changed in the file based on __x86_64__ flag or
whether one needs a separate file for x64-64 configuration.

	On the other hand, this is just a wild guess on my part based on
grep and Makefile.in.

David

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 10:53     ` Jan Hubicka
@ 2002-08-26 11:56       ` Jan Hubicka
  2002-08-26 12:18         ` David Edelsohn
  0 siblings, 1 reply; 37+ messages in thread
From: Jan Hubicka @ 2002-08-26 11:56 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: David Edelsohn, aj, dewar, gcc

On Mon, Aug 26, 2002 at 07:53:19PM +0200, Jan Hubicka wrote:
> On Mon, Aug 26, 2002 at 07:23:21PM +0200, Jan Hubicka wrote:
> > On Mon, Aug 26, 2002 at 01:20:00PM -0400, David Edelsohn wrote:
> > > >>>>> Jan Hubicka writes:
> > > 
> > > Jan> I am trying to get Ada working on x86_64 architecture and I am running into
> > > Jan> interesting problems.
> > > 
> > > Jan> First problem is use mov TImode divide that is not supported so results in
> > > Jan> libcall that is unresolved during building gnatchop.  I've tracked this down
> > > Jan> into bitsizetype being TImode and using TImode arithmetic to compute size of
> > > Jan> the type.
> > > 
> > > 	I thought that the TImode issue was mentioned in a previous
> > > discussion of Jim Wilson and Richard Kenner from a long time ago (2000?)
> > > because of GCC keeping track of bits.  Some issue of TImode support in
> > > libgcc.
> > 
> > Do you remember the thread?  I will try to check it.
> > Does this mean that Ada is basically broken on any 64bit architecture not having TImode arithmetics?
> 
> OK, I found it and I am just working on getting libgcc2 in TImode working on
> hammer.  Thanks for the information.

Hi,
I've addressed the compilation crashes (and sent patches to gcc-patches for
those interested), but I am still not able to build library (because of the
sigset_t is too small).  I guess I am having wrong os dependnent stuff.  Is
there some documentation about what needs to be done and where for those wo
don't really understand Ada very well?

Honza
> 
> Honza
> > 
> > Honza
> > > 
> > > David

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 10:23   ` Jan Hubicka
@ 2002-08-26 10:53     ` Jan Hubicka
  2002-08-26 11:56       ` Jan Hubicka
  0 siblings, 1 reply; 37+ messages in thread
From: Jan Hubicka @ 2002-08-26 10:53 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: David Edelsohn, aj, dewar, gcc

On Mon, Aug 26, 2002 at 07:23:21PM +0200, Jan Hubicka wrote:
> On Mon, Aug 26, 2002 at 01:20:00PM -0400, David Edelsohn wrote:
> > >>>>> Jan Hubicka writes:
> > 
> > Jan> I am trying to get Ada working on x86_64 architecture and I am running into
> > Jan> interesting problems.
> > 
> > Jan> First problem is use mov TImode divide that is not supported so results in
> > Jan> libcall that is unresolved during building gnatchop.  I've tracked this down
> > Jan> into bitsizetype being TImode and using TImode arithmetic to compute size of
> > Jan> the type.
> > 
> > 	I thought that the TImode issue was mentioned in a previous
> > discussion of Jim Wilson and Richard Kenner from a long time ago (2000?)
> > because of GCC keeping track of bits.  Some issue of TImode support in
> > libgcc.
> 
> Do you remember the thread?  I will try to check it.
> Does this mean that Ada is basically broken on any 64bit architecture not having TImode arithmetics?

OK, I found it and I am just working on getting libgcc2 in TImode working on
hammer.  Thanks for the information.

Honza
> 
> Honza
> > 
> > David

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 10:20 ` David Edelsohn
@ 2002-08-26 10:23   ` Jan Hubicka
  2002-08-26 10:53     ` Jan Hubicka
  0 siblings, 1 reply; 37+ messages in thread
From: Jan Hubicka @ 2002-08-26 10:23 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Jan Hubicka, aj, dewar, gcc

On Mon, Aug 26, 2002 at 01:20:00PM -0400, David Edelsohn wrote:
> >>>>> Jan Hubicka writes:
> 
> Jan> I am trying to get Ada working on x86_64 architecture and I am running into
> Jan> interesting problems.
> 
> Jan> First problem is use mov TImode divide that is not supported so results in
> Jan> libcall that is unresolved during building gnatchop.  I've tracked this down
> Jan> into bitsizetype being TImode and using TImode arithmetic to compute size of
> Jan> the type.
> 
> 	I thought that the TImode issue was mentioned in a previous
> discussion of Jim Wilson and Richard Kenner from a long time ago (2000?)
> because of GCC keeping track of bits.  Some issue of TImode support in
> libgcc.

Do you remember the thread?  I will try to check it.
Does this mean that Ada is basically broken on any 64bit architecture not having TImode arithmetics?

Honza
> 
> David

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Ada and x86_64
  2002-08-26 10:14 Jan Hubicka
@ 2002-08-26 10:20 ` David Edelsohn
  2002-08-26 10:23   ` Jan Hubicka
  0 siblings, 1 reply; 37+ messages in thread
From: David Edelsohn @ 2002-08-26 10:20 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: aj, dewar, gcc

>>>>> Jan Hubicka writes:

Jan> I am trying to get Ada working on x86_64 architecture and I am running into
Jan> interesting problems.

Jan> First problem is use mov TImode divide that is not supported so results in
Jan> libcall that is unresolved during building gnatchop.  I've tracked this down
Jan> into bitsizetype being TImode and using TImode arithmetic to compute size of
Jan> the type.

	I thought that the TImode issue was mentioned in a previous
discussion of Jim Wilson and Richard Kenner from a long time ago (2000?)
because of GCC keeping track of bits.  Some issue of TImode support in
libgcc.

David

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Ada and x86_64
@ 2002-08-26 10:14 Jan Hubicka
  2002-08-26 10:20 ` David Edelsohn
  0 siblings, 1 reply; 37+ messages in thread
From: Jan Hubicka @ 2002-08-26 10:14 UTC (permalink / raw)
  To: aj, dewar, gcc

Hi,
I am trying to get Ada working on x86_64 architecture and I am running into
interesting problems.

First problem is use mov TImode divide that is not supported so results in
libcall that is unresolved during building gnatchop.  I've tracked this down
into bitsizetype being TImode and using TImode arithmetic to compute size of
the type.  I can get around by using:
*** stor-layout.c.old   Mon Aug 26 19:03:46 2002
--- stor-layout.c       Mon Aug 26 18:58:19 2002
*************** set_sizetype (type)
*** 1798,1804 ****
       cross-compiling from a 32 bit to a 64 bit host, we are limited to 64 bit
       precision.  */
    int precision = MIN (oprecision + BITS_PER_UNIT_LOG + 1,
!                      2 * HOST_BITS_PER_WIDE_INT);
    unsigned int i;
    tree t;

--- 1798,1804 ----
       cross-compiling from a 32 bit to a 64 bit host, we are limited to 64 bit
       precision.  */
    int precision = MIN (oprecision + BITS_PER_UNIT_LOG + 1,
!                      /*2 * HOST_BITS_PER_WIDE_INT*/64);
    unsigned int i;
    tree t;

But is there any idea for proper fix?  Additionally I've modified Makefiles to
thread x86_64 like x86.  That allows me to compile more of the library and tools,
however library build dies at:
../../xgcc -B../../ -c -g -O2 -g -O2   -W -Wall -gnatpg -I. -I/abuild/jh/gcc2/gcc-3.2/gcc/ada s-inmaop.adb
s-osinte.ads:450:26: size for "sigset_t" too small, minimum allowed is 2048

and tools build at:

../xgcc -B../ -c -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long    -W -Wall -gnatpg -gnata -I- -I. -I../../../gcc/ada ../../../gcc/ada/xr_tabls.adb
+===========================GNAT BUG DETECTED==============================+
| 3.2 20020814 (release) (x86_64-unknown-linux-gnu) GCC error:             |
| Internal compiler error in size_binop, at fold-const.c:2014              |
| Error detected at ../../../gcc/ada/xr_tabls.ads:285:41                   |
| Please submit a bug report, see http://gcc.gnu.org/bugs.html .            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

It is again related to sizetype...

Honza

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2002-08-29  3:13 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-27 14:18 Ada and x86_64 Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2002-08-29  3:13 Robert Dewar
2002-08-29  3:03 Robert Dewar
2002-08-28 16:07 Richard Kenner
2002-08-28  4:49 Robert Dewar
2002-08-28  4:50 ` Andreas Jaeger
2002-08-28  4:47 Robert Dewar
2002-08-27 14:19 Robert Dewar
2002-08-27 14:17 Robert Dewar
2002-08-28  9:45 ` Jan Hubicka
2002-08-27  5:57 Richard Kenner
2002-08-27  5:49 Richard Kenner
2002-08-27  4:58 Robert Dewar
2002-08-27  5:42 ` Jan Hubicka
2002-08-27  5:55 ` Andreas Jaeger
2002-08-27  4:24 Richard Kenner
2002-08-27  5:43 ` Jan Hubicka
2002-08-27  4:08 Richard Kenner
2002-08-27  4:13 ` Jan Hubicka
2002-08-26 20:50 Robert Dewar
2002-08-27  2:46 ` Jan Hubicka
2002-08-26 13:58 Richard Kenner
2002-08-27  1:17 ` Andreas Jaeger
2002-08-27  5:12   ` Joseph S. Myers
2002-08-26 13:49 Richard Kenner
2002-08-27  3:09 ` Jan Hubicka
2002-08-26 10:14 Jan Hubicka
2002-08-26 10:20 ` David Edelsohn
2002-08-26 10:23   ` Jan Hubicka
2002-08-26 10:53     ` Jan Hubicka
2002-08-26 11:56       ` Jan Hubicka
2002-08-26 12:18         ` David Edelsohn
2002-08-26 12:20           ` Jan Hubicka
2002-08-26 17:35           ` David Brown
2002-08-28  0:57             ` Florian Weimer
2002-08-28  0:52           ` Florian Weimer
2002-08-28  0:56             ` Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).