trying to get a registerised alpha build
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Tue Mar 28 21:37:39 EST 2006
On Tue, 2006-03-28 at 19:06 +0100, Duncan Coutts wrote:
> register void *_procedure __asm__("$27");
>
> #define JMP_(cont) \
> do { _procedure = (void *)(cont); \
> __DISCARD__(); \
> goto *_procedure; \
> } while(0)
> By changing the register we use for _procedure we can get it to compile
> all of the base lib. That's not to say it'll work of course. I don't
> understand enough about the needs of tail calls to say if it's essential
> that we use $27 or if some other register will do.
Well the full build finished and appears to work. We're going to try
again with what I think is a better fix than just picking another fixed
register. Instead of fixing a register we could let gcc pick any
suitable register by use a local C variable. It'd be the same code as
x86/amd64 use:
#define JMP_(cont) \
{ \
void *__target; \
__DISCARD__(); \
__target = (void *)(cont); \
goto *__target; \
}
So we'll give that a go. I don't know if the do { ... } while (0) is
significant. I expect that with modern gcc versions that it is not.
So that's the alpha registerised build mostly working. Next is the
mangler.
Duncan
More information about the Glasgow-haskell-bugs
mailing list