From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8c8bbb1419c8e81a X-Google-Attributes: gid103376,public From: Corey Minyard Subject: Re: Waiver question Date: 1997/04/28 Message-ID: #1/1 X-Deja-AN: 238021751 Sender: minyard@wf-rch References: <33585385.C8D@lmtas.lmco.com> <1997Apr28.151327.1@eisner> Organization: Wonderforce Research Newsgroups: comp.lang.ada Date: 1997-04-28T00:00:00+00:00 List-Id: kilgallen@eisner.decus.org (Larry Kilgallen) writes: > > In article , Corey Minyard 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