93 lines
1.3 KiB
ArmAsm
93 lines
1.3 KiB
ArmAsm
.file "toto.c"
|
|
.text
|
|
.globl f
|
|
.type f, @function
|
|
f:
|
|
.LFB23:
|
|
.cfi_startproc
|
|
endbr64
|
|
testl %esi, %esi
|
|
jle .L1
|
|
movq %rdi, %rax
|
|
leal -1(%rsi), %edx
|
|
leaq 4(%rdi,%rdx,4), %rdx
|
|
movss .LC0(%rip), %xmm1
|
|
.L3:
|
|
movss (%rax), %xmm0
|
|
mulss %xmm0, %xmm0
|
|
movaps %xmm1, %xmm2
|
|
divss %xmm0, %xmm2
|
|
movss %xmm2, (%rax)
|
|
addq $4, %rax
|
|
cmpq %rdx, %rax
|
|
jne .L3
|
|
.L1:
|
|
ret
|
|
.cfi_endproc
|
|
.LFE23:
|
|
.size f, .-f
|
|
.globl fsum
|
|
.type fsum, @function
|
|
fsum:
|
|
.LFB24:
|
|
.cfi_startproc
|
|
endbr64
|
|
testl %esi, %esi
|
|
jle .L8
|
|
movq %rdi, %rax
|
|
leal -1(%rsi), %edx
|
|
leaq 4(%rdi,%rdx,4), %rdx
|
|
pxor %xmm1, %xmm1
|
|
movss .LC0(%rip), %xmm2
|
|
.L7:
|
|
movss (%rax), %xmm0
|
|
mulss %xmm0, %xmm0
|
|
movaps %xmm2, %xmm3
|
|
divss %xmm0, %xmm3
|
|
movss %xmm3, (%rax)
|
|
addss %xmm3, %xmm1
|
|
addq $4, %rax
|
|
cmpq %rdx, %rax
|
|
jne .L7
|
|
.L5:
|
|
movaps %xmm1, %xmm0
|
|
ret
|
|
.L8:
|
|
pxor %xmm1, %xmm1
|
|
jmp .L5
|
|
.cfi_endproc
|
|
.LFE24:
|
|
.size fsum, .-fsum
|
|
.globl main
|
|
.type main, @function
|
|
main:
|
|
.LFB25:
|
|
.cfi_startproc
|
|
endbr64
|
|
movl $0, %eax
|
|
ret
|
|
.cfi_endproc
|
|
.LFE25:
|
|
.size main, .-main
|
|
.section .rodata.cst4,"aM",@progbits,4
|
|
.align 4
|
|
.LC0:
|
|
.long 1065353216
|
|
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0"
|
|
.section .note.GNU-stack,"",@progbits
|
|
.section .note.gnu.property,"a"
|
|
.align 8
|
|
.long 1f - 0f
|
|
.long 4f - 1f
|
|
.long 5
|
|
0:
|
|
.string "GNU"
|
|
1:
|
|
.align 8
|
|
.long 0xc0000002
|
|
.long 3f - 2f
|
|
2:
|
|
.long 0x3
|
|
3:
|
|
.align 8
|
|
4:
|