Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
AIX PPC JIT warning
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeff Clites  
View profile  
 More options Oct 29 2004, 4:05 am
Newsgroups: perl.perl6.internals
From: jcli...@mac.com (Jeff Clites)
Date: Fri, 29 Oct 2004 01:05:18 -0700
Local: Fri, Oct 29 2004 4:05 am
Subject: AIX PPC JIT warning
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Thomason  
View profile  
 More options Oct 29 2004, 6:03 pm
Newsgroups: perl.perl6.internals
From: athoma...@gmail.com (Adam Thomason)
Date: Fri, 29 Oct 2004 15:03:40 -0700
Local: Fri, Oct 29 2004 6:03 pm
Subject: Re: AIX PPC JIT warning

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.

Adam


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Thomason  
View profile  
 More options Nov 8 2004, 4:41 am
Newsgroups: perl.perl6.internals
From: athoma...@gmail.com (Adam Thomason)
Date: Mon, 8 Nov 2004 01:41:18 -0800
Local: Mon, Nov 8 2004 4:41 am
Subject: Re: AIX PPC JIT warning

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...

Index: config/gen/platform/aix/asm.s
===================================================================
RCS file: /cvs/public/parrot/config/gen/platform/aix/asm.s,v
retrieving revision 1.2
diff -u -r1.2 asm.s
--- config/gen/platform/aix/asm.s       21 Feb 2004 10:58:53 -0000      1.2
+++ config/gen/platform/aix/asm.s       3 Nov 2004 23:57:33 -0000
@@ -10,6 +10,7 @@
 .globl .aix_get_toc
 .globl .ppc_sync
 .globl .ppc_flush_line
+.globl .Parrot_ppc_jit_restore_nonvolatile_registers

 # Flushes the cache line whose address is passed in
 .ppc_flush_line:
@@ -38,3 +39,25 @@
     st 3,68(SP)
     cal SP,80(SP)
     bcr BO_ALWAYS,CR0_LT
+
+.Parrot_ppc_jit_restore_nonvolatile_registers:
+    .function .Parrot_ppc_jit_restore_nonvolatile_registers,.Parrot_ppc_jit_restore_nonvo latile_registers,2,0
+    lfd 14,-84(SP)
+    lfd 15,-92(SP)
+    lfd 16,-100(SP)
+    lfd 17,-108(SP)
+    lfd 18,-116(SP)
+    lfd 19,-124(SP)
+    lfd 20,-132(SP)
+    lfd 21,-140(SP)
+    lfd 22,-148(SP)
+    lfd 23,-156(SP)
+    lfd 24,-164(SP)
+    lfd 25,-172(SP)
+    lfd 26,-180(SP)
+    lfd 27,-188(SP)
+    lfd 28,-196(SP)
+    lfd 29,-204(SP)
+    lfd 30,-212(SP)
+    lfd 31,-220(SP)
+    bcr BO_ALWAYS,CR0_LT
Index: src/sub.c
===================================================================
RCS file: /cvs/public/parrot/src/sub.c,v
retrieving revision 1.76
diff -u -r1.76 sub.c
--- src/sub.c   3 Nov 2004 14:29:58 -0000       1.76
+++ src/sub.c   3 Nov 2004 23:57:33 -0000
@@ -338,8 +338,10 @@
  */
 #if PMC_DATA_IN_EXT
 #  define PREV_RETC(p) (PMC*)((p)->pmc_ext)
+#  define PREV_RETC_LVALUE(p) ((p)->pmc_ext)
 #else
 #  define PREV_RETC(p) PMC_data(p)
+#  define PREV_RETC_LVALUE(p) PMC_data(p)
 #endif

 /*
@@ -374,7 +376,7 @@
     Caches *mc = interpreter->caches;

     if (mc->retc_cache)
-        PREV_RETC(mc->retc_cache) = mc->retc_cache;
+        PREV_RETC_LVALUE(mc->retc_cache) = (PMC_EXT*) mc->retc_cache;
     mc->retc_cache = pmc;
     /* XXX expensive w. ARENA_DOD_FLAGS */
     PObj_custom_mark_CLEAR(pmc);


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leopold Toetsch  
View profile  
 More options Nov 8 2004, 5:38 am
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Mon, 8 Nov 2004 11:38:11 +0100
Local: Mon, Nov 8 2004 5:38 am
Subject: Re: AIX PPC JIT warning

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)?

Thanks, applied:

> Index: config/gen/platform/aix/asm.s

That part is already changed:

> Index: src/sub.c

leo

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Thomason  
View profile  
 More options Nov 9 2004, 8:53 pm
Newsgroups: perl.perl6.internals
From: athoma...@gmail.com (Adam Thomason)
Date: Tue, 9 Nov 2004 17:53:54 -0800
Local: Tues, Nov 9 2004 8:53 pm
Subject: Re: AIX PPC JIT warning

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leopold Toetsch  
View profile  
 More options Nov 10 2004, 2:34 am
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Wed, 10 Nov 2004 08:34:26 +0100
Local: Wed, Nov 10 2004 2:34 am
Subject: Re: AIX PPC JIT warning

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.

> Adam

leo

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Thomason  
View profile  
 More options Nov 13 2004, 2:02 am
Newsgroups: perl.perl6.internals
From: athoma...@gmail.com (Adam Thomason)
Date: Fri, 12 Nov 2004 23:02:15 -0800
Local: Sat, Nov 13 2004 2:02 am
Subject: Re: AIX PPC JIT warning

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leopold Toetsch  
View profile  
 More options Nov 16 2004, 11:51 am
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Tue, 16 Nov 2004 17:51:57 +0100
Local: Tues, Nov 16 2004 11:51 am
Subject: Re: AIX PPC JIT warning

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.

> Adam

Thanks,
leo

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google