lua-users home
lua-l archive

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




On Wed, Nov 16, 2022 at 12:34 AM bil til <biltil52@gmail.com> wrote:
Sorry, I have to protest here... Cortex M4/M7 controllers are the
state-of-the-art embedded ARM processors, but they of course can NOT
do misaligned accesses - they would IMMEDIATLY run into some hardware
fault ... (at least they do THIS, so you can somehow track quite
easily where it happened).

I was more thinking of Cortex A family processors, which you find a lot in larger embedded systems with fancier user interfaces. They can do unaligned accesses. Cortex M does not AFAIK. It depends on what you call embedded, a machine with a control panel that sports a Cortex A family processor is still an embedded system.

The products I'm working on use Cortex M family processors for real time control, and Cortex A family processors to provide the operator with a touch user interface, implement network interfaces, etc.

Compilers for ARM define a macro that code can use to detect support for unaligned accesses, it's __ARM_FEATURE_UNALIGNED. Very useful when you're writing code implementing cryptographic primitives or other performance critical code.

--