You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
600 B
38 lines
600 B
.arch armv8-a
|
|
.text
|
|
.global main
|
|
.type main, %function
|
|
.p2align 3
|
|
main:
|
|
sub sp, sp, #272
|
|
adrp x19, NUDT_GLOBAL_VAR_a
|
|
add x19, x19, :lo12:NUDT_GLOBAL_VAR_a
|
|
ldr w22, [x19]
|
|
adrp x20, NUDT_GLOBAL_VAR_b
|
|
add x20, x20, :lo12:NUDT_GLOBAL_VAR_b
|
|
ldr w23, [x20]
|
|
add w21, w22, w23
|
|
str w21, [sp]
|
|
b bb_1
|
|
bb_1:
|
|
ldr w24, [sp]
|
|
mov w0, w24
|
|
add sp, sp, #272
|
|
ret
|
|
|
|
|
|
.section .data
|
|
.p2align 3
|
|
.global NUDT_GLOBAL_VAR_a
|
|
.type NUDT_GLOBAL_VAR_a, %object
|
|
NUDT_GLOBAL_VAR_a:
|
|
.word 1
|
|
|
|
.section .data
|
|
.p2align 3
|
|
.global NUDT_GLOBAL_VAR_b
|
|
.type NUDT_GLOBAL_VAR_b, %object
|
|
NUDT_GLOBAL_VAR_b:
|
|
.word 2
|
|
|