gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: gcc-3.3 bugs Debian unstable hppa


From: Camm Maguire
Subject: [Gcl-devel] Re: gcc-3.3 bugs Debian unstable hppa
Date: 08 Mar 2004 17:58:37 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings, and thanks for working with me on this.

Carlos O'Donell <address@hidden> writes:

> On Mon, Mar 08, 2004 at 07:27:59AM -0500, Camm Maguire wrote:
> > Greetings!  GCL can mark the C stack via a simple heuristic algorithm
> > given its bottom (taken at program start) and top (at point of GBC
> > marking).  It cannot mark items in registers, so it must flush the
> > registers to the C stack first.  This is typically done with setjmp,
> > but for some reason this wasn't working on hppa.   Are we catching all
> > the regs in the code below?
> 
> I don't see why the setjmp code wouldn't work. Here you just replace the
> setjmp buffer with a 'struct regs' and call some assembly that writes
> the same thing into the structure.
> 

Is it possible there was a change in setjmp function on hppa, in say
the last two years (i.e. that would effect this)?  Lamont provided the
assembler and described the setjmp failure at the time, but I cannot
remember the details now.

> What registers are you interested in saving? If you make a function call
> later, you are probably interested in saving the caller saves registers,
> since the others must be retsored by the called function. Please clarify
> this.

I think we need the contents of all registers capable of holding a
machine word length pointer on the stack at this point in the code.
It is not important (so much) if unnecessary data is copied on the
stack, but rather critical that no C variable in a stack frame higher
up which could hold a pointer be left in a register with no copy on
the stack.  This does not have to do with function calling per se.

> 
> Lastly, how do you account for the fact that hppa's stack grows up, and
> the difference between top and bottom is negative? I've had to cleanup a
> lot of code in glibc that made the wrong assumptions.
> 

Yes, we check for this here:

    if (&where > cs_org)
      (*fn)(0,cs_org,C_GC_OFFSET);
    else
      (*fn)(cs_org,0,C_GC_OFFSET);}

int where is a variable in the current frame, and cs_org in the frame
of main().

I probably ought to mention that we also put in special code for ia64,
but this was to make sure to walk *both* its stacks.  I'm assuming
hppa has only one.

We also have a NULL_OR_ON_C_STACK macro which in hppa's case
identifies a pointer as being on the C stack if (long)ptr<0.  This
appears to be correct.

Please keep in mind that this problem is hppa specific, so it pretty
much must be in an hppa-specific define or asm, or in gcc.

Also, could you please help with this:

http://buildd.debian.org/fetch.php?&pkg=gcl&ver=2.6.1-31&arch=hppa&stamp=1078757070&file=log&as=raw

There appears to be some bash error that is breaking any gcl autobuild at
all at the moment.

Take care,

> c.
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]