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: [RFC,PATCH] 2 new mode attributes to replace mode(word) uses in libgcc


Andreas Krebbel <Andreas.Krebbel@de.ibm.com> writes:

> *************** __udivmoddi4 (UDWtype n, UDWtype d, UDWt
> *** 1082,1088 ****
>   DWtype
>   __divdi3 (DWtype u, DWtype v)
>   {
> !   word_type c = 0;
>     DWunion uu = {.ll = u};
>     DWunion vv = {.ll = v};
>     DWtype w;
> --- 1082,1088 ----
>   DWtype
>   __divdi3 (DWtype u, DWtype v)
>   {
> !   Wtype c = 0;
>     DWunion uu = {.ll = u};
>     DWunion vv = {.ll = v};
>     DWtype w;
> *************** __divdi3 (DWtype u, DWtype v)
> *** 1106,1112 ****
>   DWtype
>   __moddi3 (DWtype u, DWtype v)
>   {
> !   word_type c = 0;
>     DWunion uu = {.ll = u};
>     DWunion vv = {.ll = v};
>     DWtype w;
> --- 1106,1112 ----
>   DWtype
>   __moddi3 (DWtype u, DWtype v)
>   {
> !   Wtype c = 0;
>     DWunion uu = {.ll = u};
>     DWunion vv = {.ll = v};
>     DWtype w;

Let's just make the variable 'c' in __divdi3 and __moddi3 have type
int, rather than fuss with word_type or Wtype.  I can't see any
disadvantage to that.


When I look at your patch, there seems to be something missing: you
haven't changed optabs.c.  It seems to me that you need to change
optabs.c to use cmp_return_mode and shift_count_mode.  You should use
cmp_return_mode rather than word_mode in prepare_cmp_insn.  And you
should use shift_count_mode in expand_binop if shift_op.

Am I missing something?

Ian


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