(base) arm64@manet % uname -m>
arm64
(base) arm64@manet % gcc -O -S sample1.c>
(base) arm64@manet % cat sample1.s>
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 12, 0 sdk_version 12, 3
.globl _sample1 ; -- Begin function sample1
.p2align 2
_sample1: ; @sample1
.cfi_startproc
; %bb.0:
mov w0, #5
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
(base) arm64@manet % arch -x86_64 /bin/zsh>
Restored session: 2022年 5月31日 火曜日 17時01分34秒 JST
(base) x86_64@manet % uname -m>
x86_64
(base) x86_64@manet % gcc -O -S sample1.c>
(base) x86_64@manet % cat sample1.s>
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 12, 0 sdk_version 12, 3
.globl _sample1 ## -- Begin function sample1
.p2align 4, 0x90
_sample1: ## @sample1
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl $5, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
|