Created
November 16, 2023 17:44
-
-
Save jonathanpallant/977f16d6b0ff539273cd7a07265cedda to your computer and use it in GitHub Desktop.
Example ASM source for the 843419 errata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text | |
.balign 4096 | |
.space 4096 - 8 | |
.globl _start | |
.type _start,@function | |
_start: | |
mrs x1, tpidr_el0 | |
// An ADRP instruction, which writes to a register Rn. | |
// • This instruction must be located in memory at an address where the | |
// bottom 12 bits are equal to 0xFF8 or 0xFFC | |
adrp x0, v | |
// A load or store instruction. This must not write to Rn. | |
ldr x1, [x1, #0] | |
// A load or store instruction from the "Load/store register (unsigned | |
// immediate)" encoding class, using Rn as the base address register. | |
ldr x0, [x0, :got_lo12:v] | |
ret | |
.globl _otherfunc | |
.type _otherfunc,@function | |
_otherfunc: | |
mov x0, #0 | |
ret | |
.type v,@object | |
.section .bss | |
.globl v | |
v: | |
.word 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment