From: Corey Minyard <minyard@acm.org>
Subject: Re: Waiver question
Date: 1997/04/28
Date: 1997-04-28T00:00:00+00:00 [thread overview]
Message-ID: <m2zpui69zn.fsf@acm.org> (raw)
In-Reply-To: 1997Apr28.151327.1@eisner
kilgallen@eisner.decus.org (Larry Kilgallen) writes:
>
> In article <m2k9luibub.fsf@acm.org>, Corey Minyard <minyard@acm.org> writes:
>
> > Actually, there is now a GCC port for the C30/C40 DSP. Theoretically,
> > a C++ port and a GNAT port should be doable. The C++ port should be a
> > matter of libraries. I'm not sure what the effects of the C40's
> > minimum addressable unit being 32-bits would be on GNAT, but if that
>
> The minimum addressable unit on DEC Alpha is 32 bits, except for the very
> latest chip where it was altered for purposes of Intel emulation. GNAT
> reportedly "does" DEC Alpha, and I presume that is without relying on
> OS traps for every unaligned instruction :-).
>
Umm... No.
The minimum addressable unit on the Alpha is a byte (8 bits). The
alignment of 32-bit values (and instructions) on the the Alpha is on
32-bit boundaries, but there is no alignment restriction on bytes.
The issue is if you increment a pointer value physically by 1 how many
bits do you skip over? For instance, the following code (and I hope
the kind readers of the newsgroup excuse me for using C, but it is
more compact for this type of stuff):
int
main()
{
int a[4];
char *c;
a[0] = 0; a[1] = 0; a[2] = 0; a[3] = 0;
c = (char *) a;
c[0] = 0x01;
c[1] = 0x02;
c[2] = 0x03;
c[3] = 0x04;
printf("%x %x %x %x\n", a[0], a[1], a[2], a[3]);
return 0;
}
on the Alpha will print:
1020304 0 0 0
and on the C40 will print:
1 2 3 4
because on the C40 a char and an int are the same size because the
minimum size of any addressable unit is 32-bits.
--
Corey Minyard Internet: minyard@acm.org
Work: minyard@nortel.ca UUCP: minyard@wf-rch.cirr.com
next prev parent reply other threads:[~1997-04-28 0:00 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-18 0:00 Waiver question Ken Garlington
1997-04-19 0:00 ` Tom Moran
1997-04-20 0:00 ` Steve Doiel
1997-04-20 0:00 ` Dean Runzel
1997-04-22 0:00 ` Ken Garlington
1997-04-20 0:00 ` Robert Dewar
1997-04-21 0:00 ` Ken Garlington
1997-04-22 0:00 ` Ken Garlington
1997-04-23 0:00 ` Corey Minyard
1997-04-24 0:00 ` Richard Kenner
1997-04-28 0:00 ` Larry Kilgallen
1997-04-28 0:00 ` Corey Minyard [this message]
1997-04-29 0:00 ` Laurent Guerby
1997-04-30 0:00 ` Corey Minyard
1997-04-29 0:00 ` Robert Dewar
1997-04-29 0:00 ` Kaz Kylheku
1997-04-29 0:00 ` Richard Kenner
1997-04-30 0:00 ` Robert Dewar
1997-05-01 0:00 ` Larry Kilgallen
1997-05-07 0:00 ` Bad .diff files in gnat-3.09 in Linux Benoit Jauvin-Girard
1997-05-09 0:00 ` Albert K. Lee
1997-04-30 0:00 ` Waiver question Robert A Duff
1997-05-01 0:00 ` Kaz Kylheku
1997-05-02 0:00 ` Robert A Duff
1997-05-02 0:00 ` Larry Kilgallen
1997-05-02 0:00 ` Robert A Duff
1997-05-02 0:00 ` Larry Kilgallen
1997-05-03 0:00 ` Robert A Duff
1997-05-03 0:00 ` Larry Kilgallen
1997-05-04 0:00 ` Robert Dewar
1997-05-04 0:00 ` Robert Dewar
1997-05-02 0:00 ` Robert Dewar
1997-05-06 0:00 ` John M. Mills
1997-04-29 0:00 ` Robert Dewar
1997-04-23 0:00 ` Tarjei Jensen
1997-04-21 0:00 ` Robert I. Eachus
1997-04-21 0:00 ` Robert Dewar
1997-04-22 0:00 ` Robert I. Eachus
1997-04-23 0:00 ` Robert Dewar
1997-04-22 0:00 ` Ken Garlington
1997-04-23 0:00 ` Robert S. White
1997-04-24 0:00 ` Robert Dewar
1997-04-24 0:00 ` Steve Vestal
1997-04-25 0:00 ` Ken Garlington
1997-04-25 0:00 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox