[gclist] gclist-digest V1 #40

Paul R. Wilson wilson@cs.utexas.edu
Wed, 1 May 1996 08:49:55 -0500


Hi Fergus

  I understand that your compiler compiles to C and uses label addresses
for jumps (with GCC).  Is that correct?

  How did you do it?  We've had problems with using label addresses,
apparently because GCC doesn't support jumps to labels that aren't in
scope.  This appears to cause problems on SPARC and RS6000's, at least.

  (On RS6000's, a function pointer isn't a raw code pointer.  It's
a pointer to a little dictionary vector that contains the code pointer
and other stuff the procedure may use.  When you call the procedure,
the address of the little dictionary vector is put in a register,
so that register-relative addressing can be used to access the stuff
in the vector.  Then the code pointer is extracted and jumped to,
after setting up that context.  The problem with label jumps may
be that this register is not being set with the vector address the
way it is at a procedure call, so if you jump out of context, you're
toast.)

  I'd be interested in any advice you have on using label addresses.  If
you know workarounds, we'd be very interested in them for RScheme.  If
we're mistaken about the problems, that'd be interesting,too.

   Paul