PERL PERL6 INTERNALS 31 PPC JIT FIXES HOPEFULLY
Date: Thu, 03 Mar 2005 11:56:45 +0100

Subject: PPC jit fixes - hopefully
From: lt@no-spam (Leopold Toetsch)

I've now committed the proposed changes,
see tickets: #32989, #32514, #34072

If you have a PPC based box, please give it a try.

Thanks,
leo

Subject: Re: PPC jit fixes - hopefully
Date: Thu, 3 Mar 2005 17:22:26 +0100















From: olivier.thauvin@no-spam (Olivier Thauvin)
Le Thursday 3 March 2005 11:56, Leopold Toetsch a =E9crit :
> I've now committed the proposed changes,
> see tickets: #32989, #32514, #34072
>
> If you have a PPC based box, please give it a try.

My ppc box is a Mandrake cooker (devel distro): I ran:

Unfortunally, I don't have the C/asm knowledge to help more :(

cvs update -dC make clean perl Configure.PL make
ops/core_ops_switch.c as -o src/asmfun.o src/asmfun.s src/asmfun.s: Assembler messages:
src/asmfun.s:6: Error: unsupported relocation against f14
src/asmfun.s:6: Error: unsupported relocation against r1
src/asmfun.s:7: Error: unsupported relocation against f15
src/asmfun.s:7: Error: unsupported relocation against r1
src/asmfun.s:8: Error: unsupported relocation against f16
src/asmfun.s:8: Error: unsupported relocation against r1
src/asmfun.s:9: Error: unsupported relocation against f17
src/asmfun.s:9: Error: unsupported relocation against r1
src/asmfun.s:10: Error: unsupported relocation against f18
src/asmfun.s:10: Error: unsupported relocation against r1
src/asmfun.s:11: Error: unsupported relocation against f19
src/asmfun.s:11: Error: unsupported relocation against r1
src/asmfun.s:12: Error: unsupported relocation against f20
src/asmfun.s:12: Error: unsupported relocation against r1
src/asmfun.s:13: Error: unsupported relocation against f21
src/asmfun.s:13: Error: unsupported relocation against r1
src/asmfun.s:14: Error: unsupported relocation against f22
src/asmfun.s:14: Error: unsupported relocation against r1
src/asmfun.s:15: Error: unsupported relocation against f23
src/asmfun.s:15: Error: unsupported relocation against r1
src/asmfun.s:16: Error: unsupported relocation against f24
src/asmfun.s:16: Error: unsupported relocation against r1
src/asmfun.s:17: Error: unsupported relocation against f25
src/asmfun.s:17: Error: unsupported relocation against r1
src/asmfun.s:18: Error: unsupported relocation against f26
src/asmfun.s:18: Error: unsupported relocation against r1
src/asmfun.s:19: Error: unsupported relocation against f27
src/asmfun.s:19: Error: unsupported relocation against r1
src/asmfun.s:20: Error: unsupported relocation against f28
src/asmfun.s:20: Error: unsupported relocation against r1
src/asmfun.s:21: Error: unsupported relocation against f29
src/asmfun.s:21: Error: unsupported relocation against r1
src/asmfun.s:22: Error: unsupported relocation against f30
src/asmfun.s:22: Error: unsupported relocation against r1
src/asmfun.s:23: Error: unsupported relocation against f31
src/asmfun.s:23: Error: unsupported relocation against r1
make: *** [src/asmfun.o] Error 1

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQBCJznCk29cDOWzfVARArxdAKCS46BzxMAzLf3/5BXfXpyEZcNvjwCeKwZ1
KMBP75zITOxPnWKmgqpIMNQ=
=6rvG -----END PGP SIGNATURE-----


Subject: Re: PPC jit fixes - hopefully
Date: Thu, 03 Mar 2005 09:30:22 -0800

From: chromatic@no-spam (Chromatic)
On Thu, 2005-03-03 at 17:22 +0100, Olivier Thauvin wrote:

> ops/core_ops_switch.c > as -o src/asmfun.o src/asmfun.s > src/asmfun.s: Assembler messages:
> src/asmfun.s:6: Error: unsupported relocation against f14

Adding -mregnames to the as call makes it compile for me, but it apparently doesn't export the symbol properly:

