mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
arm64: Fix add immediate value irregular behavior
The ARM64 instruction ADD has a 12-bit limit (0 - 4095) for immediate values, but here we try to use a symbolic address (.Linitparms) as an immediate value, which does not comply with the ARM64 instruction set rules. Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
dd8819e517
commit
4c755c7401
@@ -392,7 +392,7 @@ arm64_data_initialize:
|
|||||||
/* Zero BSS */
|
/* Zero BSS */
|
||||||
|
|
||||||
adrp x0, .Linitparms
|
adrp x0, .Linitparms
|
||||||
add x0, x0, .Linitparms
|
add x0, x0, #:lo12:.Linitparms
|
||||||
ldp x1, x2, [x0], #8
|
ldp x1, x2, [x0], #8
|
||||||
|
|
||||||
mov x0, #0
|
mov x0, #0
|
||||||
|
|||||||
Reference in New Issue
Block a user