On Jan 6, 2004, at 3:28 PM, Adam Thomason (via RT) wrote:

-----Original Message-----
From: Jeff Clites [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 31, 2003 4:30 PM
To: [EMAIL PROTECTED]
Subject: [PATCH] PPC JIT fixes [re-send] (Modified by Jeff Clites)

7) I don't expect anything here to break AIX users--the Mac OS X and
AIX calling conventions differ somewhat, but I don't think anything
here should run into those differences. But I'd like to hear
the test
results on AIX after application of the patch, and also I'd like to
know if most tests were failing before its application.

It never worked to begin with, so you haven't broken anything :). On actinium, the initial jump into jit_code from runops_jit promptly segfaults. I've yet to successfully convince gdb to import the stabs object (made either with GNU STABS and gas or XCOFF STABS and the AIX as) to see what parrot instruction is causing the failure. Since even basic_1.pasm fails (i.e., noop,end), I'm tempted to think the problem is occurring before it gets to the PASM ops, but I'm not familiar enough with PPC ASM or gdb to track it down. If there's anyone more knowledgable I'd be glad to take some direction and poke around.

Try this, to give you a lead:


1) In gdb, break on runops_jit, then step until jit_code is defined (but not jumpted to yet).

2) Dump the assembly by typing "x/40i jit_code". (That is "x" for examine memory at "jit_code", and the "/40i" says to format the output as instructions, and print out 40 of them.) That will at least give you the first chunk of the JIT-produced assembly.

3) Continue running. When you crash, use "info reg" to output the registers--the "pc" listed is the program counter, which should tell you the instruction on which you crashed. If the number matches one of the lines printed in (2), then that's where you crashed. If the number is in a completely different range, you probably jumped somewhere from the JIT code before crashing. If so, do (4):

(4) Start over, but after step (2), instead of just continuing, step one instruction at a time with "nexti" until you crash. Each time you step it will print out the program counter, so you'll be able to see at which point you jump from the JIT code into the beginning-of-the-end. That will tell us at least where to start looking.

(Also, as a side note, I believe that before my patches the basic_1.pasm test was working on Mac OS X--about the only one working--so it may be that something completely different is going wrong on AIX. And actually, there's some flush-the-processor-cache code which may be conditionally compiled, so maybe that isn't building in your case, and your jump could end up trying to execute stale data. Or it may be and issue with calling convention differences between AIX and Mac OS X.)

JEff



Reply via email to