blib/lib/libparrot.a(jit_cpu.o)(.text+0x2722): In function `Parrot_end_jit':
src/jit_cpu.c:74: undefined reference to `Parrot_ppc_jit_restore_nonvolatile_registers'
blib/lib/libparrot.a(jit_cpu.o)(.text+0x2726):src/jit_cpu.c:74:
undefined reference to `Parrot_ppc_jit_restore_nonvolatile_registers
-- c

Subject: Re: PPC jit fixes - hopefully
Date: Thu, 03 Mar 2005 09:39:03 -0800

From: chromatic@no-spam (Chromatic)
On Thu, 2005-03-03 at 09:30 -0800, chromatic wrote:

> Adding -mregnames to the as call makes it compile for me, but it > apparently doesn't export the symbol properly:

Ah, here it is. For whatever reason, it doesn't strip the leading underscore from the symbol name. (GNU as allows symbols to start with word characters, but I don't see a flag to remove a prefix.)

Compiling the file manually with the -mregnames flag and applying this patch fixes the build for me.

-- c
Index: jit/ppc/asm.s ===================================================================
RCS file: /cvs/public/parrot/jit/ppc/asm.s,v retrieving revision 1.1
diff -u -u -r1.1 asm.s --- jit/ppc/asm.s 3 Mar 2005 10:55:37 -0000 1.1
+++ jit/ppc/asm.s 3 Mar 2005 17:33:12 -0000
@@no-spam -1,7 +1,7 @@no-spam .text .align 12
- .globl _Parrot_ppc_jit_restore_nonvolatile_registers -_Parrot_ppc_jit_restore_nonvolatile_registers:
+ .globl Parrot_ppc_jit_restore_nonvolatile_registers +Parrot_ppc_jit_restore_nonvolatile_registers:
lfd f14,-84(r1)
lfd f15,-92(r1)

[plaintext linux_ppc_asm.patch]


Subject: Re: PPC jit fixes - hopefully
Date: Fri, 4 Mar 2005 08:48:06 +0100

From: lt@no-spam (Leopold Toetsch)
Chromatic <chromatic@no-spam> wrote:

> On Thu, 2005-03-03 at 09:30 -0800, chromatic wrote:

>> Adding -mregnames to the as call makes it compile for me, but it >> apparently doesn't export the symbol properly:

> Ah, here it is. For whatever reason, it doesn't strip the leading > underscore from the symbol name. (GNU as allows symbols to start with > word characters, but I don't see a flag to remove a prefix.)

> Compiling the file manually with the -mregnames flag and applying this > patch fixes the build for me.

Ok. I've duplicate jit/ppc/asm.s to jit/ppc/ppc-linux.s, removed the leading underscore and the register name prefixes.

config/auto/jit.pl should now use this file for the platform "ppc-linux".

> -- c
Thanks to Olivier and your for providing feedback,
leo

Date: Fri, 4 Mar 2005 16:24:30 -0500

Subject: Re: PPC jit fixes - hopefully
From: mddiep@no-spam (Matt Diephouse)
On Fri, 4 Mar 2005 08:48:06 +0100, Leopold Toetsch <lt@no-spam> wrote: > Ok. I've duplicate jit/ppc/asm.s to jit/ppc/ppc-linux.s, removed the > leading underscore and the register name prefixes.
> > config/auto/jit.pl should now use this file for the platform > "ppc-linux".

Can someone that #32514 can be closed?

https://rt.perl.org/rt3/Ticket/Display.html?id=32989

And #27414 along with it:

https://rt.perl.org/rt3/Ticket/Display.html?id=27414

Thanks.

-- matt diephouse http://matt.diephouse.com

Date: Fri, 4 Mar 2005 16:32:16 -0500

Subject: Re: PPC jit fixes - hopefully
From: mddiep@no-spam (Matt Diephouse)
On Fri, 4 Mar 2005 16:24:30 -0500, Matt Diephouse <mddiep@no-spam> wrote:
> On Fri, 4 Mar 2005 08:48:06 +0100, Leopold Toetsch <lt@no-spam> wrote:
> > Ok. I've duplicate jit/ppc/asm.s to jit/ppc/ppc-linux.s, removed the > > leading underscore and the register name prefixes.
> >
> > config/auto/jit.pl should now use this file for the platform > > "ppc-linux".
> > Can someone that #32514 can be closed?

Eek. That should read "Can someone *confirm* that #32514 can be closed?".
> https://rt.perl.org/rt3/Ticket/Display.html?id=32989
> > And #27414 along with it:
> > https://rt.perl.org/rt3/Ticket/Display.html?id=27414
>
Sorry.

-- matt diephouse http://matt.diephouse.com

Subject: Re: PPC jit fixes - hopefully
Date: Fri, 04 Mar 2005 13:41:42 -0800

From: chromatic@no-spam (Chromatic)
On Fri, 2005-03-04 at 16:24 -0500, Matt Diephouse wrote:

> Can someone that #32514 can be closed?
> > https://rt.perl.org/rt3/Ticket/Display.html?id=32989

Yes, close it.

> And #27414 along with it:
> > https://rt.perl.org/rt3/Ticket/Display.html?id=27414

I don't see the failures (and have never seen them). Both of the tests mentioned there pass with make testj. (Only t/pmc/eval.t #4 fails, and I'll look at that later.)

-- c