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

Re: [bluetooth-dev] Re: Porting to ARM

On Tue, 26 Sep 2000, Erwin Authried wrote:
> The only problem is the rather bad optimization with big-endian cpus
> that don't allow misaligned access (ARM). When a >=2 byte value
> is read, it is first assembled by reading/shifting the byte values in the
> cpu's byte order, finally the bytes need to be swapped again to get
> the opposite byte order. I'm not sure, but I believe it's done that way.

The swap is usually a single instruction, and an "unneeded" extra
instruction compared to the performance hit of an unaligned load (or
compared to the relatively slow bitrate of bluetooth itself even) is
Mostly Harmless..