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: Carlos O'Donell
Subject: [Gcl-devel] Re: gcc-3.3 bugs Debian unstable hppa
Date: Sun, 7 Mar 2004 16:06:53 -0500
User-agent: Mutt/1.3.28i

On Sat, Mar 06, 2004 at 08:51:45PM -0500, Camm Maguire wrote:
> Greetings, and thanks for your reply!  

Thanks for your interest!
 
> OK you've triggered one possibility in my mind -- for some time we
> have had hppa specific assembler in our garbage collector to make sure
> the registers are flushed when marking the C stack.  The bug in
> question has the markings of a possible gbc bug in which some string
> object, possibly on the C stack, was not marked.  You're mentioning of
> volatile variables brought this to mind.

What are the flushing requirements?
 
> Here is the assembler:
> 
> =============================================================================
> #if defined(__hppa__) /* Courtesy of Lamont Jones */
> /* the calling sequence */
> struct regs {
>       void *callee_saves[16];
> };
> void hppa_save_regs(struct regs);
> 
> /* the code */
> 
>       asm(".code");
>       asm(".export hppa_save_regs, entry");
>       asm(".proc");
>       asm(".callinfo");
>       asm(".label     hppa_save_regs");
>       asm(".entry");
> 
>       asm("stw        %r3,0(%arg0)");
>       asm("stw        %r4,4(%arg0)");
>       asm("stw        %r5,8(%arg0)");
>       asm("stw        %r6,12(%arg0)");
>       asm("stw        %r7,16(%arg0)");
>       asm("stw        %r8,20(%arg0)");
>       asm("stw        %r9,24(%arg0)");
>       asm("stw        %r10,28(%arg0)");
>       asm("stw        %r11,32(%arg0)");
>       asm("stw        %r12,36(%arg0)");
>       asm("stw        %r13,40(%arg0)");
>       asm("stw        %r14,44(%arg0)");
>       asm("stw        %r15,48(%arg0)");
>       asm("stw        %r16,52(%arg0)");
>       asm("stw        %r17,56(%arg0)");
>       asm("bv 0(%rp)");
>       asm("stw        %r18,60(%arg0)");
> 
>       asm(".exit");
>       asm(".procend");
>       asm(".end");
> #endif
> 
> static void
> mark_c_stack(jmp_buf env1, int n, void (*fn)(void *,void *,int)) {
> 
> #if defined(__hppa__)
>   struct regs hppa_regs;
> #endif
>   jmp_buf env;
>   int where;
>   if (n== N_RECURSION_REQD)
>     c_stack_where = (long *) (void *) &env;
>   if (n > 0 ) {  
> #if defined(__hppa__)
>     hppa_save_regs(hppa_regs);
> #else    
>     setjmp(env);
> #endif
> =============================================================================
> 
> Apparently setjmp did not flush the regs on hppa when we put this in.

Flush? You mean save the registers to the stack?
GCC should already be saving all the required registers to the stack.

Please explain your requirements?

c.





reply via email to

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