Recently config/gen/platform/darwin/asm.s was added, containing Parrot_ppc_jit_restore_nonvolatile_registers(). Corresponding code also needs to be added to config/gen/platform/aix/asm.s -- Parrot should fail to link on AIX currently, without this. I didn't try to update the AIX asm.s myself, since I wasn't confident that I could do this correctly without having a way to test.
So, someone with AIX asm expertise, please take a look.
On Fri, 29 Oct 2004 01:05:18 -0700, Jeff Clites <jcli...@mac.com> wrote: > Recently config/gen/platform/darwin/asm.s was added, containing > Parrot_ppc_jit_restore_nonvolatile_registers(). Corresponding code also > needs to be added to config/gen/platform/aix/asm.s -- Parrot should > fail to link on AIX currently, without this. I didn't try to update the > AIX asm.s myself, since I wasn't confident that I could do this > correctly without having a way to test.
> So, someone with AIX asm expertise, please take a look.
> Thanks,
> JEff
Worry not, it's already broken. I've been unable to test the AIX/PPC JIT since ICU went in. The configuration for ICU (at least as of 2.6) supports only a 64-bit build, while aix/asm.s is 32-bit only (the linker claims the .o is corrupt if assembled with OBJECT_MODE=64).
To get it working again, one of three things needs to happen:
1. ICU becomes optional again (please!). 2. PPC64 JIT code is written which can be morphed into POWER code. Transforming PPC32->POWER was mostly straightforward, so hopefully 64-bit will be as well. 3. ICU's configure starts to support 32-bit compiles. This might happen with 3.0/CVS already, but I haven't checked.
1 is necessary anyway, but it doesn't seem like a high priority. 2 is best in the long run, but requires somebody who knows more about PPC64 ASM than I do to get started. I don't know if 3 has any chance of happening upstream, but I doubt there's anybody working on Parrot who wants to deal with it.
If somebody can help with one or more of these, I can try to get it going on AIX 4.3.3 once again.
On Fri, 29 Oct 2004 15:03:40 -0700, Adam Thomason <athoma...@gmail.com> wrote:
> Worry not, it's already broken. I've been unable to test the AIX/PPC > JIT since ICU went in. The configuration for ICU (at least as of 2.6) > supports only a 64-bit build, while aix/asm.s is 32-bit only (the > linker claims the .o is corrupt if assembled with OBJECT_MODE=64).
> To get it working again, one of three things needs to happen:
> 1. ICU becomes optional again (please!). > 2. PPC64 JIT code is written which can be morphed into POWER code. > Transforming PPC32->POWER was mostly straightforward, so hopefully > 64-bit will be as well. > 3. ICU's configure starts to support 32-bit compiles. This might > happen with 3.0/CVS already, but I haven't checked.
> 1 is necessary anyway, but it doesn't seem like a high priority. 2 is > best in the long run, but requires somebody who knows more about PPC64 > ASM than I do to get started. I don't know if 3 has any chance of > happening upstream, but I doubt there's anybody working on Parrot who > wants to deal with it.
> If somebody can help with one or more of these, I can try to get it > going on AIX 4.3.3 once again.
> Adam
It appears that (3) may work after all. ICU 3.0 will build static 32-bit libraries which seem to work with parrot. As Jeff suspected, the missing Parrot_ppc_jit_restore_nonvolatile_registers caused trouble, but adding it to aix/asm.s was simple. Patch below fixes that and another pedantic build issue with xlc.
Adam Thomason <athoma...@gmail.com> wrote: > It appears that (3) may work after all. ICU 3.0 will build static > 32-bit libraries which seem to work with parrot. As Jeff suspected, > the missing Parrot_ppc_jit_restore_nonvolatile_registers caused > trouble, but adding it to aix/asm.s was simple. Patch below fixes > that and another pedantic build issue with xlc. > Now to figure out why the JIT code segfaults...
On Mon, 8 Nov 2004 11:38:11 +0100, Leopold Toetsch <l...@toetsch.at> wrote: > Adam Thomason <athoma...@gmail.com> wrote:
> > It appears that (3) may work after all. ICU 3.0 will build static > > 32-bit libraries which seem to work with parrot. As Jeff suspected, > > the missing Parrot_ppc_jit_restore_nonvolatile_registers caused > > trouble, but adding it to aix/asm.s was simple. Patch below fixes > > that and another pedantic build issue with xlc.
> > Now to figure out why the JIT code segfaults...
> Broken ABI WRT r2 (whatever that does on AIX)?
The AIX calling convention preserves the "Table of Contents" (TOC) address in r2, which must be preserved across function calls. What's stomping on this that wasn't a few months ago?
Adam Thomason <athoma...@gmail.com> wrote: > On Mon, 8 Nov 2004 11:38:11 +0100, Leopold Toetsch <l...@toetsch.at> wrote: >> Adam Thomason <athoma...@gmail.com> wrote:
>> > Now to figure out why the JIT code segfaults...
When does it segfault: always? during begin or end of JIT code?
>> Broken ABI WRT r2 (whatever that does on AIX)? > The AIX calling convention preserves the "Table of Contents" (TOC) > address in r2, which must be preserved across function calls.
Yes, but C<r2> is not used at all.
> ... What's > stomping on this that wasn't a few months ago?
Register usage was changed, now non-volatiles are used only (and preserved over jit_func), and of course this asm function for restoring floats was added.
On Wed, 10 Nov 2004 08:34:26 +0100, Leopold Toetsch <l...@toetsch.at> wrote: > Adam Thomason <athoma...@gmail.com > wrote: > > On Mon, 8 Nov 2004 11:38:11 +0100, Leopold Toetsch <l...@toetsch.at > wrote: > >> Adam Thomason <athoma...@gmail.com > wrote:
> >> > Now to figure out why the JIT code segfaults...
> When does it segfault: always? during begin or end of JIT code?
I just cvs up'ed and upgraded to perl 5.8.5, and now parrot's make testj matches make test (some unimplemented PMC method errors in both... is this expected?). I'm not sure what's responsible, but the segfaults have gone away. For once the gnomes work for the better...
Adam Thomason <athoma...@gmail.com> wrote: > I just cvs up'ed and upgraded to perl 5.8.5, and now parrot's make > testj matches make test (some unimplemented PMC method errors in > both... is this expected?).
I don't know, which errors you got ;) Anyway, as of now JIT/PPC on OS X is passing all tests.
> ... I'm not sure what's responsible, but the > segfaults have gone away.
Which perl version did you replace? Can you reproduce the failures with the old perl? If yes, we should drop a note somewhere about this incompatibility.