* GNAT for a PPC Mac OS X machine @ 2011-04-17 14:02 Bill Findlay 2011-04-17 14:43 ` Simon Wright 0 siblings, 1 reply; 11+ messages in thread From: Bill Findlay @ 2011-04-17 14:02 UTC (permalink / raw) I've an enthusiastic would-be user of my KDF9 emulator who has a G5 Mac. What is the most up-to-date compiler he can use, and where can he get it? (It needs to be a binary - he would not be up to rolling his own, and neither am I 8-). -- Bill Findlay with blueyonder.co.uk; use surname & forename; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-17 14:02 GNAT for a PPC Mac OS X machine Bill Findlay @ 2011-04-17 14:43 ` Simon Wright 2011-04-17 18:47 ` Bill Findlay 2011-04-18 1:50 ` Bill Findlay 0 siblings, 2 replies; 11+ messages in thread From: Simon Wright @ 2011-04-17 14:43 UTC (permalink / raw) Bill Findlay <yaldnif.w@blueyonder.co.uk> writes: > I've an enthusiastic would-be user of my KDF9 emulator who has a G5 Mac. > > What is the most up-to-date compiler he can use, and where can he get it? > > (It needs to be a binary - he would not be up to rolling his own, and > neither am I 8-). There's GNAT GPL 2009 at https://sourceforge.net/projects/gnuada/files/GNAT_GPL%20Mac%20OS%20X/2009-tiger-ppc/ - do you think that would do? The release notes start ======================================================================== This is GNAT GPL 2009, built on Mac OS X Tiger for PowerPC, to install at /usr/local: $ cd /usr/local $ sudo tar xzf gnat-gpl-2009-43-powerpc-apple-darwin8.11.0-bin.tgz It includes gmp-4.3.1 and mpfr-2.4.1. Standard tools as well as ASIS tools can be found in /usr/local/gnat-2009/bin: gnat, gnatbind, gnatcheck, gnatchop, gnatclean, gnatelim, gnatfind, gnathtml.pl, gnatkr, gnatlink, gnatls, gnatmake, gnatmetric, gnatname, gnatpp, gnatprep, gnatstub, gnatsync, gnatxref. ======================================================================== so he'd need to add /usr/local/gnat-2009/bin to the front of his path. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-17 14:43 ` Simon Wright @ 2011-04-17 18:47 ` Bill Findlay 2011-04-18 1:50 ` Bill Findlay 1 sibling, 0 replies; 11+ messages in thread From: Bill Findlay @ 2011-04-17 18:47 UTC (permalink / raw) On 17/04/2011 15:43, in article m2vcydos58.fsf@pushface.org, "Simon Wright" <simon@pushface.org> wrote: > Bill Findlay <yaldnif.w@blueyonder.co.uk> writes: > >> I've an enthusiastic would-be user of my KDF9 emulator who has a G5 Mac. >> >> What is the most up-to-date compiler he can use, and where can he get it? >> >> (It needs to be a binary - he would not be up to rolling his own, and >> neither am I 8-). > > There's GNAT GPL 2009 at > https://sourceforge.net/projects/gnuada/files/GNAT_GPL%20Mac%20OS%20X/2009-tig > er-ppc/ > - do you think that would do? > > The release notes start > ======================================================================== > This is GNAT GPL 2009, built on Mac OS X Tiger for PowerPC, > to install at /usr/local: > > $ cd /usr/local > $ sudo tar xzf gnat-gpl-2009-43-powerpc-apple-darwin8.11.0-bin.tgz > > It includes gmp-4.3.1 and mpfr-2.4.1. > > Standard tools as well as ASIS tools can be found in /usr/local/gnat-2009/bin: > gnat, gnatbind, gnatcheck, gnatchop, gnatclean, gnatelim, gnatfind, > gnathtml.pl, > gnatkr, gnatlink, gnatls, gnatmake, gnatmetric, gnatname, gnatpp, gnatprep, > gnatstub, gnatsync, gnatxref. > ======================================================================== > so he'd need to add /usr/local/gnat-2009/bin to the front of his path. That looks great - thanks, Simon. He had some problems compiling & I guess it is because the PPC compiler at the MacAda site is too old for the language features I use. A 2009 version should be just the thing. -- Bill Findlay with blueyonder.co.uk; use surname & forename; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-17 14:43 ` Simon Wright 2011-04-17 18:47 ` Bill Findlay @ 2011-04-18 1:50 ` Bill Findlay 2011-04-18 9:30 ` Simon Wright 1 sibling, 1 reply; 11+ messages in thread From: Bill Findlay @ 2011-04-18 1:50 UTC (permalink / raw) On 17/04/2011 15:43, in article m2vcydos58.fsf@pushface.org, "Simon Wright" <simon@pushface.org> wrote: > Bill Findlay <yaldnif.w@blueyonder.co.uk> writes: > >> I've an enthusiastic would-be user of my KDF9 emulator who has a G5 Mac. >> >> What is the most up-to-date compiler he can use, and where can he get it? >> >> (It needs to be a binary - he would not be up to rolling his own, and >> neither am I 8-). > > There's GNAT GPL 2009 at > https://sourceforge.net/projects/gnuada/files/GNAT_GPL%20Mac%20OS%20X/2009-tig > er-ppc/ - do you think that would do? He's got that and now we have: > gcc -c -I./ -I../Source -funwind-tables -g -gnatoVa -gnatfl05 -O1 -I- ee9.adb > dyld: Library not loaded: /usr/local/lib/libintl.8.dylib > Referenced from: /usr/local/gnat-2009//bin/gcc > Reason: image not found Any guesses as to what is going on here? -- Bill Findlay with blueyonder.co.uk; use surname & forename; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-18 1:50 ` Bill Findlay @ 2011-04-18 9:30 ` Simon Wright 2011-04-18 14:31 ` Bill Findlay 0 siblings, 1 reply; 11+ messages in thread From: Simon Wright @ 2011-04-18 9:30 UTC (permalink / raw) Bill Findlay <yaldnif.w@blueyonder.co.uk> writes: > On 17/04/2011 15:43, in article m2vcydos58.fsf@pushface.org, "Simon Wright" > <simon@pushface.org> wrote: > >> Bill Findlay <yaldnif.w@blueyonder.co.uk> writes: >> >>> I've an enthusiastic would-be user of my KDF9 emulator who has a G5 Mac. >>> >>> What is the most up-to-date compiler he can use, and where can he get it? >>> >>> (It needs to be a binary - he would not be up to rolling his own, and >>> neither am I 8-). >> >> There's GNAT GPL 2009 at >> https://sourceforge.net/projects/gnuada/files/GNAT_GPL%20Mac%20OS%20X/2009-tig >> er-ppc/ - do you think that would do? > > He's got that and now we have: > >> gcc -c -I./ -I../Source -funwind-tables -g -gnatoVa -gnatfl05 -O1 -I- ee9.adb >> dyld: Library not loaded: /usr/local/lib/libintl.8.dylib >> Referenced from: /usr/local/gnat-2009//bin/gcc >> Reason: image not found > > Any guesses as to what is going on here? Looks as though the contributor didn't include this library in the tarball. Not sure why it's looking at /usr/local/lib, implies it was on his system .. afraid I don't know who the contributor was, anyone else remember? ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-18 9:30 ` Simon Wright @ 2011-04-18 14:31 ` Bill Findlay 2011-04-18 15:28 ` Niklas Holsti 2011-04-18 15:52 ` Georg Bauhaus 0 siblings, 2 replies; 11+ messages in thread From: Bill Findlay @ 2011-04-18 14:31 UTC (permalink / raw) On 18/04/2011 10:30, in article m2oc43q539.fsf@pushface.org, "Simon Wright" <simon@pushface.org> wrote: > Bill Findlay <yaldnif.w@blueyonder.co.uk> writes: > >> On 17/04/2011 15:43, in article m2vcydos58.fsf@pushface.org, "Simon Wright" >> <simon@pushface.org> wrote: >> >>> Bill Findlay <yaldnif.w@blueyonder.co.uk> writes: >>> >>>> I've an enthusiastic would-be user of my KDF9 emulator who has a G5 Mac. >>>> >>>> What is the most up-to-date compiler he can use, and where can he get it? >>>> >>>> (It needs to be a binary - he would not be up to rolling his own, and >>>> neither am I 8-). >>> >>> There's GNAT GPL 2009 at >>> https://sourceforge.net/projects/gnuada/files/GNAT_GPL%20Mac%20OS%20X/2009-t >>> ig >>> er-ppc/ - do you think that would do? >> >> He's got that and now we have: >> >>> gcc -c -I./ -I../Source -funwind-tables -g -gnatoVa -gnatfl05 -O1 -I- >>> ee9.adb >>> dyld: Library not loaded: /usr/local/lib/libintl.8.dylib >>> Referenced from: /usr/local/gnat-2009//bin/gcc >>> Reason: image not found >> >> Any guesses as to what is going on here? > > Looks as though the contributor didn't include this library in the > tarball. Not sure why it's looking at /usr/local/lib, implies it was on > his system .. afraid I don't know who the contributor was, anyone else > remember? Thanks Simon. He found the library elsewhere on his machine & copied it to where GNAT wanted it. Gnatmake now runs. The problem now is a portability issue. I have the declarations: type word is mod 2**48; ... type field_of_16_bits is mod 2**16; type Q_part is new field_of_16_bits; type Q_register is record C_part, I_part, M_part : Q_part; end record; for Q_register'Size use KDF9.word'Size; And this is fine in Intel. But on PPC, we get the error: 92. for Q_register'Size use word'Size; | >>> size for "Q_register" too small, minimum allowed is 64 It's puzzling that the compiler refuses to give Q_register the size that it happily gave to word. (The aspect clause is there to support unchecked conversions between the word and Q_register types.) -- Bill Findlay with blueyonder.co.uk; use surname & forename; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-18 14:31 ` Bill Findlay @ 2011-04-18 15:28 ` Niklas Holsti 2011-04-18 15:46 ` Bill Findlay 2011-04-18 15:52 ` Georg Bauhaus 1 sibling, 1 reply; 11+ messages in thread From: Niklas Holsti @ 2011-04-18 15:28 UTC (permalink / raw) Bill Findlay wrote: >>>> Bill Findlay <yaldnif.w@blueyonder.co.uk> writes: >>>> >>>>> I've an enthusiastic would-be user of my KDF9 emulator who has a G5 Mac. >>>>> >>>>> What is the most up-to-date compiler he can use, and where can he get it? > The problem now is a portability issue. > > I have the declarations: > > type word is mod 2**48; > > ... > > type field_of_16_bits is mod 2**16; > > type Q_part is new field_of_16_bits; > > type Q_register is > record > C_part, I_part, M_part : Q_part; > end record; > for Q_register'Size use KDF9.word'Size; > > And this is fine in Intel. But on PPC, we get the error: > > 92. for Q_register'Size use word'Size; > | > >>> size for "Q_register" too small, minimum allowed is 64 > > It's puzzling that the compiler refuses to give Q_register the size that it > happily gave to word. (The aspect clause is there to support unchecked > conversions between the word and Q_register types.) Bill, even if you get the Size clause to work, I hope your code does not rely on the Q_register components C_part, I_part, M_part being Unchecked_Converted to or from some well-known bit positions within the "word" value, as that would unportable. If you only intend to use the "word" as an opaque container for a Q_register value, and never access the integer value of the whole "word" or particular bits of the "word", Unchecked_Conversion is ok. Otherwise it would be better to use shifting and masking operations to convert between the Q_register type and the word type; then you would know exactly which bits in the "word" contain which parts of the Q_register. If the goal is a bit-precise simulation of a KDF9, I would feel safer with a shift-and-mask conversion. Apologies if my comment is obvious to you. No offence meant. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ . ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-18 15:28 ` Niklas Holsti @ 2011-04-18 15:46 ` Bill Findlay 2011-04-18 17:08 ` Niklas Holsti 0 siblings, 1 reply; 11+ messages in thread From: Bill Findlay @ 2011-04-18 15:46 UTC (permalink / raw) On 18/04/2011 16:28, in article 9133l8FtmtU1@mid.individual.net, "Niklas Holsti" <niklas.holsti@tidorum.invalid> wrote: > Bill Findlay wrote: > ]>> The problem now is a portability issue. >> >> I have the declarations: >> >> type word is mod 2**48; >> >> ... >> >> type field_of_16_bits is mod 2**16; >> >> type Q_part is new field_of_16_bits; >> >> type Q_register is >> record >> C_part, I_part, M_part : Q_part; >> end record; >> for Q_register'Size use KDF9.word'Size; >> >> And this is fine in Intel. But on PPC, we get the error: >> >> 92. for Q_register'Size use word'Size; >> | >>>>> size for "Q_register" too small, minimum allowed is 64 >> >> It's puzzling that the compiler refuses to give Q_register the size that it >> happily gave to word. (The aspect clause is there to support unchecked >> conversions between the word and Q_register types.) > > Bill, even if you get the Size clause to work, I hope your code does not > rely on the Q_register components C_part, I_part, M_part being > Unchecked_Converted to or from some well-known bit positions within the > "word" value, as that would unportable. I did not give the complete declaration, which is: type Q_register is record C_part, I_part, M_part : KDF9.Q_part; end record; for Q_register'Size use KDF9.word'Size; for Q_register'Bit_Order use Low_Order_First; for Q_register use record C_part at 0 range 32 .. 47; I_part at 0 range 16 .. 31; M_part at 0 range 0 .. 15; end record; > If you only intend to use the "word" as an opaque container for a > Q_register value, and never access the integer value of the whole "word" > or particular bits of the "word", Unchecked_Conversion is ok. Yes, but I need to make those integer properties OK as well. I hoped that the declarations above would achieve this portably (they work perfectly in the x86_64 and x86_32 versions). > Otherwise it would be better to use shifting and masking operations to > convert between the Q_register type and the word type; then you would > know exactly which bits in the "word" contain which parts of the Q_register. I hope to get the compiler to do that busy work for me. 8-) > Apologies if my comment is obvious to you. No offence meant. None taken. All comment is welcome. -- Bill Findlay with blueyonder.co.uk; use surname & forename; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-18 15:46 ` Bill Findlay @ 2011-04-18 17:08 ` Niklas Holsti 2011-04-19 3:07 ` Bill Findlay 0 siblings, 1 reply; 11+ messages in thread From: Niklas Holsti @ 2011-04-18 17:08 UTC (permalink / raw) Bill Findlay wrote: > On 18/04/2011 16:28, in article 9133l8FtmtU1@mid.individual.net, "Niklas > Holsti" <niklas.holsti@tidorum.invalid> wrote: > >> Bill Findlay wrote: >> > ]>> The problem now is a portability issue. >>> I have the declarations: >>> >>> type word is mod 2**48; >>> >>> ... >>> >>> type field_of_16_bits is mod 2**16; >>> >>> type Q_part is new field_of_16_bits; >>> >>> type Q_register is >>> record >>> C_part, I_part, M_part : Q_part; >>> end record; >>> for Q_register'Size use KDF9.word'Size; >>> >>> And this is fine in Intel. But on PPC, we get the error: >>> >>> 92. for Q_register'Size use word'Size; >>> | >>>>>> size for "Q_register" too small, minimum allowed is 64 >>> It's puzzling that the compiler refuses to give Q_register the size that it >>> happily gave to word. (The aspect clause is there to support unchecked >>> conversions between the word and Q_register types.) ... > I did not give the complete declaration, which is: > > type Q_register is > record > C_part, I_part, M_part : KDF9.Q_part; > end record; > for Q_register'Size use KDF9.word'Size; > for Q_register'Bit_Order use Low_Order_First; > for Q_register use > record > C_part at 0 range 32 .. 47; > I_part at 0 range 16 .. 31; > M_part at 0 range 0 .. 15; > end record; Bill, have you tried putting the record representation clause before the 'Size clause? That might help the compiler. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ . ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-18 17:08 ` Niklas Holsti @ 2011-04-19 3:07 ` Bill Findlay 0 siblings, 0 replies; 11+ messages in thread From: Bill Findlay @ 2011-04-19 3:07 UTC (permalink / raw) On 18/04/2011 18:08, in article 9139g4FbnoU1@mid.individual.net, "Niklas Holsti" <niklas.holsti@tidorum.invalid> wrote: > Bill Findlay wrote: >> On 18/04/2011 16:28, in article 9133l8FtmtU1@mid.individual.net, "Niklas >> Holsti" <niklas.holsti@tidorum.invalid> wrote: >> >>> Bill Findlay wrote: >>> >> ]>> The problem now is a portability issue. ... > > Bill, have you tried putting the record representation clause before the > 'Size clause? That might help the compiler. I gave up on trying to make the unchecked conversion portable and wrote my own transfer functions, as you wisely suggested, Niklas. Following that change the port of ee9 now passes its self-test procedure, successfully running a dozen different KDF9 programs on the G5 Mac. Thanks for all the suggestions in this thread. -- Bill Findlay with blueyonder.co.uk; use surname & forename; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GNAT for a PPC Mac OS X machine 2011-04-18 14:31 ` Bill Findlay 2011-04-18 15:28 ` Niklas Holsti @ 2011-04-18 15:52 ` Georg Bauhaus 1 sibling, 0 replies; 11+ messages in thread From: Georg Bauhaus @ 2011-04-18 15:52 UTC (permalink / raw) On 18.04.11 16:31, Bill Findlay wrote: > And this is fine in Intel. But on PPC, we get the error: > > 92. for Q_register'Size use word'Size; > | > >>> size for "Q_register" too small, minimum allowed is 64 > > It's puzzling that the compiler refuses to give Q_register the size that it > happily gave to word. (The aspect clause is there to support unchecked > conversions between the word and Q_register types.) Just guessing: Apple's 32-bit/64-bit PowerPC Function Calling Conventions (which refer to the PowerPC ABI) indicate that there is a number of alignment modes, including packed alignment; the GCC docs mention that some modes are not supported, IIUC. OTOH, Apple recommends not to pack data, for better performance. Continuing guess work, if KDF9.word were 64 bits wide, perhaps the record (or a derived one, for computing) could have another 16 padding bits and then be layed out to match KDF9.word's 64 bit representation on PowerPC? ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-04-19 3:07 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-04-17 14:02 GNAT for a PPC Mac OS X machine Bill Findlay 2011-04-17 14:43 ` Simon Wright 2011-04-17 18:47 ` Bill Findlay 2011-04-18 1:50 ` Bill Findlay 2011-04-18 9:30 ` Simon Wright 2011-04-18 14:31 ` Bill Findlay 2011-04-18 15:28 ` Niklas Holsti 2011-04-18 15:46 ` Bill Findlay 2011-04-18 17:08 ` Niklas Holsti 2011-04-19 3:07 ` Bill Findlay 2011-04-18 15:52 ` Georg Bauhaus
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox