This is the mail archive of the gcc-patches@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: [patch] h8300.md: Fix the failure of 20020904-1.c.


Hi Kazu,

> Hmm...  Without my patch, the generated assembly code still contains
> -1 in HImode.

You're right. I thought udivqi3 and udivmodqi4 were handled by the same
expander in optabs.c but they are not: udivqi3 is handled by expand_binop()
while udivmodqi4 is handled by expand_twoval_binop(). The first routine was
fixed, not the second one.

I've attached two patches:
- optabs-1.diff cleans up a bit expand_binop(),
- optabs-2.diff exports the fix from expand_binop() to expand_twoval_binop().


2002-09-09  Eric Botcazou  ebotcazou@libertysurf.fr

    * optabs.c (expand_binop): Minor cleanup.

2002-09-09  Eric Botcazou  ebotcazou@libertysurf.fr

    * optabs.c (expand_twoval_binop): Convert CONST_INTs
    as well like in expand_binop.


Could you test them on the h8300 port ? They should fix 20020904-1.c without
your... überhack ;-) If so, I'll test them on the i386 port too as soon as I
can (not before the next week) and ask a maintainer to approve them.

> Anyway, which patch is the patch to obtabs.c that you are refering to?
> I would like to see why the code in optabs.c is not triggering.

Revision 1.144 on the trunk.

> By the way, is it OK to have HImode inside div:QI as in i386.md?

Yes. Non-matching modes between pattern arguments and actual arguments are
explicitly handled in optabs.c (see the comments in the patches).

- Eric

Attachment: optabs-1.diff
Description: Binary data

Attachment: optabs-2.diff
Description: Binary data


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