This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: 3.0.1 PATCH: Avoid non-PIC code in boehm-gc for Solaris 2/Intel
- To: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Subject: Re: 3.0.1 PATCH: Avoid non-PIC code in boehm-gc for Solaris 2/Intel
- From: Richard Henderson <rth at redhat dot com>
- Date: Tue, 26 Jun 2001 10:28:01 -0700
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org, "Hans-J. Boehm" <boehm at acm dot org>
- References: <15160.32848.131824.599234@xayide.TechFak.Uni-Bielefeld.DE>
On Tue, Jun 26, 2001 at 02:30:08PM +0200, Rainer Orth wrote:
> - asm("pushl %eax"); asm("call GC_push_one"); asm("addl $4,%esp");
> + asm("pushl %eax"); GC_push_one (); asm("addl $4,%esp");
This isn't going to work reliably.
Try
#define call_push(REGNAME) \
{ register word reg __asm__( #REGNAME ); GC_push_one (reg); }
#ifndef __PIC__
call_push(ebx)
#endif
call_push(ebp)
call_push(esi)
call_push(edi)
Which, incidentally, will work for all x86 targets. Only the MSVC
variant should remain. Also note that EAX, EDX, ECX are call-clobbered
and will not contain valid data at this point.
r~