Thanks.
Following is result of "cc -S":
.text .file "foo.c" .globl main // -- Begin function main .p2align 2 .type main,@function main: // @main // %bb.0: sub sp, sp, #32 // =32 stp x29, x30, [sp, #16] // 16-byte Folded Spill add x29, sp, #16 // =16 mov x8, #0 mov x0, x8 mov w9, #0 mov w1, w9 mov x2, x8 stur w9, [x29, #-4] // 4-byte Folded Spill bl wait3 ldur w9, [x29, #-4] // 4-byte Folded Reload mov w0, w9 ldp x29, x30, [sp, #16] // 16-byte Folded Reload add sp, sp, #32 // =32 ret .Lfunc_end0: .size main, .Lfunc_end0-main // -- End function .p2align 2 // -- Begin function wait3 .type wait3,@function wait3: // @wait3 // %bb.0: sub sp, sp, #48 // =48 stp x29, x30, [sp, #32] // 16-byte Folded Spill add x29, sp, #32 // =32 mov w8, #-1 stur x0, [x29, #-8] stur w1, [x29, #-12] str x2, [sp, #8] ldur x1, [x29, #-8] ldur w2, [x29, #-12] ldr x3, [sp, #8] mov w0, w8 bl wait4 ldp x29, x30, [sp, #32] // 16-byte Folded Reload add sp, sp, #48 // =48 ret .Lfunc_end1: .size wait3, .Lfunc_end1-wait3 // -- End function
.ident "clang version 9.0.0 (tags/RELEASE_900/final)" .section ".note.GNU-stack","",@progbits
Thanks.
Following is result of "cc -S":
.text
// -- End function
// -- End function
.file "foo.c"
.globl main // -- Begin function main
.p2align 2
.type main,@function
main: // @main
// %bb.0:
sub sp, sp, #32 // =32
stp x29, x30, [sp, #16] // 16-byte Folded Spill
add x29, sp, #16 // =16
mov x8, #0
mov x0, x8
mov w9, #0
mov w1, w9
mov x2, x8
stur w9, [x29, #-4] // 4-byte Folded Spill
bl wait3
ldur w9, [x29, #-4] // 4-byte Folded Reload
mov w0, w9
ldp x29, x30, [sp, #16] // 16-byte Folded Reload
add sp, sp, #32 // =32
ret
.Lfunc_end0:
.size main, .Lfunc_end0-main
.p2align 2 // -- Begin function wait3
.type wait3,@function
wait3: // @wait3
// %bb.0:
sub sp, sp, #48 // =48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add x29, sp, #32 // =32
mov w8, #-1
stur x0, [x29, #-8]
stur w1, [x29, #-12]
str x2, [sp, #8]
ldur x1, [x29, #-8]
ldur w2, [x29, #-12]
ldr x3, [sp, #8]
mov w0, w8
bl wait4
ldp x29, x30, [sp, #32] // 16-byte Folded Reload
add sp, sp, #48 // =48
ret
.Lfunc_end1:
.size wait3, .Lfunc_end1-wait3
.ident "clang version 9.0.0 (tags/RELEASE_ 900/final) " GNU-stack" ,"",@progbits
.section ".note.