This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Issue with hard regs


Hi Ian

>
> > Can i disable filling/spilling for this register class?
>
> Sure: make the registers fixed.
>
> Or look at how the MIPS port handles HI and LO, with particular
> reference to mips_secondary_reload_class.
>
> Ian

what i'm trying to do is to code a backend for a "standard" DLX. Most things
work (everything operating on SI,HI,QI types) but i have problems specifically
with "long division". I.e. there is something wrong with either "libgcc2.c"
(most improbable) or my backend.

I thought borrowing the HI/LO concept for passing the remainder/quotient when
"emulating" the 64-bit divisions by "[u]divsi3" (which calls udivmoddi4). I
have resorted to s'thing like this that doesn't need hi-lo registers. I have
t8/t9 fixed for this:

return "bnez\t%2,4\n\tbreak\t7\n1:\n\tadd\t%0, $zero, $t8\n\tadd\t%3, $zero,
$t9";

(as in MIPS' mips_output_division())

I'll have a look to mips_secondary_reload_class, however now i don't get
spilling/filling errors. I have a question: libgcc2.c is pretty stable, right?
I mean i shouldn't looking for something going wrong with it.

thanks in advance
Nikolaos Kavvadias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]