arm: Replace deprecated asm instructions for ARMv8 AArch32
commit1d8ade50e8c5d9727a1f5a8d5af2f5d643a812d3
authorValentin Gehrke <valentin.gehrke@kernkonzept.com>
Thu, 18 Jul 2024 13:06:48 +0000 (18 15:06 +0200)
committerWaldemar Brodkorb <wbx@openadk.org>
Fri, 19 Jul 2024 06:15:36 +0000 (19 08:15 +0200)
treeb4a9393392369f4d6eae71877a1912cc7806d103
parent903da45dde43836e35a295226c5b1efccd413c08
arm: Replace deprecated asm instructions for ARMv8 AArch32

ARMv8 has particular restrictions which coprocessor can be used and as
such these instructions, which were likely used for backwards
compatibility purposes, cannot be used on ARMv8. We solve this by
checking for ARMv8 and then using the corresponding mnemonics which were
placed in comments alongside the instructions causing issues.

Fixes the following errors:

.../setjmp.S:59:6: error: invalid operand for instruction
 stc p11, cr8, [r12], #68
     ^
.../setjmp.S:62:6: error: invalid operand for instruction
 mrc p10, 7, r2, cr1, cr0, 0
     ^
.../__longjmp.S:69:6: error: invalid operand for instruction
 ldc p11, cr8, [r12], #68
     ^
.../__longjmp.S:73:6: error: invalid operand for instruction
 mcr p10, 7, r1, cr1, cr0, 0
     ^

Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
libc/sysdeps/linux/arm/__longjmp.S
libc/sysdeps/linux/arm/setjmp.S