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: logical error with 16bit arithmatic operations


Yes. You are right. I fixed the problem.
I checked the macro in INTERNAL docment,  and I copied the mips
definition of PROMOTE_MODE:

#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE)	\
  if (GET_MODE_CLASS (MODE) == MODE_INT		\
      && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
    {                                           \
           (MODE) = Pmode;                           \
    }
Now it runs ok now.

Thank you very much.
Best regards!


2009/3/31 Ian Lance Taylor <iant@google.com>:
> daniel tian <daniel.xntian@gmail.com> writes:
>
>> But the question is how I make the gcc know to extend every smaller
>> mode to SImode. Now I check the MIPS port, maybe I can find some clue.
>
> Maybe PROMOTE_MODE.
>
> Ian
>


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