On Thu, Aug 18, 2005 at 09:19:06AM +0200, Andrija Antonijevic wrote: > I have taken a look at gcc source and it seems that there is a better way > to do this: > > emit_library_call(gen_rtx_SYMBOL_REF(Pmode, "__baserel_get_addr"), > 0, VOIDmode, 1, gen_rtx_REG(Pmode, 3), Pmode); I have tried that (before) and with 4.0.0 I get a "insn doesn't statisfy its constraints" error. There is also "gen_call_value". > It's possible that instead of passing r3 to __baserel_get_addr we should > have tried to pass RTX for the first argument of the function (which is > actually what is supposed to happen). Is baserel_restore only intended for libcall functions? > If that fixes "prologue instruction optimized away" problem, there's still > the problem that the compiler doesn't know that this will affect r2 so > "store old r2", "call __baserel_get_addr to setup r2", "use base relative > variables relative to r2" sequence might be rearranged by the optimizer. I > suppose that this can be fixed by generating blockages (or whatever it's > called) or by finding a way to tell the compiler that r2 is modified by > __baserel_get_addr (which would probably be a better way, but I'm not sure > if it's possible). Maybe a gen_rtx_CLOBBER attached to the function call might do the trick. I fear the only hope is trying to get help on the GCC ML. Gunther -- Linux is only free if your time has no value - Jamie Zawinski ______________________________________________________________________________ Amiga Development tools ML - //www.freelists.org/list/adtools Homepage...................: http://www.sourceforge.net/projects/adtools Listserver help............: mailto:adtools-request@xxxxxxxxxxxxx?Subject=HELP