zephyr/arch
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
..
arc arch: deprecate _current 2024-11-23 20:12:24 -05:00
arm arch: arm: cortex_m: Use Thumb-1 compatible 'mov reg, imm' mnemonic 2024-12-13 11:35:06 +01:00
arm64 Revert "arch: arm64: init xen in arch_kernel_init()" 2024-12-06 18:20:40 +01:00
common arch: common: fix copy for ramfunc region during XIP init 2024-11-06 10:19:08 -08:00
mips kernel: arch: move arch_swap() declaration 2024-12-11 21:33:49 +01:00
nios2 kernel: arch: move arch_swap() declaration 2024-12-11 21:33:49 +01:00
posix kernel: arch: move arch_swap() declaration 2024-12-11 21:33:49 +01:00
riscv arch: riscv: introduce CONFIG_RISCV_GP_PURPOSE choice 2024-11-28 12:51:09 +01:00
sparc SPARC: Add support for single-vector trapping (SVT) 2024-11-25 21:53:55 +01:00
x86 kernel: arch: move arch_swap() declaration 2024-12-11 21:33:49 +01:00
xtensa xtensa: optimize syscall helper functions 2024-12-04 14:16:15 -05:00
archs.yml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
CMakeLists.txt cmake: enable -Wshadow partially for in-tree code 2023-08-22 11:39:58 +02:00
Kconfig arch: local ISR table declaration: Remove experimental label 2024-12-05 12:29:58 +01:00
Kconfig.v1 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
Kconfig.v2 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00