[Freemint-list] ColdFire BYTEREV
Markus Fröschle
mfro at mubf.de
Thu Jan 26 08:32:26 MSK 2017
Am 26.01.2017 um 04:35 schrieb Miro Kropáček:
> Call to the all (two ;-)) ColdFire experts here:
>
> is
>
> byterev.l d0
>
> same as
>
> ror.w #8, d0
> swap d0
> ror.w #8, d0
>
Yes.
> ? And most importantly, it is usable on the FireBee? ;-)
>
Unfortunately, no.
The FireBee (MCF5474) is ISA B, byterev is only available on ISA A+ and
ISA C. You'll need an MCF54455 or similar to be able to use it. On ISA
B, you still need to do something like this:
static inline uint32_t swpl(uint32_t l)
{
return ((l & 0xff000000) >> 24) | ((l & 0x00ff0000) >> 8) |
((l & 0x0000ff00) << 8) | (l << 24);
}
More information about the Freemint-list
mailing list