[RFA] Sparc libjava support update

Andrew Haley aph@cambridge.redhat.com
Sun Apr 21 03:34:00 GMT 2002


David S. Miller writes:
 > 
 > With my recent addition of signal frame unwind support for
 > Linux/Sparc, we can now add in the proper support bits to libjava
 > for that platform.
 > 
 > Meanwhile, I noticed that include/sparc-signal.h could be easily
 > made 64-bit clean, and now we use it on all Solaris Sparc
 > configurations.

Good stuff.

 > 	(INIT_SEGV, INIT_FPE): Use direct __libc_sigaction installation
 > 	on Sparc too.

I expect this to be made glibc private at some point in the future, so
we'll have to revisit this.  The syscall(SYS_sigaction) used in
i386-signal.h is much less fragile.

  if (insn == 0x821020d8)						\
    regp = (struct sig_regs *) _sip;					\

This line needs a comment.  Also you say "we are lying to the unwinder
here, which expects the faulting pc, not pc+1."  But then 

  regp->npc += 4;							\

In fact, can you plese provide an explanatory comment for all this
weirdness:

  unsigned int insn;							\
  __asm__ __volatile__("ld [%%i7 + 8], %0" : "=r" (insn));		\
  if (insn == 0x821020d8)						\
    regp = (struct sig_regs *) _sip;					\
  else									\
    regp = (struct sig_regs *) (_sip + 1);				\
  regp->pc = regp->npc;							\
  regp->npc += 4;							\

:-)

Thanks,
Andrew.



More information about the Java-patches mailing list