zephyr/arch/arm
Stephanos Ioannidis 734fa185c8 arch: arm: cortex_m: Use Thumb-1 compatible 'mov reg, imm' mnemonic
The ARM Thumb-1 instruction set, used by ARMv6-M and ARMv8-M Baseline
cores, does not have a valid encoding for "immediate-to-register move
without affecting flags" instruction (i.e. `mov reg, imm`), and the only
valid variant of immediate-to-register move instruction for it is `movs`,
which affects the flags.

Since none of the register initialisation instructions used here are
flag-sensitive in their context, this commit changes `mov` to `movs`.

This fixes the compilation errors with Clang/LLVM, which is more picky
about the `mov` mnemonic usage and prints out an "invalid instruction"
error when `mov reg, imm` is specified in Thumb-1 mode.

Note that GNU assembler implicitly converts `mov reg, imm` to `movs reg,
imm` when assembling in Thumb-1 mode.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-12-13 11:35:06 +01:00
..
core arch: arm: cortex_m: Use Thumb-1 compatible 'mov reg, imm' mnemonic 2024-12-13 11:35:06 +01:00
include kernel: arch: move arch_swap() declaration 2024-12-11 21:33:49 +01:00
CMakeLists.txt arch: arm: cmake: Correct endian in output format 2024-07-04 18:01:51 -04:00
Kconfig arch: arm: rename CPU_HAS_NXP_MPU to align with binding 2024-12-06 22:23:06 +01:00