10
foo.c
10
foo.c
@@ -1,10 +0,0 @@
|
|||||||
void bar();
|
|
||||||
void baz();
|
|
||||||
int foo(int b, int a) {
|
|
||||||
if (b) {
|
|
||||||
baz();
|
|
||||||
return a + 3;
|
|
||||||
}
|
|
||||||
bar();
|
|
||||||
return a + 4;
|
|
||||||
}
|
|
||||||
32
foo.s
32
foo.s
@@ -1,32 +0,0 @@
|
|||||||
.arch armv8-a
|
|
||||||
.file "foo.c"
|
|
||||||
.text
|
|
||||||
.align 2
|
|
||||||
.global foo
|
|
||||||
.type foo, %function
|
|
||||||
foo:
|
|
||||||
.LFB0:
|
|
||||||
.cfi_startproc
|
|
||||||
stp x29, x30, [sp, -32]!
|
|
||||||
.cfi_def_cfa_offset 32
|
|
||||||
.cfi_offset 29, -32
|
|
||||||
.cfi_offset 30, -24
|
|
||||||
add x29, sp, 0
|
|
||||||
.cfi_def_cfa_register 29
|
|
||||||
str x19, [sp, 16]
|
|
||||||
.cfi_offset 19, -16
|
|
||||||
mov w19, w0
|
|
||||||
bl bar
|
|
||||||
add w0, w19, 3
|
|
||||||
ldr x19, [sp, 16]
|
|
||||||
ldp x29, x30, [sp], 32
|
|
||||||
.cfi_restore 30
|
|
||||||
.cfi_restore 29
|
|
||||||
.cfi_restore 19
|
|
||||||
.cfi_def_cfa 31, 0
|
|
||||||
ret
|
|
||||||
.cfi_endproc
|
|
||||||
.LFE0:
|
|
||||||
.size foo, .-foo
|
|
||||||
.ident "GCC: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0"
|
|
||||||
.section .note.GNU-stack,"",@progbits
|
|
||||||
Reference in New Issue
Block a user