play/C/strange_size/i65.s.s

57 lines
1.3 KiB
ArmAsm
Raw Normal View History

2018-12-10 00:24:05 +00:00
.text
.intel_syntax noprefix
.file "i65.c"
.globl main # -- Begin function main
.p2align 4, 0x90
.type main,@function
main: # @main
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register rbp
2018-12-10 00:33:34 +00:00
sub rsp, 64
mov dword ptr [rbp - 40], 0
mov dword ptr [rbp - 36], edi
2018-12-10 00:24:05 +00:00
mov qword ptr [rbp - 64], rsi
2018-12-10 00:33:34 +00:00
movabs rax, -9223372036854775808
mov qword ptr [rbp - 32], rax
2018-12-10 00:24:05 +00:00
mov byte ptr [rbp - 24], 1
2018-12-10 00:33:34 +00:00
mov qword ptr [rbp - 16], rax
2018-12-10 00:24:05 +00:00
mov byte ptr [rbp - 8], 1
movzx eax, byte ptr [rbp - 24]
mov rcx, qword ptr [rbp - 32]
movzx edx, byte ptr [rbp - 8]
mov rsi, qword ptr [rbp - 16]
add rcx, rsi
adc rax, rdx
2018-12-10 00:33:34 +00:00
shld rax, rcx, 63
mov qword ptr [rbp - 56], rax
mov byte ptr [rbp - 48], 0
2018-12-10 00:24:05 +00:00
mov rsi, qword ptr [rbp - 32]
2018-12-10 00:33:34 +00:00
mov rdx, qword ptr [rbp - 16]
mov rcx, qword ptr [rbp - 56]
movabs rdi, offset .L.str
mov al, 0
2018-12-10 00:24:05 +00:00
call printf
xor eax, eax
2018-12-10 00:33:34 +00:00
add rsp, 64
2018-12-10 00:24:05 +00:00
pop rbp
.cfi_def_cfa rsp, 8
ret
.Lfunc_end0:
.size main, .Lfunc_end0-main
.cfi_endproc
# -- End function
.type .L.str,@object # @.str
.section .rodata.str1.1,"aMS",@progbits,1
.L.str:
2018-12-10 00:33:34 +00:00
.asciz "(%lu + %lu) >> 1 = %lu\n"
.size .L.str, 24
2018-12-10 00:24:05 +00:00
.ident "clang version 7.0.0 (tags/RELEASE_700/final)"
.section ".note.GNU-stack","",@progbits