[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH][MiNTlib] Add ColdFire information to sysinfo



On 04/02/2016 12:19, Andreas Schwab wrote:
0xFFFF wouldn't match since hi is sign-extended.

Right.

     long hi, lo;
...
       hi = (_mch & 0xffff0000) >> 16;
       lo = (_mch & 0xffff);

If the hi and lo values are supposed to be signed, they should be declared as:
short hi, lo;

Anyway, I would prefer to use unsigned types for such kind of stuff:
http://toshyp.atari.org/en/003007.html#Cookie_2C_20_MCH

--
Vincent Rivière