|
Re: trying to get a registerised alpha build: msg#00145lang.haskell.glasgow.bugs
On Tue, 2006-03-28 at 14:52 +0100, Simon Marlow wrote: > I find the "divmoddi_internal_er" a bit suspicious. Things often go > wrong when gcc is using its builtin functions - you might try > -fno-builtin to gcc. We tried that and it made no difference. We did some more investigation and tried some other stuff which gave some interesting results... So R27 is the procedure value register. It's got a special meaning in the ABI of course. Now in TailCalls.h we're using that register for performing a tail call: register void *_procedure __asm__("$27"); #define JMP_(cont) \ do { _procedure = (void *)(cont); \ __DISCARD__(); \ goto *_procedure; \ } while(0) This makes perfect sense, to use the pv register when making a tail call, but doesn't seem to work with recent gcc versions. It must have worked with 2.95 or something back the last time when the alpha build worked registerised. We were hypothesising that gcc is also trying to generate code using $27 at this point where it's making the call. Then the two uses clash and gcc tries to solve the situation of register pressure in the `R27_REG' register class by spilling but it can't make that work (which also makes sense). 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. Perhaps this little jump sequence could be done using $27 by using some inline assembly rather than the current macro. Just a thought. Duncan
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: trying to get a registerised alpha build, Simon Marlow |
|---|---|
| Next by Date: | Re: trying to get a registerised alpha build, Duncan Coutts |
| Previous by Thread: | Re: trying to get a registerised alpha build, Simon Marlow |
| Next by Thread: | Re: trying to get a registerised alpha build, Duncan Coutts |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |