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: [M16C-ELF] : Problem with double and float data types.


> I would be interested in looking at the data sheet for this chip.  I
> didn't see which chip it was.  The thing that has me curious is the
> negative shift counts.  Can a right shift of a negative count (of
> some type (rotate?)) substitute for a left shift when the shift is
> greater than 16?

This chip (m16c/m32c) does not have separate left/right shift opcodes.
All shifts take signed counts; positive shifts one way, negative
shifts the other way.  Shifts are defined for counts in the range
-16..16.  Outside that range, they're undefined.  Experimentation has
shown that above that, counts wrap (i.e. counts are 0, 1, ..., 15, 16,
1, 2, ...).


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