Hello Richard,

> > The code is now completely moved into libgcc/config/mips/t-mips and
> > libgcc/config/mips/lib2funcs.c (new file).
> > The code should now be easier to understand.
> > I used the code from libgcc/config/m32c as example (e.g. same file name
> > lib2funcs.c). I copied the file header (LGPL) from a file which I
> > believed to be new and correct.
>
> Thanks, this looks very clean.  It's good that the new file compiles
> to nothing for ISA_HAS_DMULT/ISA_HAS_DDIV targets.  In that case though,
> I think it should be added to LIB2ADD_ST rather than LIB2ADD.
> Objects from LIB2ADD are included in libgcc.so, which needs to have
> a stable interface, whereas LIB2ADD_ST is purely for libgcc.a,
> where this kind of variation is OK.

Regarding LIB2ADD vs. LIB2ADD_ST:
At the moment I can't run a test with shared libraries, but it seems to work 
when linking a program using shared libraries. There is no undefined reference 
to __muldi3 when linking shared and using the toolchain for r5900.

> Putting them in one file means they'll either all be pulled in or none will,
> but I doubt the size is going to matter in practice, right?  Besides,
> that kind of thing could easily be tweaked later if it shows up as a problem.
>
> Also, I see you changed the patch so that mul<mode>3 tests ISA_HAS_<D>MULT
> in the C body rather than in the condition.  Was that in response to my
> previous comment about define_expand conditions?

Yes.

> Your first version was
> right because mul<mode>3 is a public pattern that's exposed to optabs
> (insn-opinit.c tests HAVE_mul<mode>3).  The other two define_expands
> you mentioned are private to the MIPS port though and we never use
> HAVE_* for them.  We only use them from places where the insns are
> already known to be valid.

OK, now I know the missing details.

> The ISA_HAS_DMUL3 part was redundant, sorry for not noticing it last time.

Yes, I thought it must be changed, but you are right.

> Does it still work with those changes, as below?  If so, I'll check it in.

I tested it. It is still working. So the patch is OK, please check it in.

Best regards
Jürgen

Reply via email to