[Gc] Regarding thread context.

Boehm, Hans hans.boehm at hp.com
Mon Mar 1 13:28:37 PST 2004

I can't comment on this specific code, since I'm not familiar with the ABI.
In general, if you have a choice, it is best to push exactly those registers
that might contain pointers.  On some platforms that might include things
like floating point registers, if the compiler will spill integer registers
to those.

I would not include OS-reserved registers which it is unsafe
for the compiler to use anyway.  Including them is unlikely to make a real
difference since, as you say, they will probably not contain valid pointers
anyway.  But since it also saves some code to exclude them, there's no
reason to do otherwise.  (I have never seen the register pushing code show
up anywhere near the top in a profile.  Nor should it.)

I'm sure that some of the platform-dependent code does push some extra registers.
But that's really an oversight, usually caused by lack of familiarity with the ABI.
And it's safe to push extra registers, but clearly unsafe to accidentally omit some.


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of vasantha selvi
> Sent: Monday, March 01, 2004 5:55 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Regarding thread context.
> Hi Hans,
>         Once I went through the win32_threads.c, in that 
> GC_push_all_stacks() for ppc port I saw that registers which 
> are reserved 
> for kernel and global pointers are pushed into the mark stack.
> Don't really get the reason for that. Any way pointer 
> analysis going to find 
> whether it is valid pointer or not, then why it is avoid 
> pushing into the 
> stack. Is there any specific reason for not pushing those 
> registers into the 
> mark stack.
> With great interest waiting for the response,
> With Regards,
> VS
> _________________________________________________________________
> Raja Ravi Varma paintings. Buy art prints. 
> https://go.msnserver.com/IN/42737.asp At MSN Shopping.
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> https://www.hpl.hp.com/hosted/linux/mail-archives/gc/

More information about the Gc mailing list