Skip to content

Commit cd9ddc9

Browse files
stephanosiodkalowsk
authored andcommitted
arch: arm: cortex_a_r: Fix mrc/mcr instruction usage
The coprocessor number in ARM `mrc` and `mcr` instructions must be prefixed with `p`. GNU assembler allows specifying coprocessor number without the `p` prefix; but, LLVM assembler is more picky about this and prints out "invalid instruction" error otherwise. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent adced0c commit cd9ddc9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm/core/cortex_a_r/__aeabi_read_tp.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ SECTION_FUNC(text, __aeabi_read_tp)
1414
/*
1515
* TPIDRURW will be used as a base pointer point to TLS aera.
1616
*/
17-
mrc 15, 0, r0, c13, c0, 2
17+
mrc p15, 0, r0, c13, c0, 2
1818
bx lr

arch/arm/core/cortex_a_r/swap_helper.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ out_fp_inactive:
126126
* TPIDRURW is used as a base pointer to all
127127
* thread variables with offsets added by toolchain.
128128
*/
129-
mcr 15, 0, r0, c13, c0, 2
129+
mcr p15, 0, r0, c13, c0, 2
130130
#endif
131131

132132
#if defined(CONFIG_ARM_STORE_EXC_RETURN)

0 commit comments

Comments
 (0)