x86
stringlengths 122
3.84M
| arm
stringlengths 122
16.1M
| file
stringlengths 19
207
| source
stringclasses 2
values |
---|---|---|---|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function write16
_write16: ## @write16
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movl %esi, %ebx
movq %rdi, %r14
movzbl %bl, %esi
callq _buf_write
sarl $8, %ebx
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp _buf_write ## TAILCALL
.cfi_endproc
## -- End function
.no_dead_strip _write16
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function write16
_write16: ; @write16
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x1
mov x20, x0
and w1, w1, #0xff
bl _buf_write
asr w1, w19, #8
mov x0, x20
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _buf_write
.cfi_endproc
; -- End function
.no_dead_strip _write16
.subsections_via_symbols
|
AnghaBench/8cc/extr_encoding.c_write16.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function write32
_write32: ## @write32
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movl %esi, %ebx
movq %rdi, %r14
movzwl %bx, %esi
callq _write16
sarl $16, %ebx
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp _write16 ## TAILCALL
.cfi_endproc
## -- End function
.no_dead_strip _write32
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function write32
_write32: ; @write32
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x1
mov x20, x0
and w1, w1, #0xffff
bl _write16
asr w1, w19, #16
mov x0, x20
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _write16
.cfi_endproc
; -- End function
.no_dead_strip _write32
.subsections_via_symbols
|
AnghaBench/8cc/extr_encoding.c_write32.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _write_utf8 ## -- Begin function write_utf8
.p2align 4, 0x90
_write_utf8: ## @write_utf8
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movl %esi, %ebx
movq %rdi, %r14
cmpl $127, %esi
jle LBB0_4
## %bb.1:
cmpl $2047, %ebx ## imm = 0x7FF
ja LBB0_5
## %bb.2:
movl %ebx, %esi
shrl $6, %esi
orl $192, %esi
jmp LBB0_3
LBB0_5:
cmpl $65535, %ebx ## imm = 0xFFFF
ja LBB0_8
## %bb.6:
movl %ebx, %esi
shrl $12, %esi
orl $224, %esi
jmp LBB0_7
LBB0_8:
cmpl $2097151, %ebx ## imm = 0x1FFFFF
ja LBB0_10
## %bb.9:
movl %ebx, %esi
shrl $18, %esi
orl $240, %esi
movq %r14, %rdi
callq _buf_write
movl %ebx, %esi
shrl $12, %esi
andl $63, %esi
orl $128, %esi
LBB0_7:
movq %r14, %rdi
callq _buf_write
movl %ebx, %esi
shrl $6, %esi
andl $63, %esi
orl $128, %esi
LBB0_3:
movq %r14, %rdi
callq _buf_write
andl $63, %ebx
orl $128, %ebx
LBB0_4:
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp _buf_write ## TAILCALL
LBB0_10:
leaq L_.str(%rip), %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp _error ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "invalid UCS character: \\U%08x"
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _write_utf8 ; -- Begin function write_utf8
.p2align 2
_write_utf8: ; @write_utf8
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x1
mov x20, x0
cmp w1, #127
b.gt LBB0_2
; %bb.1:
mov x0, x20
mov x1, x19
b LBB0_9
LBB0_2:
cmp w19, #2047
b.hi LBB0_4
; %bb.3:
lsr w8, w19, #6
orr w1, w8, #0xc0
mov x0, x20
bl _buf_write
mov w1, #128
bfxil w1, w19, #0, #6
mov x0, x20
b LBB0_9
LBB0_4:
lsr w8, w19, #16
cbnz w8, LBB0_6
; %bb.5:
lsr w8, w19, #12
orr w1, w8, #0xe0
mov x0, x20
bl _buf_write
mov w21, #128
b LBB0_8
LBB0_6:
lsr w8, w19, #21
cbnz w8, LBB0_10
; %bb.7:
lsr w8, w19, #18
orr w1, w8, #0xf0
mov x0, x20
bl _buf_write
mov w21, #128
mov w1, #128
bfxil w1, w19, #12, #6
mov x0, x20
bl _buf_write
LBB0_8:
mov w1, #128
bfxil w1, w19, #6, #6
mov x0, x20
bl _buf_write
bfxil w21, w19, #0, #6
mov x0, x20
mov x1, x21
LBB0_9:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _buf_write
LBB0_10:
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
mov x1, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _error
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "invalid UCS character: \\U%08x"
.subsections_via_symbols
|
AnghaBench/8cc/extr_encoding.c_write_utf8.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function print_error
_print_error: ## @print_error
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $24, %rsp
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %r8d, -44(%rbp) ## 4-byte Spill
movq %rcx, -56(%rbp) ## 8-byte Spill
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq _stderr@GOTPCREL(%rip), %r15
movl (%r15), %r14d
movl %r14d, %edi
callq _fileno
movl %eax, %edi
callq _isatty
testq %rax, %rax
leaq L_.str.1(%rip), %rax
leaq L_.str(%rip), %rsi
cmoveq %rax, %rsi
movl %r14d, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq _fprintf
movl (%r15), %edi
leaq L_.str.2(%rip), %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq _fprintf
movl (%r15), %edi
movq -56(%rbp), %rsi ## 8-byte Reload
movl -44(%rbp), %edx ## 4-byte Reload
callq _vfprintf
movl (%r15), %edi
leaq L_.str.3(%rip), %rsi
xorl %eax, %eax
addq $24, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _fprintf ## TAILCALL
.cfi_endproc
## -- End function
.comm _stderr,4,2 ## @stderr
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "\033[1;31m[%s]\033[0m "
L_.str.1: ## @.str.1
.asciz "[%s] "
L_.str.2: ## @.str.2
.asciz "%s: %s: "
L_.str.3: ## @.str.3
.asciz "\n"
.no_dead_strip _print_error
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function print_error
_print_error: ; @print_error
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x26, x25, [sp, #16] ; 16-byte Folded Spill
stp x24, x23, [sp, #32] ; 16-byte Folded Spill
stp x22, x21, [sp, #48] ; 16-byte Folded Spill
stp x20, x19, [sp, #64] ; 16-byte Folded Spill
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
.cfi_offset w25, -72
.cfi_offset w26, -80
mov x19, x4
mov x20, x3
mov x21, x2
mov x22, x1
mov x23, x0
Lloh0:
adrp x25, _stderr@GOTPAGE
Lloh1:
ldr x25, [x25, _stderr@GOTPAGEOFF]
ldr w24, [x25]
mov x0, x24
bl _fileno
bl _isatty
Lloh2:
adrp x8, l_.str@PAGE
Lloh3:
add x8, x8, l_.str@PAGEOFF
Lloh4:
adrp x9, l_.str.1@PAGE
Lloh5:
add x9, x9, l_.str.1@PAGEOFF
cmp x0, #0
csel x1, x9, x8, eq
str x21, [sp]
mov x0, x24
bl _fprintf
ldr w0, [x25]
stp x23, x22, [sp]
Lloh6:
adrp x1, l_.str.2@PAGE
Lloh7:
add x1, x1, l_.str.2@PAGEOFF
bl _fprintf
ldr w0, [x25]
mov x1, x20
mov x2, x19
bl _vfprintf
ldr w0, [x25]
Lloh8:
adrp x1, l_.str.3@PAGE
Lloh9:
add x1, x1, l_.str.3@PAGEOFF
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
ldp x20, x19, [sp, #64] ; 16-byte Folded Reload
ldp x22, x21, [sp, #48] ; 16-byte Folded Reload
ldp x24, x23, [sp, #32] ; 16-byte Folded Reload
ldp x26, x25, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #96
b _fprintf
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpLdrGot Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _stderr,4,2 ; @stderr
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "\033[1;31m[%s]\033[0m "
l_.str.1: ; @.str.1
.asciz "[%s] "
l_.str.2: ; @.str.2
.asciz "%s: %s: "
l_.str.3: ; @.str.3
.asciz "\n"
.no_dead_strip _print_error
.subsections_via_symbols
|
AnghaBench/8cc/extr_error.c_print_error.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _token_pos ## -- Begin function token_pos
.p2align 4, 0x90
_token_pos: ## @token_pos
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq 8(%rdi), %rax
testq %rax, %rax
je LBB0_1
## %bb.2:
movq (%rax), %rax
testq %rax, %rax
leaq L_.str(%rip), %rsi
cmovneq %rax, %rsi
movl (%rdi), %ecx
movl 4(%rdi), %edx
leaq L_.str.1(%rip), %rdi
popq %rbp
jmp _format ## TAILCALL
LBB0_1:
leaq L_.str(%rip), %rax
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "(unknown)"
L_.str.1: ## @.str.1
.asciz "%s:%d:%d"
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _token_pos ; -- Begin function token_pos
.p2align 2
_token_pos: ; @token_pos
.cfi_startproc
; %bb.0:
ldr x8, [x0, #8]
cbz x8, LBB0_2
; %bb.1:
ldr x8, [x8]
Lloh0:
adrp x9, l_.str@PAGE
Lloh1:
add x9, x9, l_.str@PAGEOFF
cmp x8, #0
csel x1, x9, x8, eq
ldp w3, w2, [x0]
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
b _format
LBB0_2:
Lloh4:
adrp x0, l_.str@PAGE
Lloh5:
add x0, x0, l_.str@PAGEOFF
ret
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh4, Lloh5
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "(unknown)"
l_.str.1: ; @.str.1
.asciz "%s:%d:%d"
.subsections_via_symbols
|
AnghaBench/8cc/extr_error.c_token_pos.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function close_file
_close_file: ## @close_file
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq (%rdi), %rdi
testq %rdi, %rdi
je LBB0_1
## %bb.2:
popq %rbp
jmp _fclose ## TAILCALL
LBB0_1:
popq %rbp
retq
.cfi_endproc
## -- End function
.no_dead_strip _close_file
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function close_file
_close_file: ; @close_file
.cfi_startproc
; %bb.0:
ldr x0, [x0]
cbz x0, LBB0_2
; %bb.1:
b _fclose
LBB0_2:
ret
.cfi_endproc
; -- End function
.no_dead_strip _close_file
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_close_file.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _current_file ## -- Begin function current_file
.p2align 4, 0x90
_current_file: ## @current_file
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq _files@GOTPCREL(%rip), %rax
movl (%rax), %edi
popq %rbp
jmp _vec_tail ## TAILCALL
.cfi_endproc
## -- End function
.comm _files,4,2 ## @files
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _current_file ; -- Begin function current_file
.p2align 2
_current_file: ; @current_file
.cfi_startproc
; %bb.0:
Lloh0:
adrp x8, _files@GOTPAGE
Lloh1:
ldr x8, [x8, _files@GOTPAGEOFF]
Lloh2:
ldr w0, [x8]
b _vec_tail
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _files,4,2 ; @files
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_current_file.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function get
_get: ## @get
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq _files@GOTPCREL(%rip), %rax
movl (%rax), %edi
callq _vec_tail
movq %rax, %rbx
movq (%rax), %rax
testq %rax, %rax
je LBB0_2
## %bb.1:
movq 8(%rbx), %rcx
leaq -1(%rax), %rdx
movq %rdx, (%rbx)
movl -4(%rcx,%rax,4), %eax
cmpl $10, %eax
je LBB0_6
jmp LBB0_7
LBB0_2:
cmpq $0, 24(%rbx)
je LBB0_4
## %bb.3:
movq %rbx, %rdi
callq _readc_file
cmpl $10, %eax
jne LBB0_7
LBB0_6:
incl 20(%rbx)
movl $1, 16(%rbx)
jmp LBB0_9
LBB0_4:
movq %rbx, %rdi
callq _readc_string
cmpl $10, %eax
je LBB0_6
LBB0_7:
movq _EOF@GOTPCREL(%rip), %rcx
cmpl (%rcx), %eax
je LBB0_9
## %bb.8:
incl 16(%rbx)
LBB0_9:
addq $8, %rsp
popq %rbx
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _files,4,2 ## @files
.comm _EOF,4,2 ## @EOF
.no_dead_strip _get
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function get
_get: ; @get
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
Lloh0:
adrp x8, _files@GOTPAGE
Lloh1:
ldr x8, [x8, _files@GOTPAGEOFF]
Lloh2:
ldr w0, [x8]
bl _vec_tail
mov x19, x0
ldr x8, [x0]
cbz x8, LBB0_2
; %bb.1:
ldr x9, [x19, #8]
sub x8, x8, #1
str x8, [x19]
ldr w0, [x9, x8, lsl #2]
cmp w0, #10
b.eq LBB0_4
b LBB0_6
LBB0_2:
ldr x8, [x19, #24]
cbz x8, LBB0_5
; %bb.3:
mov x0, x19
bl _readc_file
cmp w0, #10
b.ne LBB0_6
LBB0_4:
ldr w8, [x19, #20]
add w8, w8, #1
mov w9, #1
stp w9, w8, [x19, #16]
b LBB0_8
LBB0_5:
mov x0, x19
bl _readc_string
cmp w0, #10
b.eq LBB0_4
LBB0_6:
Lloh3:
adrp x8, _EOF@GOTPAGE
Lloh4:
ldr x8, [x8, _EOF@GOTPAGEOFF]
Lloh5:
ldr w8, [x8]
cmp w0, w8
b.eq LBB0_8
; %bb.7:
ldr w8, [x19, #16]
add w8, w8, #1
str w8, [x19, #16]
LBB0_8:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpLdrGotLdr Lloh3, Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _files,4,2 ; @files
.comm _EOF,4,2 ; @EOF
.no_dead_strip _get
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_get.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _input_position ## -- Begin function input_position
.p2align 4, 0x90
_input_position: ## @input_position
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq _files@GOTPCREL(%rip), %rbx
movl (%rbx), %edi
callq _vec_len
testq %rax, %rax
je LBB0_1
## %bb.2:
movl (%rbx), %edi
callq _vec_tail
movl 8(%rax), %esi
movl (%rax), %ecx
movl 4(%rax), %edx
leaq L_.str.1(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _format ## TAILCALL
LBB0_1:
leaq L_.str(%rip), %rax
addq $8, %rsp
popq %rbx
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _files,4,2 ## @files
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "(unknown)"
L_.str.1: ## @.str.1
.asciz "%s:%d:%d"
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _input_position ; -- Begin function input_position
.p2align 2
_input_position: ; @input_position
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
Lloh0:
adrp x19, _files@GOTPAGE
Lloh1:
ldr x19, [x19, _files@GOTPAGEOFF]
ldr w0, [x19]
bl _vec_len
cbz x0, LBB0_2
; %bb.1:
ldr w0, [x19]
bl _vec_tail
ldp w2, w1, [x0, #4]
ldr w3, [x0]
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _format
LBB0_2:
Lloh4:
adrp x0, l_.str@PAGE
Lloh5:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.loh AdrpLdrGot Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _files,4,2 ; @files
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "(unknown)"
l_.str.1: ; @.str.1
.asciz "%s:%d:%d"
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_input_position.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _make_file ## -- Begin function make_file
.p2align 4, 0x90
_make_file: ## @make_file
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rsi, %r14
movq %rdi, %r15
movl $1, %edi
movl $32, %esi
callq _calloc
movq %rax, %rbx
movq %r15, 24(%rax)
movq %r14, (%rax)
movabsq $4294967297, %rax ## imm = 0x100000001
movq %rax, 8(%rbx)
movq %r15, %rdi
callq _fileno
leaq -32(%rbp), %rsi
movl %eax, %edi
callq _fstat
cmpl $-1, %eax
jne LBB0_2
## %bb.1:
movq _errno@GOTPCREL(%rip), %rax
movl (%rax), %edi
callq _strerror
leaq L_.str(%rip), %rdi
movl %eax, %esi
callq _error
LBB0_2:
movl -32(%rbp), %eax
movl %eax, 16(%rbx)
movq %rbx, %rax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "fstat failed: %s"
.comm _errno,4,2 ## @errno
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _make_file ; -- Begin function make_file
.p2align 2
_make_file: ; @make_file
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x20, x1
mov x21, x0
mov w0, #1
mov w1, #32
bl _calloc
mov x19, x0
str x21, [x0, #24]
str x20, [x0]
movi.2s v0, #1
str d0, [x0, #8]
mov x0, x21
bl _fileno
add x1, sp, #8
bl _fstat
cmn w0, #1
b.ne LBB0_2
; %bb.1:
Lloh0:
adrp x8, _errno@GOTPAGE
Lloh1:
ldr x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
ldr w0, [x8]
bl _strerror
mov x1, x0
Lloh3:
adrp x0, l_.str@PAGE
Lloh4:
add x0, x0, l_.str@PAGEOFF
bl _error
LBB0_2:
ldr w8, [sp, #8]
str w8, [x19, #16]
mov x0, x19
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
ret
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "fstat failed: %s"
.comm _errno,4,2 ; @errno
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_make_file.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _make_file_string ## -- Begin function make_file_string
.p2align 4, 0x90
_make_file_string: ## @make_file_string
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movl $1, %edi
movl $16, %esi
callq _calloc
movabsq $4294967297, %rcx ## imm = 0x100000001
movq %rcx, (%rax)
movq %rbx, 8(%rax)
addq $8, %rsp
popq %rbx
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _make_file_string ; -- Begin function make_file_string
.p2align 2
_make_file_string: ; @make_file_string
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
mov w0, #1
mov w1, #16
bl _calloc
movi.2s v0, #1
str d0, [x0]
str x19, [x0, #8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_make_file_string.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _readc ## -- Begin function readc
.p2align 4, 0x90
_readc: ## @readc
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq _EOF@GOTPCREL(%rip), %r14
movq _files@GOTPCREL(%rip), %r15
.p2align 4, 0x90
LBB0_1: ## =>This Inner Loop Header: Depth=1
xorl %eax, %eax
callq _get
movl %eax, %ebx
cmpl (%r14), %eax
jne LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl (%r15), %edi
callq _vec_len
cmpl $1, %eax
je LBB0_7
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl (%r15), %edi
callq _vec_pop
movl %eax, %edi
callq _close_file
jmp LBB0_1
.p2align 4, 0x90
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
cmpl $92, %ebx
jne LBB0_7
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
xorl %eax, %eax
callq _get
cmpl $10, %eax
je LBB0_1
## %bb.6:
movl %eax, %edi
callq _unreadc
LBB0_7:
movl %ebx, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _EOF,4,2 ## @EOF
.comm _files,4,2 ## @files
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _readc ; -- Begin function readc
.p2align 2
_readc: ; @readc
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
Lloh0:
adrp x20, _EOF@GOTPAGE
Lloh1:
ldr x20, [x20, _EOF@GOTPAGEOFF]
Lloh2:
adrp x21, _files@GOTPAGE
Lloh3:
ldr x21, [x21, _files@GOTPAGEOFF]
LBB0_1: ; =>This Inner Loop Header: Depth=1
bl _get
mov x19, x0
ldr w8, [x20]
cmp w0, w8
b.ne LBB0_4
; %bb.2: ; in Loop: Header=BB0_1 Depth=1
ldr w0, [x21]
bl _vec_len
cmp w0, #1
b.eq LBB0_7
; %bb.3: ; in Loop: Header=BB0_1 Depth=1
ldr w0, [x21]
bl _vec_pop
bl _close_file
b LBB0_1
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
cmp w19, #92
b.ne LBB0_7
; %bb.5: ; in Loop: Header=BB0_1 Depth=1
bl _get
cmp w0, #10
b.eq LBB0_1
; %bb.6:
bl _unreadc
LBB0_7:
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
ret
.loh AdrpLdrGot Lloh2, Lloh3
.loh AdrpLdrGot Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _EOF,4,2 ; @EOF
.comm _files,4,2 ; @files
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_readc.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function readc_file
_readc_file: ## @readc_file
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movq %rdi, %r14
movl 4(%rdi), %edi
callq _getc
movl %eax, %ebx
movq _EOF@GOTPCREL(%rip), %rax
cmpl (%rax), %ebx
jne LBB0_2
## %bb.1:
movsbl (%r14), %eax
cmpl %eax, %ebx
movl $10, %ecx
cmovel %ebx, %ecx
cmpl $10, %eax
cmovnel %ecx, %ebx
jmp LBB0_5
LBB0_2:
cmpl $13, %ebx
jne LBB0_5
## %bb.3:
movl 4(%r14), %edi
callq _getc
movl $10, %ebx
cmpl $10, %eax
je LBB0_5
## %bb.4:
movl 4(%r14), %esi
movl %eax, %edi
callq _ungetc
LBB0_5:
movb %bl, (%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _EOF,4,2 ## @EOF
.no_dead_strip _readc_file
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function readc_file
_readc_file: ; @readc_file
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w0, [x0, #4]
bl _getc
Lloh0:
adrp x8, _EOF@GOTPAGE
Lloh1:
ldr x8, [x8, _EOF@GOTPAGEOFF]
Lloh2:
ldr w8, [x8]
cmp w0, w8
b.ne LBB0_2
; %bb.1:
ldrsb w8, [x19]
cmp w0, w8
ccmp w8, #10, #4, ne
mov w8, #10
csel w0, w0, w8, eq
b LBB0_5
LBB0_2:
cmp w0, #13
b.ne LBB0_5
; %bb.3:
ldr w0, [x19, #4]
bl _getc
cmp w0, #10
b.eq LBB0_5
; %bb.4:
ldr w1, [x19, #4]
bl _ungetc
mov w0, #10
LBB0_5:
strb w0, [x19]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _EOF,4,2 ; @EOF
.no_dead_strip _readc_file
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_readc_file.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function readc_string
_readc_string: ## @readc_string
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq (%rdi), %rcx
movb (%rcx), %al
cmpb $13, %al
je LBB0_3
## %bb.1:
testb %al, %al
jne LBB0_5
## %bb.2:
movb 8(%rdi), %cl
movq _EOF@GOTPCREL(%rip), %rax
movsbl (%rax), %edx
cmpb %dl, %cl
movl $10, %eax
cmovel %edx, %eax
cmpb $10, %cl
cmovel %edx, %eax
jmp LBB0_6
LBB0_3:
leaq 1(%rcx), %rax
movq %rax, (%rdi)
movl $10, %eax
cmpb $10, 1(%rcx)
jne LBB0_6
## %bb.4:
addq $2, %rcx
movq %rcx, (%rdi)
jmp LBB0_6
LBB0_5:
leaq 1(%rcx), %rax
movq %rax, (%rdi)
movsbl (%rcx), %eax
LBB0_6:
movb %al, 8(%rdi)
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _EOF,1,0 ## @EOF
.no_dead_strip _readc_string
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function readc_string
_readc_string: ; @readc_string
.cfi_startproc
; %bb.0:
ldr x8, [x0]
ldrb w9, [x8]
cmp w9, #13
b.eq LBB0_3
; %bb.1:
cbnz w9, LBB0_6
; %bb.2:
Lloh0:
adrp x8, _EOF@GOTPAGE
Lloh1:
ldr x8, [x8, _EOF@GOTPAGEOFF]
ldrb w9, [x0, #8]
Lloh2:
ldrsb w8, [x8]
cmp w9, w8, uxtb
ccmp w9, #10, #4, ne
mov w9, #10
csel w8, w8, w9, eq
b LBB0_7
LBB0_3:
add x9, x8, #1
str x9, [x0]
ldrb w9, [x8, #1]
cmp w9, #10
b.ne LBB0_5
; %bb.4:
add x8, x8, #2
str x8, [x0]
LBB0_5:
mov w8, #10
b LBB0_7
LBB0_6:
add x9, x8, #1
str x9, [x0]
ldrsb w8, [x8]
LBB0_7:
strb w8, [x0, #8]
mov x0, x8
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _EOF,1,0 ; @EOF
.no_dead_strip _readc_string
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_readc_string.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _stream_depth ## -- Begin function stream_depth
.p2align 4, 0x90
_stream_depth: ## @stream_depth
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq _files@GOTPCREL(%rip), %rax
movl (%rax), %edi
popq %rbp
jmp _vec_len ## TAILCALL
.cfi_endproc
## -- End function
.comm _files,4,2 ## @files
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _stream_depth ; -- Begin function stream_depth
.p2align 2
_stream_depth: ; @stream_depth
.cfi_startproc
; %bb.0:
Lloh0:
adrp x8, _files@GOTPAGE
Lloh1:
ldr x8, [x8, _files@GOTPAGEOFF]
Lloh2:
ldr w0, [x8]
b _vec_len
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _files,4,2 ; @files
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_stream_depth.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _stream_push ## -- Begin function stream_push
.p2align 4, 0x90
_stream_push: ## @stream_push
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, %rsi
movq _files@GOTPCREL(%rip), %rax
movl (%rax), %edi
popq %rbp
jmp _vec_push ## TAILCALL
.cfi_endproc
## -- End function
.comm _files,4,2 ## @files
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _stream_push ; -- Begin function stream_push
.p2align 2
_stream_push: ; @stream_push
.cfi_startproc
; %bb.0:
mov x1, x0
Lloh0:
adrp x8, _files@GOTPAGE
Lloh1:
ldr x8, [x8, _files@GOTPAGEOFF]
Lloh2:
ldr w0, [x8]
b _vec_push
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _files,4,2 ; @files
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_stream_push.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _stream_stash ## -- Begin function stream_stash
.p2align 4, 0x90
_stream_stash: ## @stream_stash
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movq %rdi, %rbx
movq _stashed@GOTPCREL(%rip), %rax
movl (%rax), %edi
movq _files@GOTPCREL(%rip), %r14
movl (%r14), %esi
callq _vec_push
movq %rbx, %rdi
callq _make_vector1
movl %eax, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _stashed,4,2 ## @stashed
.comm _files,4,2 ## @files
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _stream_stash ; -- Begin function stream_stash
.p2align 2
_stream_stash: ; @stream_stash
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
Lloh0:
adrp x8, _stashed@GOTPAGE
Lloh1:
ldr x8, [x8, _stashed@GOTPAGEOFF]
Lloh2:
ldr w0, [x8]
Lloh3:
adrp x20, _files@GOTPAGE
Lloh4:
ldr x20, [x20, _files@GOTPAGEOFF]
ldr w1, [x20]
bl _vec_push
mov x0, x19
bl _make_vector1
str w0, [x20]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.loh AdrpLdrGot Lloh3, Lloh4
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _stashed,4,2 ; @stashed
.comm _files,4,2 ; @files
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_stream_stash.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _stream_unstash ## -- Begin function stream_unstash
.p2align 4, 0x90
_stream_unstash: ## @stream_unstash
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq _stashed@GOTPCREL(%rip), %rax
movl (%rax), %edi
callq _vec_pop
movq _files@GOTPCREL(%rip), %rcx
movl %eax, (%rcx)
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _stashed,4,2 ## @stashed
.comm _files,4,2 ## @files
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _stream_unstash ; -- Begin function stream_unstash
.p2align 2
_stream_unstash: ; @stream_unstash
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
Lloh0:
adrp x8, _stashed@GOTPAGE
Lloh1:
ldr x8, [x8, _stashed@GOTPAGEOFF]
Lloh2:
ldr w0, [x8]
bl _vec_pop
Lloh3:
adrp x8, _files@GOTPAGE
Lloh4:
ldr x8, [x8, _files@GOTPAGEOFF]
Lloh5:
str w0, [x8]
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
ret
.loh AdrpLdrGotStr Lloh3, Lloh4, Lloh5
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _stashed,4,2 ; @stashed
.comm _files,4,2 ; @files
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_stream_unstash.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _unreadc ## -- Begin function unreadc
.p2align 4, 0x90
_unreadc: ## @unreadc
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movq _EOF@GOTPCREL(%rip), %rax
cmpl %edi, (%rax)
je LBB0_4
## %bb.1:
movl %edi, %r14d
movq _files@GOTPCREL(%rip), %rax
movl (%rax), %edi
callq _vec_tail
movq %rax, %rbx
xorl %edi, %edi
cmpl $2, (%rax)
setb %dil
callq _assert
movq 8(%rbx), %rax
movslq (%rbx), %rcx
leal 1(%rcx), %edx
movl %edx, (%rbx)
movl %r14d, (%rax,%rcx,4)
cmpl $10, %r14d
jne LBB0_3
## %bb.2:
movl $1, 16(%rbx)
decl 20(%rbx)
jmp LBB0_4
LBB0_3:
decl 16(%rbx)
LBB0_4:
popq %rbx
popq %r14
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _EOF,4,2 ## @EOF
.comm _files,4,2 ## @files
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _unreadc ; -- Begin function unreadc
.p2align 2
_unreadc: ; @unreadc
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
Lloh0:
adrp x8, _EOF@GOTPAGE
Lloh1:
ldr x8, [x8, _EOF@GOTPAGEOFF]
Lloh2:
ldr w8, [x8]
cmp w8, w0
b.eq LBB0_4
; %bb.1:
mov x19, x0
Lloh3:
adrp x8, _files@GOTPAGE
Lloh4:
ldr x8, [x8, _files@GOTPAGEOFF]
Lloh5:
ldr w0, [x8]
bl _vec_tail
mov x20, x0
ldr w8, [x0]
cmp w8, #2
cset w0, lo
bl _assert
ldr x8, [x20, #8]
ldrsw x9, [x20]
add w10, w9, #1
str w10, [x20]
str w19, [x8, x9, lsl #2]
cmp w19, #10
b.ne LBB0_3
; %bb.2:
mov w8, #1
ldr w9, [x20, #20]
sub w9, w9, #1
stp w8, w9, [x20, #16]
b LBB0_4
LBB0_3:
ldr w8, [x20, #16]
sub w8, w8, #1
str w8, [x20, #16]
LBB0_4:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpLdrGotLdr Lloh3, Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _EOF,4,2 ; @EOF
.comm _files,4,2 ; @files
.subsections_via_symbols
|
AnghaBench/8cc/extr_file.c_unreadc.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function align
_align: ## @align
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
## kill: def $esi killed $esi def $rsi
## kill: def $edi killed $edi def $rdi
movl %edi, %eax
cltd
idivl %esi
leal (%rsi,%rdi), %eax
subl %edx, %eax
testl %edx, %edx
cmovel %edi, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.no_dead_strip _align
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function align
_align: ; @align
.cfi_startproc
; %bb.0:
sdiv w8, w0, w1
msub w8, w8, w1, w0
add w9, w1, w0
sub w9, w9, w8
cmp w8, #0
csel w0, w0, w9, eq
ret
.cfi_endproc
; -- End function
.no_dead_strip _align
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_align.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function classify_args
_classify_args: ## @classify_args
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $24, %rsp
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, -64(%rbp) ## 8-byte Spill
movq %rdi, -56(%rbp) ## 8-byte Spill
movq %rcx, %rdi
callq _vec_len
testl %eax, %eax
jle LBB0_8
## %bb.1:
xorl %eax, %eax
movq %rax, -48(%rbp) ## 8-byte Spill
xorl %ebx, %ebx
xorl %r15d, %r15d
jmp LBB0_2
.p2align 4, 0x90
LBB0_3: ## in Loop: Header=BB0_2 Depth=1
movq %r14, %rdi
LBB0_7: ## in Loop: Header=BB0_2 Depth=1
movq %r12, %rsi
callq _vec_push
incl %ebx
movq %r13, %rdi
callq _vec_len
cmpl %eax, %ebx
jge LBB0_8
LBB0_2: ## =>This Inner Loop Header: Depth=1
movq %r13, %rdi
movl %ebx, %esi
callq _vec_get
movq %rax, %r12
movq (%rax), %rdi
movq (%rdi), %rax
movq _KIND_STRUCT@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
je LBB0_3
## %bb.4: ## in Loop: Header=BB0_2 Depth=1
callq _is_flotype
testq %rax, %rax
je LBB0_6
## %bb.5: ## in Loop: Header=BB0_2 Depth=1
cmpl $8, %r15d
leal 1(%r15), %eax
movq %r14, %rdi
cmovlq -64(%rbp), %rdi ## 8-byte Folded Reload
movl %eax, %r15d
jmp LBB0_7
LBB0_6: ## in Loop: Header=BB0_2 Depth=1
movq -48(%rbp), %rax ## 8-byte Reload
cmpl $6, %eax
leal 1(%rax), %eax
movq %r14, %rdi
cmovlq -56(%rbp), %rdi ## 8-byte Folded Reload
## kill: def $eax killed $eax def $rax
movq %rax, -48(%rbp) ## 8-byte Spill
jmp LBB0_7
LBB0_8:
addq $24, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_STRUCT,8,3 ## @KIND_STRUCT
.no_dead_strip _classify_args
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function classify_args
_classify_args: ; @classify_args
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-96]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 96
stp x26, x25, [sp, #16] ; 16-byte Folded Spill
stp x24, x23, [sp, #32] ; 16-byte Folded Spill
stp x22, x21, [sp, #48] ; 16-byte Folded Spill
stp x20, x19, [sp, #64] ; 16-byte Folded Spill
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
.cfi_offset w25, -72
.cfi_offset w26, -80
.cfi_offset w27, -88
.cfi_offset w28, -96
mov x19, x3
mov x20, x2
mov x21, x1
mov x22, x0
mov x0, x3
bl _vec_len
cmp w0, #1
b.lt LBB0_6
; %bb.1:
mov w25, #0
mov w23, #0
mov w26, #0
Lloh0:
adrp x27, _KIND_STRUCT@GOTPAGE
Lloh1:
ldr x27, [x27, _KIND_STRUCT@GOTPAGEOFF]
b LBB0_4
LBB0_2: ; in Loop: Header=BB0_4 Depth=1
bl _is_flotype
cmp w25, #6
csel x8, x22, x20, lt
cmp w26, #8
csel x9, x21, x20, lt
cmp x0, #0
csel x0, x8, x9, eq
cinc w26, w26, ne
cinc w25, w25, eq
LBB0_3: ; in Loop: Header=BB0_4 Depth=1
mov x1, x24
bl _vec_push
add w23, w23, #1
mov x0, x19
bl _vec_len
cmp w23, w0
b.ge LBB0_6
LBB0_4: ; =>This Inner Loop Header: Depth=1
mov x0, x19
mov x1, x23
bl _vec_get
mov x24, x0
ldr x0, [x0]
ldr x8, [x0]
ldr x9, [x27]
cmp x8, x9
b.ne LBB0_2
; %bb.5: ; in Loop: Header=BB0_4 Depth=1
mov x0, x20
b LBB0_3
LBB0_6:
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
ldp x20, x19, [sp, #64] ; 16-byte Folded Reload
ldp x22, x21, [sp, #48] ; 16-byte Folded Reload
ldp x24, x23, [sp, #32] ; 16-byte Folded Reload
ldp x26, x25, [sp, #16] ; 16-byte Folded Reload
ldp x28, x27, [sp], #96 ; 16-byte Folded Reload
ret
.loh AdrpLdrGot Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_STRUCT,8,3 ; @KIND_STRUCT
.no_dead_strip _classify_args
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_classify_args.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _close_output_file ## -- Begin function close_output_file
.p2align 4, 0x90
_close_output_file: ## @close_output_file
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq _outputfp@GOTPCREL(%rip), %rax
movl (%rax), %edi
popq %rbp
jmp _fclose ## TAILCALL
.cfi_endproc
## -- End function
.comm _outputfp,4,2 ## @outputfp
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _close_output_file ; -- Begin function close_output_file
.p2align 2
_close_output_file: ; @close_output_file
.cfi_startproc
; %bb.0:
Lloh0:
adrp x8, _outputfp@GOTPAGE
Lloh1:
ldr x8, [x8, _outputfp@GOTPAGEOFF]
Lloh2:
ldr w0, [x8]
b _fclose
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _outputfp,4,2 ; @outputfp
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_close_output_file.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function cmpinit
_cmpinit: ## @cmpinit
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq (%rdi), %rax
movq (%rsi), %rcx
movl (%rax), %eax
subl (%rcx), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.no_dead_strip _cmpinit
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function cmpinit
_cmpinit: ; @cmpinit
.cfi_startproc
; %bb.0:
ldr x8, [x0]
ldr x9, [x1]
ldr w8, [x8]
ldr w9, [x9]
sub w0, w8, w9
ret
.cfi_endproc
; -- End function
.no_dead_strip _cmpinit
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_cmpinit.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function do_emit_assign_deref
_do_emit_assign_deref: ## @do_emit_assign_deref
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movl %esi, %r14d
movq %rdi, %rbx
leaq L_.str(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %rbx, %rdi
movl $99, %esi
callq _get_int_reg
testl %r14d, %r14d
je LBB0_2
## %bb.1:
leaq L_.str.1(%rip), %rdi
movq %rax, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq _emit
jmp LBB0_3
LBB0_2:
leaq L_.str.2(%rip), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq _emit
LBB0_3:
leaq L_.str.3(%rip), %rdi
popq %rbx
popq %r14
popq %rbp
jmp _pop ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "mov (#rsp), #rcx"
L_.str.1: ## @.str.1
.asciz "mov #%s, %d(#rax)"
L_.str.2: ## @.str.2
.asciz "mov #%s, (#rax)"
L_.str.3: ## @.str.3
.asciz "rax"
.no_dead_strip _do_emit_assign_deref
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function do_emit_assign_deref
_do_emit_assign_deref: ; @do_emit_assign_deref
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x1
mov x20, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _emit
mov x0, x20
mov w1, #99
bl _get_int_reg
cbz w19, LBB0_2
; %bb.1:
stp x0, x19, [sp]
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
b LBB0_3
LBB0_2:
str x0, [sp]
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
LBB0_3:
bl _emit
Lloh6:
adrp x0, l_.str.3@PAGE
Lloh7:
add x0, x0, l_.str.3@PAGEOFF
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
b _pop
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh6, Lloh7
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "mov (#rsp), #rcx"
l_.str.1: ; @.str.1
.asciz "mov #%s, %d(#rax)"
l_.str.2: ; @.str.2
.asciz "mov #%s, (#rax)"
l_.str.3: ; @.str.3
.asciz "rax"
.no_dead_strip _do_emit_assign_deref
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_do_emit_assign_deref.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_addr
_emit_addr: ## @emit_addr
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movl (%rdi), %eax
addl $-128, %eax
cmpl $4, %eax
ja LBB0_9
## %bb.1:
leaq LJTI0_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_7:
movq 16(%rbx), %rdi
callq _emit_addr
movq 8(%rbx), %rax
movl (%rax), %esi
leaq L_.str.2(%rip), %rdi
jmp LBB0_5
LBB0_9:
movq %rbx, %rdi
callq _node2s
leaq L_.str.3(%rip), %rdi
movl %eax, %esi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _error ## TAILCALL
LBB0_2:
movq %rbx, %rdi
callq _ensure_lvar_init
movl 32(%rbx), %esi
leaq L_.str(%rip), %rdi
jmp LBB0_5
LBB0_3:
movl 28(%rbx), %esi
jmp LBB0_4
LBB0_8:
movl 4(%rbx), %esi
LBB0_4:
leaq L_.str.1(%rip), %rdi
LBB0_5:
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit ## TAILCALL
LBB0_6:
movl 24(%rbx), %edi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_expr ## TAILCALL
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
.long L0_0_set_7
.long L0_0_set_2
.long L0_0_set_3
.long L0_0_set_8
.long L0_0_set_6
.end_data_region
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "lea %d(#rbp), #rax"
L_.str.1: ## @.str.1
.asciz "lea %s(#rip), #rax"
L_.str.2: ## @.str.2
.asciz "add $%d, #rax"
L_.str.3: ## @.str.3
.asciz "internal error: %s"
.no_dead_strip _emit_addr
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_addr
_emit_addr: ; @emit_addr
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w8, [x0]
sub w8, w8, #128
cmp w8, #4
b.hi LBB0_3
; %bb.1:
Lloh0:
adrp x9, lJTI0_0@PAGE
Lloh1:
add x9, x9, lJTI0_0@PAGEOFF
adr x10, LBB0_2
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_2:
ldr x0, [x19, #16]
bl _emit_addr
ldr x8, [x19, #8]
ldr w1, [x8]
Lloh2:
adrp x0, l_.str.2@PAGE
Lloh3:
add x0, x0, l_.str.2@PAGEOFF
b LBB0_8
LBB0_3:
mov x0, x19
bl _node2s
mov x1, x0
Lloh4:
adrp x0, l_.str.3@PAGE
Lloh5:
add x0, x0, l_.str.3@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _error
LBB0_4:
mov x0, x19
bl _ensure_lvar_init
ldr w1, [x19, #32]
Lloh6:
adrp x0, l_.str@PAGE
Lloh7:
add x0, x0, l_.str@PAGEOFF
b LBB0_8
LBB0_5:
ldr w1, [x19, #28]
b LBB0_7
LBB0_6:
ldr w1, [x19, #4]
LBB0_7:
Lloh8:
adrp x0, l_.str.1@PAGE
Lloh9:
add x0, x0, l_.str.1@PAGEOFF
LBB0_8:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit
LBB0_9:
ldr w0, [x19, #24]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_expr
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh8, Lloh9
.cfi_endproc
.section __TEXT,__const
lJTI0_0:
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_5-LBB0_2)>>2
.byte (LBB0_6-LBB0_2)>>2
.byte (LBB0_9-LBB0_2)>>2
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "lea %d(#rbp), #rax"
l_.str.1: ; @.str.1
.asciz "lea %s(#rip), #rax"
l_.str.2: ; @.str.2
.asciz "add $%d, #rax"
l_.str.3: ; @.str.3
.asciz "internal error: %s"
.no_dead_strip _emit_addr
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_addr.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_args
_emit_args: ## @emit_args
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %r14
callq _vec_len
xorl %r12d, %r12d
testl %eax, %eax
jle LBB0_9
## %bb.1:
movq _KIND_STRUCT@GOTPCREL(%rip), %r15
xorl %r13d, %r13d
movq %r14, -48(%rbp) ## 8-byte Spill
jmp LBB0_2
.p2align 4, 0x90
LBB0_3: ## in Loop: Header=BB0_2 Depth=1
movq %rbx, %rdi
callq _emit_addr
movq (%rbx), %rax
movl 8(%rax), %edi
callq _push_struct
LBB0_8: ## in Loop: Header=BB0_2 Depth=1
addl %eax, %r12d
incl %r13d
movq %r14, %rdi
callq _vec_len
cmpl %eax, %r13d
jge LBB0_9
LBB0_2: ## =>This Inner Loop Header: Depth=1
movq %r14, %rdi
movl %r13d, %esi
callq _vec_get
movq %rax, %rbx
movq (%rax), %rdi
movq (%rdi), %rax
cmpq (%r15), %rax
je LBB0_3
## %bb.4: ## in Loop: Header=BB0_2 Depth=1
movq %r15, %r14
callq _is_flotype
movq %rax, %r15
movq %rbx, %rdi
callq _emit_expr
testq %r15, %r15
je LBB0_6
## %bb.5: ## in Loop: Header=BB0_2 Depth=1
xorl %edi, %edi
callq _push_xmm
jmp LBB0_7
LBB0_6: ## in Loop: Header=BB0_2 Depth=1
leaq L_.str(%rip), %rdi
callq _push
LBB0_7: ## in Loop: Header=BB0_2 Depth=1
movl $8, %eax
movq %r14, %r15
movq -48(%rbp), %r14 ## 8-byte Reload
jmp LBB0_8
LBB0_9:
movl %r12d, %eax
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_STRUCT,8,3 ## @KIND_STRUCT
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rax"
.no_dead_strip _emit_args
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_args
_emit_args: ; @emit_args
.cfi_startproc
; %bb.0:
stp x26, x25, [sp, #-80]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 80
stp x24, x23, [sp, #16] ; 16-byte Folded Spill
stp x22, x21, [sp, #32] ; 16-byte Folded Spill
stp x20, x19, [sp, #48] ; 16-byte Folded Spill
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp, #64
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
.cfi_offset w25, -72
.cfi_offset w26, -80
mov x19, x0
bl _vec_len
cmp w0, #1
b.lt LBB0_9
; %bb.1:
mov w20, #0
mov w21, #0
Lloh0:
adrp x25, _KIND_STRUCT@GOTPAGE
Lloh1:
ldr x25, [x25, _KIND_STRUCT@GOTPAGEOFF]
Lloh2:
adrp x22, l_.str@PAGE
Lloh3:
add x22, x22, l_.str@PAGEOFF
b LBB0_4
LBB0_2: ; in Loop: Header=BB0_4 Depth=1
mov x0, x23
bl _emit_addr
ldr x8, [x23]
ldr w0, [x8, #8]
bl _push_struct
LBB0_3: ; in Loop: Header=BB0_4 Depth=1
add w20, w0, w20
add w21, w21, #1
mov x0, x19
bl _vec_len
cmp w21, w0
b.ge LBB0_10
LBB0_4: ; =>This Inner Loop Header: Depth=1
mov x0, x19
mov x1, x21
bl _vec_get
mov x23, x0
ldr x0, [x0]
ldr x8, [x0]
ldr x9, [x25]
cmp x8, x9
b.eq LBB0_2
; %bb.5: ; in Loop: Header=BB0_4 Depth=1
bl _is_flotype
mov x24, x0
mov x0, x23
bl _emit_expr
cbz x24, LBB0_7
; %bb.6: ; in Loop: Header=BB0_4 Depth=1
mov w0, #0
bl _push_xmm
b LBB0_8
LBB0_7: ; in Loop: Header=BB0_4 Depth=1
mov x0, x22
bl _push
LBB0_8: ; in Loop: Header=BB0_4 Depth=1
mov w0, #8
b LBB0_3
LBB0_9:
mov w20, #0
LBB0_10:
mov x0, x20
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
ldp x26, x25, [sp], #80 ; 16-byte Folded Reload
ret
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpLdrGot Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_STRUCT,8,3 ; @KIND_STRUCT
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rax"
.no_dead_strip _emit_args
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_args.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_assign
_emit_assign: ## @emit_assign
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movq (%rdi), %rdi
movq (%rdi), %rax
movq (%rax), %rcx
movq _KIND_STRUCT@GOTPCREL(%rip), %rdx
cmpq (%rdx), %rcx
jne LBB0_3
## %bb.1:
cmpl $9, 8(%rax)
jl LBB0_3
## %bb.2:
movq 8(%rbx), %rsi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_copy_struct ## TAILCALL
LBB0_3:
movq 8(%rbx), %rdi
callq _emit_expr
movl 16(%rbx), %edi
movq 8(%rbx), %rax
movl (%rax), %esi
callq _emit_load_convert
movq (%rbx), %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_store ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_STRUCT,8,3 ## @KIND_STRUCT
.no_dead_strip _emit_assign
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_assign
_emit_assign: ; @emit_assign
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr x0, [x0]
ldr x8, [x0]
ldr x9, [x8]
Lloh0:
adrp x10, _KIND_STRUCT@GOTPAGE
Lloh1:
ldr x10, [x10, _KIND_STRUCT@GOTPAGEOFF]
Lloh2:
ldr x10, [x10]
cmp x9, x10
b.ne LBB0_3
; %bb.1:
ldr w8, [x8, #8]
cmp w8, #9
b.lt LBB0_3
; %bb.2:
ldr x1, [x19, #8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_copy_struct
LBB0_3:
ldr x0, [x19, #8]
bl _emit_expr
ldr w0, [x19, #16]
ldr x8, [x19, #8]
ldr w1, [x8]
bl _emit_load_convert
ldr x0, [x19]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_store
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_STRUCT,8,3 ; @KIND_STRUCT
.no_dead_strip _emit_assign
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_assign.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_assign_deref
_emit_assign_deref: ## @emit_assign_deref
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
leaq L_.str(%rip), %rdi
callq _push
movq (%rbx), %rdi
callq _emit_expr
movq (%rbx), %rax
movq (%rax), %rax
movl (%rax), %edi
xorl %esi, %esi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _do_emit_assign_deref ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rax"
.no_dead_strip _emit_assign_deref
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_assign_deref
_emit_assign_deref: ; @emit_assign_deref
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _push
ldr x0, [x19]
bl _emit_expr
ldr x8, [x19]
ldr x8, [x8]
ldr w0, [x8]
mov w1, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _do_emit_assign_deref
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rax"
.no_dead_strip _emit_assign_deref
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_assign_deref.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_assign_struct_ref
_emit_assign_struct_ref: ## @emit_assign_struct_ref
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
.p2align 4, 0x90
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl (%rbx), %eax
cmpl $128, %eax
jne LBB0_2
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movq 8(%rbx), %rax
movq 16(%rbx), %rbx
addl (%rax), %r15d
jmp LBB0_1
LBB0_2:
cmpl $131, %eax
je LBB0_8
## %bb.3:
cmpl $130, %eax
je LBB0_6
## %bb.4:
cmpl $129, %eax
jne LBB0_9
## %bb.5:
movq %rbx, %rdi
callq _ensure_lvar_init
movl (%r14), %eax
addl 32(%rbx), %eax
addl %eax, %r15d
movq %r14, %rdi
movl %r15d, %esi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit_lsave ## TAILCALL
LBB0_8:
leaq L_.str(%rip), %rdi
callq _push
movl 4(%rbx), %edi
callq _emit_expr
addl (%r14), %r15d
movq %r14, %rdi
movl %r15d, %esi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _do_emit_assign_deref ## TAILCALL
LBB0_6:
movl 24(%rbx), %edi
addl (%r14), %r15d
movq %r14, %rsi
movl %r15d, %edx
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit_gsave ## TAILCALL
LBB0_9:
movq %rbx, %rdi
callq _node2s
leaq L_.str.1(%rip), %rdi
movl %eax, %esi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _error ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rax"
L_.str.1: ## @.str.1
.asciz "internal error: %s"
.no_dead_strip _emit_assign_struct_ref
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_assign_struct_ref
_emit_assign_struct_ref: ; @emit_assign_struct_ref
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x20, x2
mov x19, x1
mov x21, x0
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [x21]
cmp w8, #128
b.ne LBB0_3
; %bb.2: ; in Loop: Header=BB0_1 Depth=1
ldp x8, x21, [x21, #8]
ldr w8, [x8]
add w20, w8, w20
b LBB0_1
LBB0_3:
cmp w8, #131
b.eq LBB0_7
; %bb.4:
cmp w8, #130
b.eq LBB0_8
; %bb.5:
cmp w8, #129
b.ne LBB0_9
; %bb.6:
mov x0, x21
bl _ensure_lvar_init
ldr w8, [x21, #32]
ldr w9, [x19]
add w8, w9, w8
add w1, w20, w8
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_lsave
LBB0_7:
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _push
ldr w0, [x21, #4]
bl _emit_expr
ldr w8, [x19]
add w1, w20, w8
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _do_emit_assign_deref
LBB0_8:
ldr w0, [x21, #24]
ldr w8, [x19]
add w2, w20, w8
mov x1, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_gsave
LBB0_9:
mov x0, x21
bl _node2s
mov x1, x0
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _error
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rax"
l_.str.1: ; @.str.1
.asciz "internal error: %s"
.no_dead_strip _emit_assign_struct_ref
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_assign_struct_ref.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_binop
_emit_binop: ## @emit_binop
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movq 8(%rdi), %rdi
movq (%rdi), %rcx
movq _KIND_PTR@GOTPCREL(%rip), %rdx
movl (%rbx), %eax
cmpq (%rdx), %rcx
jne LBB0_1
## %bb.14:
movl 16(%rbx), %edx
movl 20(%rbx), %esi
movl %eax, %edi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_pointer_arith ## TAILCALL
LBB0_1:
cmpl $128, %eax
jg LBB0_5
## %bb.2:
cmpl $60, %eax
je LBB0_15
## %bb.3:
cmpl $128, %eax
jne LBB0_11
## %bb.4:
leaq L_.str.5(%rip), %rdi
jmp LBB0_8
LBB0_5:
cmpl $129, %eax
je LBB0_10
## %bb.6:
cmpl $130, %eax
jne LBB0_11
## %bb.7:
leaq L_.str.2(%rip), %rdi
LBB0_8:
movq %rdi, %rsi
jmp LBB0_9
LBB0_15:
leaq L_.str(%rip), %rdi
leaq L_.str.1(%rip), %rsi
jmp LBB0_9
LBB0_10:
leaq L_.str.3(%rip), %rdi
leaq L_.str.4(%rip), %rsi
LBB0_9:
movq %rbx, %rdx
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_comp ## TAILCALL
LBB0_11:
callq _is_inttype
testq %rax, %rax
je LBB0_12
## %bb.16:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_binop_int_arith ## TAILCALL
LBB0_12:
movq 8(%rbx), %rdi
callq _is_flotype
movq %rbx, %rdi
testq %rax, %rax
je LBB0_13
## %bb.17:
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_binop_float_arith ## TAILCALL
LBB0_13:
callq _node2s
leaq L_.str.6(%rip), %rdi
movl %eax, %esi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _error ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_PTR,8,3 ## @KIND_PTR
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "setl"
L_.str.1: ## @.str.1
.asciz "setb"
L_.str.2: ## @.str.2
.asciz "sete"
L_.str.3: ## @.str.3
.asciz "setle"
L_.str.4: ## @.str.4
.asciz "setna"
L_.str.5: ## @.str.5
.asciz "setne"
L_.str.6: ## @.str.6
.asciz "internal error: %s"
.no_dead_strip _emit_binop
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_binop
_emit_binop: ; @emit_binop
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr x0, [x0, #8]
ldr x9, [x0]
Lloh0:
adrp x8, _KIND_PTR@GOTPAGE
Lloh1:
ldr x8, [x8, _KIND_PTR@GOTPAGEOFF]
Lloh2:
ldr x10, [x8]
ldr w8, [x19]
cmp x9, x10
b.ne LBB0_2
; %bb.1:
ldp w2, w1, [x19, #16]
mov x0, x8
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_pointer_arith
LBB0_2:
cmp w8, #128
b.gt LBB0_6
; %bb.3:
cmp w8, #60
b.eq LBB0_10
; %bb.4:
cmp w8, #128
b.ne LBB0_13
; %bb.5:
Lloh3:
adrp x0, l_.str.5@PAGE
Lloh4:
add x0, x0, l_.str.5@PAGEOFF
b LBB0_9
LBB0_6:
cmp w8, #129
b.eq LBB0_11
; %bb.7:
cmp w8, #130
b.ne LBB0_13
; %bb.8:
Lloh5:
adrp x0, l_.str.2@PAGE
Lloh6:
add x0, x0, l_.str.2@PAGEOFF
LBB0_9:
mov x1, x0
b LBB0_12
LBB0_10:
Lloh7:
adrp x0, l_.str@PAGE
Lloh8:
add x0, x0, l_.str@PAGEOFF
Lloh9:
adrp x1, l_.str.1@PAGE
Lloh10:
add x1, x1, l_.str.1@PAGEOFF
b LBB0_12
LBB0_11:
Lloh11:
adrp x0, l_.str.3@PAGE
Lloh12:
add x0, x0, l_.str.3@PAGEOFF
Lloh13:
adrp x1, l_.str.4@PAGE
Lloh14:
add x1, x1, l_.str.4@PAGEOFF
LBB0_12:
mov x2, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_comp
LBB0_13:
bl _is_inttype
cbz x0, LBB0_15
; %bb.14:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_binop_int_arith
LBB0_15:
ldr x0, [x19, #8]
bl _is_flotype
cbz x0, LBB0_17
; %bb.16:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_binop_float_arith
LBB0_17:
mov x0, x19
bl _node2s
mov x1, x0
Lloh15:
adrp x0, l_.str.6@PAGE
Lloh16:
add x0, x0, l_.str.6@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _error
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpAdd Lloh9, Lloh10
.loh AdrpAdd Lloh7, Lloh8
.loh AdrpAdd Lloh13, Lloh14
.loh AdrpAdd Lloh11, Lloh12
.loh AdrpAdd Lloh15, Lloh16
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_PTR,8,3 ; @KIND_PTR
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "setl"
l_.str.1: ; @.str.1
.asciz "setb"
l_.str.2: ; @.str.2
.asciz "sete"
l_.str.3: ; @.str.3
.asciz "setle"
l_.str.4: ; @.str.4
.asciz "setna"
l_.str.5: ; @.str.5
.asciz "setne"
l_.str.6: ; @.str.6
.asciz "internal error: %s"
.no_dead_strip _emit_binop
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_binop.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_binop_float_arith
_emit_binop_float_arith: ## @emit_binop_float_arith
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
.cfi_offset %rbx, -48
.cfi_offset %r12, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %rbx
movq 16(%rdi), %rax
movq (%rax), %r15
movq _KIND_DOUBLE@GOTPCREL(%rip), %rax
movq (%rax), %r12
movl (%rdi), %esi
leal -42(%rsi), %eax
cmpl $5, %eax
ja LBB0_4
## %bb.1:
leaq LJTI0_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_2:
cmpq %r12, %r15
leaq L_.str.4(%rip), %rax
leaq L_.str.5(%rip), %r14
jmp LBB0_7
LBB0_3:
cmpq %r12, %r15
leaq L_.str(%rip), %rax
leaq L_.str.1(%rip), %r14
jmp LBB0_7
LBB0_4:
leaq L_.str.8(%rip), %rdi
## kill: def $esi killed $esi killed $rsi
callq _error
## implicit-def: $r14
jmp LBB0_8
LBB0_5:
cmpq %r12, %r15
leaq L_.str.2(%rip), %rax
leaq L_.str.3(%rip), %r14
jmp LBB0_7
LBB0_6:
cmpq %r12, %r15
leaq L_.str.6(%rip), %rax
leaq L_.str.7(%rip), %r14
LBB0_7:
cmoveq %rax, %r14
LBB0_8:
movl 8(%rbx), %edi
callq _emit_expr
xorl %edi, %edi
callq _push_xmm
movl 4(%rbx), %edi
callq _emit_expr
cmpq %r12, %r15
leaq L_.str.10(%rip), %rax
leaq L_.str.11(%rip), %rsi
cmoveq %rax, %rsi
leaq L_.str.9(%rip), %rdi
callq _emit
xorl %edi, %edi
callq _pop_xmm
leaq L_.str.12(%rip), %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
.long L0_0_set_2
.long L0_0_set_3
.long L0_0_set_4
.long L0_0_set_5
.long L0_0_set_4
.long L0_0_set_6
.end_data_region
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_DOUBLE,8,3 ## @KIND_DOUBLE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "addsd"
L_.str.1: ## @.str.1
.asciz "addss"
L_.str.2: ## @.str.2
.asciz "subsd"
L_.str.3: ## @.str.3
.asciz "subss"
L_.str.4: ## @.str.4
.asciz "mulsd"
L_.str.5: ## @.str.5
.asciz "mulss"
L_.str.6: ## @.str.6
.asciz "divsd"
L_.str.7: ## @.str.7
.asciz "divss"
L_.str.8: ## @.str.8
.asciz "invalid operator '%d'"
L_.str.9: ## @.str.9
.asciz "%s #xmm0, #xmm1"
L_.str.10: ## @.str.10
.asciz "movsd"
L_.str.11: ## @.str.11
.asciz "movss"
L_.str.12: ## @.str.12
.asciz "%s #xmm1, #xmm0"
.no_dead_strip _emit_binop_float_arith
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_binop_float_arith
_emit_binop_float_arith: ; @emit_binop_float_arith
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x0
ldr x8, [x0, #16]
ldr x21, [x8]
Lloh0:
adrp x8, _KIND_DOUBLE@GOTPAGE
Lloh1:
ldr x8, [x8, _KIND_DOUBLE@GOTPAGEOFF]
Lloh2:
ldr x22, [x8]
ldr w1, [x0]
sub w8, w1, #42
cmp w8, #5
b.hi LBB0_4
; %bb.1:
Lloh3:
adrp x9, lJTI0_0@PAGE
Lloh4:
add x9, x9, lJTI0_0@PAGEOFF
adr x10, LBB0_2
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_2:
Lloh5:
adrp x8, l_.str.5@PAGE
Lloh6:
add x8, x8, l_.str.5@PAGEOFF
Lloh7:
adrp x9, l_.str.4@PAGE
Lloh8:
add x9, x9, l_.str.4@PAGEOFF
b LBB0_7
LBB0_3:
Lloh9:
adrp x8, l_.str.1@PAGE
Lloh10:
add x8, x8, l_.str.1@PAGEOFF
Lloh11:
adrp x9, l_.str@PAGE
Lloh12:
add x9, x9, l_.str@PAGEOFF
b LBB0_7
LBB0_4:
Lloh13:
adrp x0, l_.str.8@PAGE
Lloh14:
add x0, x0, l_.str.8@PAGEOFF
bl _error
; implicit-def: $x20
b LBB0_8
LBB0_5:
Lloh15:
adrp x8, l_.str.3@PAGE
Lloh16:
add x8, x8, l_.str.3@PAGEOFF
Lloh17:
adrp x9, l_.str.2@PAGE
Lloh18:
add x9, x9, l_.str.2@PAGEOFF
b LBB0_7
LBB0_6:
Lloh19:
adrp x8, l_.str.7@PAGE
Lloh20:
add x8, x8, l_.str.7@PAGEOFF
Lloh21:
adrp x9, l_.str.6@PAGE
Lloh22:
add x9, x9, l_.str.6@PAGEOFF
LBB0_7:
cmp x21, x22
csel x20, x9, x8, eq
LBB0_8:
ldr w0, [x19, #8]
bl _emit_expr
mov w0, #0
bl _push_xmm
ldr w0, [x19, #4]
bl _emit_expr
Lloh23:
adrp x8, l_.str.11@PAGE
Lloh24:
add x8, x8, l_.str.11@PAGEOFF
Lloh25:
adrp x9, l_.str.10@PAGE
Lloh26:
add x9, x9, l_.str.10@PAGEOFF
cmp x21, x22
csel x1, x9, x8, eq
Lloh27:
adrp x0, l_.str.9@PAGE
Lloh28:
add x0, x0, l_.str.9@PAGEOFF
bl _emit
mov w0, #0
bl _pop_xmm
Lloh29:
adrp x0, l_.str.12@PAGE
Lloh30:
add x0, x0, l_.str.12@PAGEOFF
mov x1, x20
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpAdd Lloh7, Lloh8
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpAdd Lloh11, Lloh12
.loh AdrpAdd Lloh9, Lloh10
.loh AdrpAdd Lloh13, Lloh14
.loh AdrpAdd Lloh17, Lloh18
.loh AdrpAdd Lloh15, Lloh16
.loh AdrpAdd Lloh21, Lloh22
.loh AdrpAdd Lloh19, Lloh20
.loh AdrpAdd Lloh29, Lloh30
.loh AdrpAdd Lloh27, Lloh28
.loh AdrpAdd Lloh25, Lloh26
.loh AdrpAdd Lloh23, Lloh24
.cfi_endproc
.section __TEXT,__const
lJTI0_0:
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_3-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_5-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_6-LBB0_2)>>2
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_DOUBLE,8,3 ; @KIND_DOUBLE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "addsd"
l_.str.1: ; @.str.1
.asciz "addss"
l_.str.2: ; @.str.2
.asciz "subsd"
l_.str.3: ; @.str.3
.asciz "subss"
l_.str.4: ; @.str.4
.asciz "mulsd"
l_.str.5: ; @.str.5
.asciz "mulss"
l_.str.6: ; @.str.6
.asciz "divsd"
l_.str.7: ; @.str.7
.asciz "divss"
l_.str.8: ; @.str.8
.asciz "invalid operator '%d'"
l_.str.9: ; @.str.9
.asciz "%s #xmm0, #xmm1"
l_.str.10: ; @.str.10
.asciz "movsd"
l_.str.11: ; @.str.11
.asciz "movss"
l_.str.12: ; @.str.12
.asciz "%s #xmm1, #xmm0"
.no_dead_strip _emit_binop_float_arith
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_binop_float_arith.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_binop_int_arith
_emit_binop_int_arith: ## @emit_binop_int_arith
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %rbx
movl (%rdi), %esi
leal -37(%rsi), %eax
cmpl $10, %eax
ja LBB0_1
## %bb.19:
xorl %r14d, %r14d
leaq LJTI0_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_5:
leaq L_.str.2(%rip), %r14
jmp LBB0_11
LBB0_1:
leal -94(%rsi), %eax
cmpl $36, %eax
ja LBB0_10
## %bb.2:
leaq LJTI0_1(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_6:
leaq L_.str.3(%rip), %r14
jmp LBB0_11
LBB0_3:
leaq L_.str(%rip), %r14
jmp LBB0_11
LBB0_4:
leaq L_.str.1(%rip), %r14
jmp LBB0_11
LBB0_10:
leaq L_.str.7(%rip), %rdi
## kill: def $esi killed $esi killed $rsi
callq _error
xorl %r14d, %r14d
jmp LBB0_11
LBB0_9:
leaq L_.str.6(%rip), %r14
jmp LBB0_11
LBB0_8:
leaq L_.str.5(%rip), %r14
jmp LBB0_11
LBB0_7:
leaq L_.str.4(%rip), %r14
LBB0_11:
movq 8(%rbx), %rdi
callq _emit_expr
leaq L_.str.8(%rip), %r15
movq %r15, %rdi
callq _push
movq 24(%rbx), %rdi
callq _emit_expr
leaq L_.str.9(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r15, %rdi
callq _pop
movl (%rbx), %eax
leal -128(%rax), %ecx
cmpl $3, %ecx
jae LBB0_12
## %bb.16:
movq 8(%rbx), %rax
movl (%rax), %edi
movl $97, %esi
callq _get_int_reg
leaq L_.str.15(%rip), %rdi
movq %r14, %rsi
movl %eax, %edx
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
LBB0_12:
cmpl $47, %eax
je LBB0_14
## %bb.13:
cmpl $37, %eax
jne LBB0_17
LBB0_14:
movq 16(%rbx), %rax
cmpq $0, (%rax)
leaq L_.str.12(%rip), %rax
leaq L_.str.10(%rip), %rdi
cmoveq %rax, %rdi
leaq L_.str.13(%rip), %rax
leaq L_.str.11(%rip), %r14
cmoveq %rax, %r14
xorl %eax, %eax
callq _emit
movq %r14, %rdi
xorl %eax, %eax
callq _emit
cmpl $37, (%rbx)
jne LBB0_18
## %bb.15:
leaq L_.str.14(%rip), %rdi
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
LBB0_17:
leaq L_.str.16(%rip), %rdi
movq %r14, %rsi
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
LBB0_18:
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
.long L0_0_set_11
.long L0_0_set_10
.long L0_0_set_10
.long L0_0_set_10
.long L0_0_set_10
.long L0_0_set_5
.long L0_0_set_3
.long L0_0_set_10
.long L0_0_set_4
.long L0_0_set_10
.long L0_0_set_11
.set L0_1_set_6, LBB0_6-LJTI0_1
.set L0_1_set_10, LBB0_10-LJTI0_1
.set L0_1_set_9, LBB0_9-LJTI0_1
.set L0_1_set_8, LBB0_8-LJTI0_1
.set L0_1_set_7, LBB0_7-LJTI0_1
LJTI0_1:
.long L0_1_set_6
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_10
.long L0_1_set_9
.long L0_1_set_8
.long L0_1_set_7
.end_data_region
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "add"
L_.str.1: ## @.str.1
.asciz "sub"
L_.str.2: ## @.str.2
.asciz "imul"
L_.str.3: ## @.str.3
.asciz "xor"
L_.str.4: ## @.str.4
.asciz "sal"
L_.str.5: ## @.str.5
.asciz "sar"
L_.str.6: ## @.str.6
.asciz "shr"
L_.str.7: ## @.str.7
.asciz "invalid operator '%d'"
L_.str.8: ## @.str.8
.asciz "rax"
L_.str.9: ## @.str.9
.asciz "mov #rax, #rcx"
L_.str.10: ## @.str.10
.asciz "xor #edx, #edx"
L_.str.11: ## @.str.11
.asciz "div #rcx"
L_.str.12: ## @.str.12
.asciz "cqto"
L_.str.13: ## @.str.13
.asciz "idiv #rcx"
L_.str.14: ## @.str.14
.asciz "mov #edx, #eax"
L_.str.15: ## @.str.15
.asciz "%s #cl, #%s"
L_.str.16: ## @.str.16
.asciz "%s #rcx, #rax"
.no_dead_strip _emit_binop_int_arith
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_binop_int_arith
_emit_binop_int_arith: ; @emit_binop_int_arith
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x0
ldr w1, [x0]
sub w8, w1, #37
cmp w8, #10
b.hi LBB0_3
; %bb.1:
mov x21, #0
Lloh0:
adrp x9, lJTI0_0@PAGE
Lloh1:
add x9, x9, lJTI0_0@PAGEOFF
adr x10, LBB0_2
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_2:
Lloh2:
adrp x21, l_.str.2@PAGE
Lloh3:
add x21, x21, l_.str.2@PAGEOFF
b LBB0_12
LBB0_3:
sub w8, w1, #94
cmp w8, #36
b.hi LBB0_8
; %bb.4:
Lloh4:
adrp x9, lJTI0_1@PAGE
Lloh5:
add x9, x9, lJTI0_1@PAGEOFF
adr x10, LBB0_5
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_5:
Lloh6:
adrp x21, l_.str.3@PAGE
Lloh7:
add x21, x21, l_.str.3@PAGEOFF
b LBB0_12
LBB0_6:
Lloh8:
adrp x21, l_.str@PAGE
Lloh9:
add x21, x21, l_.str@PAGEOFF
b LBB0_12
LBB0_7:
Lloh10:
adrp x21, l_.str.1@PAGE
Lloh11:
add x21, x21, l_.str.1@PAGEOFF
b LBB0_12
LBB0_8:
Lloh12:
adrp x0, l_.str.7@PAGE
Lloh13:
add x0, x0, l_.str.7@PAGEOFF
bl _error
mov x21, #0
b LBB0_12
LBB0_9:
Lloh14:
adrp x21, l_.str.6@PAGE
Lloh15:
add x21, x21, l_.str.6@PAGEOFF
b LBB0_12
LBB0_10:
Lloh16:
adrp x21, l_.str.5@PAGE
Lloh17:
add x21, x21, l_.str.5@PAGEOFF
b LBB0_12
LBB0_11:
Lloh18:
adrp x21, l_.str.4@PAGE
Lloh19:
add x21, x21, l_.str.4@PAGEOFF
LBB0_12:
ldr x0, [x19, #8]
bl _emit_expr
Lloh20:
adrp x20, l_.str.8@PAGE
Lloh21:
add x20, x20, l_.str.8@PAGEOFF
mov x0, x20
bl _push
ldr x0, [x19, #24]
bl _emit_expr
Lloh22:
adrp x0, l_.str.9@PAGE
Lloh23:
add x0, x0, l_.str.9@PAGEOFF
bl _emit
mov x0, x20
bl _pop
ldr w8, [x19]
sub w9, w8, #128
cmp w9, #3
b.hs LBB0_14
; %bb.13:
ldr x8, [x19, #8]
ldr w0, [x8]
mov w1, #97
bl _get_int_reg
; kill: def $w0 killed $w0 def $x0
stp x21, x0, [sp]
Lloh24:
adrp x0, l_.str.15@PAGE
Lloh25:
add x0, x0, l_.str.15@PAGEOFF
b LBB0_19
LBB0_14:
cmp w8, #47
b.eq LBB0_16
; %bb.15:
cmp w8, #37
b.ne LBB0_18
LBB0_16:
ldr x8, [x19, #16]
ldr x8, [x8]
Lloh26:
adrp x9, l_.str.10@PAGE
Lloh27:
add x9, x9, l_.str.10@PAGEOFF
Lloh28:
adrp x10, l_.str.12@PAGE
Lloh29:
add x10, x10, l_.str.12@PAGEOFF
cmp x8, #0
csel x0, x10, x9, eq
Lloh30:
adrp x8, l_.str.11@PAGE
Lloh31:
add x8, x8, l_.str.11@PAGEOFF
Lloh32:
adrp x9, l_.str.13@PAGE
Lloh33:
add x9, x9, l_.str.13@PAGEOFF
csel x20, x9, x8, eq
bl _emit
mov x0, x20
bl _emit
ldr w8, [x19]
cmp w8, #37
b.ne LBB0_20
; %bb.17:
Lloh34:
adrp x0, l_.str.14@PAGE
Lloh35:
add x0, x0, l_.str.14@PAGEOFF
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _emit
LBB0_18:
str x21, [sp]
Lloh36:
adrp x0, l_.str.16@PAGE
Lloh37:
add x0, x0, l_.str.16@PAGEOFF
LBB0_19:
bl _emit
LBB0_20:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
ret
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh14, Lloh15
.loh AdrpAdd Lloh16, Lloh17
.loh AdrpAdd Lloh18, Lloh19
.loh AdrpAdd Lloh22, Lloh23
.loh AdrpAdd Lloh20, Lloh21
.loh AdrpAdd Lloh24, Lloh25
.loh AdrpAdd Lloh32, Lloh33
.loh AdrpAdd Lloh30, Lloh31
.loh AdrpAdd Lloh28, Lloh29
.loh AdrpAdd Lloh26, Lloh27
.loh AdrpAdd Lloh34, Lloh35
.loh AdrpAdd Lloh36, Lloh37
.cfi_endproc
.section __TEXT,__const
lJTI0_0:
.byte (LBB0_12-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_6-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_7-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_12-LBB0_2)>>2
lJTI0_1:
.byte (LBB0_5-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_8-LBB0_5)>>2
.byte (LBB0_9-LBB0_5)>>2
.byte (LBB0_10-LBB0_5)>>2
.byte (LBB0_11-LBB0_5)>>2
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "add"
l_.str.1: ; @.str.1
.asciz "sub"
l_.str.2: ; @.str.2
.asciz "imul"
l_.str.3: ; @.str.3
.asciz "xor"
l_.str.4: ; @.str.4
.asciz "sal"
l_.str.5: ; @.str.5
.asciz "sar"
l_.str.6: ; @.str.6
.asciz "shr"
l_.str.7: ; @.str.7
.asciz "invalid operator '%d'"
l_.str.8: ; @.str.8
.asciz "rax"
l_.str.9: ; @.str.9
.asciz "mov #rax, #rcx"
l_.str.10: ; @.str.10
.asciz "xor #edx, #edx"
l_.str.11: ; @.str.11
.asciz "div #rcx"
l_.str.12: ; @.str.12
.asciz "cqto"
l_.str.13: ; @.str.13
.asciz "idiv #rcx"
l_.str.14: ; @.str.14
.asciz "mov #edx, #eax"
l_.str.15: ; @.str.15
.asciz "%s #cl, #%s"
l_.str.16: ; @.str.16
.asciz "%s #rcx, #rax"
.no_dead_strip _emit_binop_int_arith
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_binop_int_arith.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_bitand
_emit_bitand: ## @emit_bitand
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movl 4(%rdi), %edi
callq _emit_expr
leaq L_.str(%rip), %rdi
callq _push
movl (%rbx), %edi
callq _emit_expr
leaq L_.str.1(%rip), %rdi
callq _pop
leaq L_.str.2(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rax"
L_.str.1: ## @.str.1
.asciz "rcx"
L_.str.2: ## @.str.2
.asciz "and #rcx, #rax"
.no_dead_strip _emit_bitand
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_bitand
_emit_bitand: ; @emit_bitand
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w0, [x0, #4]
bl _emit_expr
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _push
ldr w0, [x19]
bl _emit_expr
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _pop
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rax"
l_.str.1: ; @.str.1
.asciz "rcx"
l_.str.2: ; @.str.2
.asciz "and #rcx, #rax"
.no_dead_strip _emit_bitand
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_bitand.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_bitnot
_emit_bitnot: ## @emit_bitnot
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl (%rdi), %edi
callq _emit_expr
leaq L_.str(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "not #rax"
.no_dead_strip _emit_bitnot
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_bitnot
_emit_bitnot: ; @emit_bitnot
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
ldr w0, [x0]
bl _emit_expr
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
b _emit
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "not #rax"
.no_dead_strip _emit_bitnot
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_bitnot.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_bitor
_emit_bitor: ## @emit_bitor
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movl 4(%rdi), %edi
callq _emit_expr
leaq L_.str(%rip), %rdi
callq _push
movl (%rbx), %edi
callq _emit_expr
leaq L_.str.1(%rip), %rdi
callq _pop
leaq L_.str.2(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rax"
L_.str.1: ## @.str.1
.asciz "rcx"
L_.str.2: ## @.str.2
.asciz "or #rcx, #rax"
.no_dead_strip _emit_bitor
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_bitor
_emit_bitor: ; @emit_bitor
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w0, [x0, #4]
bl _emit_expr
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _push
ldr w0, [x19]
bl _emit_expr
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _pop
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rax"
l_.str.1: ; @.str.1
.asciz "rcx"
l_.str.2: ; @.str.2
.asciz "or #rcx, #rax"
.no_dead_strip _emit_bitor
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_bitor.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_builtin_reg_class
_emit_builtin_reg_class: ## @emit_builtin_reg_class
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movl 8(%rdi), %edi
xorl %esi, %esi
callq _vec_get
movq %rax, %rbx
movq (%rax), %rax
movq (%rax), %rax
movq _KIND_PTR@GOTPCREL(%rip), %rcx
xorl %edi, %edi
cmpq (%rcx), %rax
sete %dil
callq _assert
movq (%rbx), %rax
movq 8(%rax), %rdi
movq (%rdi), %rax
movq _KIND_STRUCT@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_2
## %bb.1:
leaq L_.str(%rip), %rdi
jmp LBB0_3
LBB0_2:
callq _is_flotype
testq %rax, %rax
leaq L_.str.2(%rip), %rax
leaq L_.str.1(%rip), %rdi
cmoveq %rax, %rdi
LBB0_3:
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _KIND_PTR,8,3 ## @KIND_PTR
.comm _KIND_STRUCT,8,3 ## @KIND_STRUCT
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "mov $2, #eax"
L_.str.1: ## @.str.1
.asciz "mov $1, #eax"
L_.str.2: ## @.str.2
.asciz "mov $0, #eax"
.no_dead_strip _emit_builtin_reg_class
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_builtin_reg_class
_emit_builtin_reg_class: ; @emit_builtin_reg_class
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
ldr w0, [x0, #8]
mov w1, #0
bl _vec_get
mov x19, x0
ldr x8, [x0]
ldr x8, [x8]
Lloh0:
adrp x9, _KIND_PTR@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_PTR@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
cset w0, eq
bl _assert
ldr x8, [x19]
ldr x0, [x8, #8]
ldr x8, [x0]
Lloh3:
adrp x9, _KIND_STRUCT@GOTPAGE
Lloh4:
ldr x9, [x9, _KIND_STRUCT@GOTPAGEOFF]
Lloh5:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_2
; %bb.1:
Lloh6:
adrp x0, l_.str@PAGE
Lloh7:
add x0, x0, l_.str@PAGEOFF
b LBB0_3
LBB0_2:
bl _is_flotype
Lloh8:
adrp x8, l_.str.1@PAGE
Lloh9:
add x8, x8, l_.str.1@PAGEOFF
Lloh10:
adrp x9, l_.str.2@PAGE
Lloh11:
add x9, x9, l_.str.2@PAGEOFF
cmp x0, #0
csel x0, x9, x8, eq
LBB0_3:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit
.loh AdrpLdrGotLdr Lloh3, Lloh4, Lloh5
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh8, Lloh9
.cfi_endproc
; -- End function
.comm _KIND_PTR,8,3 ; @KIND_PTR
.comm _KIND_STRUCT,8,3 ; @KIND_STRUCT
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "mov $2, #eax"
l_.str.1: ; @.str.1
.asciz "mov $1, #eax"
l_.str.2: ; @.str.2
.asciz "mov $0, #eax"
.no_dead_strip _emit_builtin_reg_class
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_builtin_reg_class.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_builtin_return_address
_emit_builtin_return_address: ## @emit_builtin_return_address
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %rbx
leaq L_.str(%rip), %r14
movq %r14, %rdi
callq _push
movl (%rbx), %edi
callq _vec_len
xorl %edi, %edi
cmpl $1, %eax
sete %dil
callq _assert
movl (%rbx), %edi
callq _vec_head
movl %eax, %edi
callq _emit_expr
xorl %eax, %eax
callq _make_label
movq %rax, %r15
xorl %eax, %eax
callq _make_label
movq %rax, %rbx
leaq L_.str.1(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r15, %rdi
callq _emit_label
leaq L_.str.2(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.3(%rip), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq _emit
leaq L_.str.4(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.5(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r15, %rdi
callq _emit_jmp
movq %rbx, %rdi
callq _emit_label
leaq L_.str.6(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r14, %rdi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _pop ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "r11"
L_.str.1: ## @.str.1
.asciz "mov #rbp, #r11"
L_.str.2: ## @.str.2
.asciz "test #rax, #rax"
L_.str.3: ## @.str.3
.asciz "jz %s"
L_.str.4: ## @.str.4
.asciz "mov (#r11), #r11"
L_.str.5: ## @.str.5
.asciz "sub $1, #rax"
L_.str.6: ## @.str.6
.asciz "mov 8(#r11), #rax"
.no_dead_strip _emit_builtin_return_address
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_builtin_return_address
_emit_builtin_return_address: ; @emit_builtin_return_address
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x20, x0
Lloh0:
adrp x19, l_.str@PAGE
Lloh1:
add x19, x19, l_.str@PAGEOFF
mov x0, x19
bl _push
ldr w0, [x20]
bl _vec_len
cmp w0, #1
cset w0, eq
bl _assert
ldr w0, [x20]
bl _vec_head
bl _emit_expr
bl _make_label
mov x20, x0
bl _make_label
mov x21, x0
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _emit
mov x0, x20
bl _emit_label
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
str x21, [sp]
Lloh6:
adrp x0, l_.str.3@PAGE
Lloh7:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
Lloh8:
adrp x0, l_.str.4@PAGE
Lloh9:
add x0, x0, l_.str.4@PAGEOFF
bl _emit
Lloh10:
adrp x0, l_.str.5@PAGE
Lloh11:
add x0, x0, l_.str.5@PAGEOFF
bl _emit
mov x0, x20
bl _emit_jmp
mov x0, x21
bl _emit_label
Lloh12:
adrp x0, l_.str.6@PAGE
Lloh13:
add x0, x0, l_.str.6@PAGEOFF
bl _emit
mov x0, x19
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _pop
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "r11"
l_.str.1: ; @.str.1
.asciz "mov #rbp, #r11"
l_.str.2: ; @.str.2
.asciz "test #rax, #rax"
l_.str.3: ; @.str.3
.asciz "jz %s"
l_.str.4: ; @.str.4
.asciz "mov (#r11), #r11"
l_.str.5: ; @.str.5
.asciz "sub $1, #rax"
l_.str.6: ; @.str.6
.asciz "mov 8(#r11), #rax"
.no_dead_strip _emit_builtin_return_address
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_builtin_return_address.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_builtin_va_start
_emit_builtin_va_start: ## @emit_builtin_va_start
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movl (%rdi), %edi
callq _vec_len
xorl %edi, %edi
cmpl $1, %eax
sete %dil
callq _assert
movl (%rbx), %edi
callq _vec_head
movl %eax, %edi
callq _emit_expr
leaq L_.str(%rip), %rbx
movq %rbx, %rdi
callq _push
movq _numgp@GOTPCREL(%rip), %rax
movl (%rax), %esi
shll $3, %esi
leaq L_.str.1(%rip), %rdi
xorl %eax, %eax
callq _emit
movq _numfp@GOTPCREL(%rip), %rax
movl (%rax), %esi
shll $4, %esi
addl $48, %esi
leaq L_.str.2(%rip), %rdi
xorl %eax, %eax
callq _emit
movq _REGAREA_SIZE@GOTPCREL(%rip), %rax
xorl %esi, %esi
subl (%rax), %esi
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.4(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _pop ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rcx"
L_.str.1: ## @.str.1
.asciz "movl $%d, (#rax)"
.comm _numgp,4,2 ## @numgp
L_.str.2: ## @.str.2
.asciz "movl $%d, 4(#rax)"
.comm _numfp,4,2 ## @numfp
L_.str.3: ## @.str.3
.asciz "lea %d(#rbp), #rcx"
.comm _REGAREA_SIZE,4,2 ## @REGAREA_SIZE
L_.str.4: ## @.str.4
.asciz "mov #rcx, 16(#rax)"
.no_dead_strip _emit_builtin_va_start
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_builtin_va_start
_emit_builtin_va_start: ; @emit_builtin_va_start
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w0, [x0]
bl _vec_len
cmp w0, #1
cset w0, eq
bl _assert
ldr w0, [x19]
bl _vec_head
bl _emit_expr
Lloh0:
adrp x19, l_.str@PAGE
Lloh1:
add x19, x19, l_.str@PAGEOFF
mov x0, x19
bl _push
Lloh2:
adrp x8, _numgp@GOTPAGE
Lloh3:
ldr x8, [x8, _numgp@GOTPAGEOFF]
Lloh4:
ldr w8, [x8]
lsl w8, w8, #3
str x8, [sp]
Lloh5:
adrp x0, l_.str.1@PAGE
Lloh6:
add x0, x0, l_.str.1@PAGEOFF
bl _emit
Lloh7:
adrp x8, _numfp@GOTPAGE
Lloh8:
ldr x8, [x8, _numfp@GOTPAGEOFF]
Lloh9:
ldr w8, [x8]
lsl w8, w8, #4
add w8, w8, #48
str x8, [sp]
Lloh10:
adrp x0, l_.str.2@PAGE
Lloh11:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
Lloh12:
adrp x8, _REGAREA_SIZE@GOTPAGE
Lloh13:
ldr x8, [x8, _REGAREA_SIZE@GOTPAGEOFF]
Lloh14:
ldr w8, [x8]
neg w8, w8
str x8, [sp]
Lloh15:
adrp x0, l_.str.3@PAGE
Lloh16:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
Lloh17:
adrp x0, l_.str.4@PAGE
Lloh18:
add x0, x0, l_.str.4@PAGEOFF
bl _emit
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
b _pop
.loh AdrpAdd Lloh17, Lloh18
.loh AdrpAdd Lloh15, Lloh16
.loh AdrpLdrGotLdr Lloh12, Lloh13, Lloh14
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpLdrGotLdr Lloh7, Lloh8, Lloh9
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpLdrGotLdr Lloh2, Lloh3, Lloh4
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rcx"
l_.str.1: ; @.str.1
.asciz "movl $%d, (#rax)"
.comm _numgp,4,2 ; @numgp
l_.str.2: ; @.str.2
.asciz "movl $%d, 4(#rax)"
.comm _numfp,4,2 ; @numfp
l_.str.3: ; @.str.3
.asciz "lea %d(#rbp), #rcx"
.comm _REGAREA_SIZE,4,2 ; @REGAREA_SIZE
l_.str.4: ; @.str.4
.asciz "mov #rcx, 16(#rax)"
.no_dead_strip _emit_builtin_va_start
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_builtin_va_start.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_cast
_emit_cast: ## @emit_cast
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movq (%rdi), %rdi
callq _emit_expr
movl 8(%rbx), %edi
movq (%rbx), %rax
movl (%rax), %esi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_load_convert ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_cast
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_cast
_emit_cast: ; @emit_cast
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr x0, [x0]
bl _emit_expr
ldr w0, [x19, #8]
ldr x8, [x19]
ldr w1, [x8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_load_convert
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_cast
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_cast.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_comma
_emit_comma: ## @emit_comma
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movl 4(%rdi), %edi
callq _emit_expr
movl (%rbx), %edi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_expr ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_comma
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_comma
_emit_comma: ; @emit_comma
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w0, [x0, #4]
bl _emit_expr
ldr w0, [x19]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_expr
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_comma
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_comma.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_comp
_emit_comp: ## @emit_comp
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
.cfi_offset %rbx, -48
.cfi_offset %r12, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq (%rdx), %rax
movq (%rax), %rdi
callq _is_flotype
movq %rax, %rbx
movq (%r12), %rdi
callq _emit_expr
testq %rbx, %rbx
je LBB0_2
## %bb.1:
xorl %edi, %edi
callq _push_xmm
movq 8(%r12), %rdi
callq _emit_expr
movl $1, %edi
callq _pop_xmm
movq (%r12), %rax
movq (%rax), %rax
movl (%rax), %eax
movq _KIND_FLOAT@GOTPCREL(%rip), %rcx
cmpl (%rcx), %eax
leaq L_.str(%rip), %rax
leaq L_.str.1(%rip), %rdi
cmoveq %rax, %rdi
jmp LBB0_3
LBB0_2:
leaq L_.str.2(%rip), %rdi
callq _push
movq 8(%r12), %rdi
callq _emit_expr
leaq L_.str.3(%rip), %rdi
callq _pop
movq (%r12), %rax
movq (%rax), %rax
movl (%rax), %eax
movq _KIND_LONG@GOTPCREL(%rip), %rcx
movq _KIND_LLONG@GOTPCREL(%rip), %rdx
cmpl (%rdx), %eax
leaq L_.str.4(%rip), %rdx
leaq L_.str.5(%rip), %rdi
cmoveq %rdx, %rdi
cmpl (%rcx), %eax
cmoveq %rdx, %rdi
LBB0_3:
xorl %eax, %eax
callq _emit
movq (%r12), %rax
movq (%rax), %rdi
callq _is_flotype
testq %rax, %rax
jne LBB0_5
## %bb.4:
movq (%r12), %rax
movq (%rax), %rax
cmpq $0, 8(%rax)
cmoveq %r14, %r15
LBB0_5:
leaq L_.str.6(%rip), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq _emit
leaq L_.str.7(%rip), %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_FLOAT,4,2 ## @KIND_FLOAT
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "ucomiss #xmm0, #xmm1"
L_.str.1: ## @.str.1
.asciz "ucomisd #xmm0, #xmm1"
L_.str.2: ## @.str.2
.asciz "rax"
L_.str.3: ## @.str.3
.asciz "rcx"
.comm _KIND_LONG,4,2 ## @KIND_LONG
.comm _KIND_LLONG,4,2 ## @KIND_LLONG
L_.str.4: ## @.str.4
.asciz "cmp #rax, #rcx"
L_.str.5: ## @.str.5
.asciz "cmp #eax, #ecx"
L_.str.6: ## @.str.6
.asciz "%s #al"
L_.str.7: ## @.str.7
.asciz "movzb #al, #eax"
.no_dead_strip _emit_comp
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_comp
_emit_comp: ; @emit_comp
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x21, x2
mov x19, x1
mov x20, x0
ldr x8, [x2]
ldr x0, [x8]
bl _is_flotype
mov x22, x0
ldr x0, [x21]
bl _emit_expr
cbz x22, LBB0_2
; %bb.1:
mov w0, #0
bl _push_xmm
ldr x0, [x21, #8]
bl _emit_expr
mov w0, #1
bl _pop_xmm
ldr x8, [x21]
ldr x8, [x8]
ldr w8, [x8]
Lloh0:
adrp x9, _KIND_FLOAT@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_FLOAT@GOTPAGEOFF]
Lloh2:
ldr w9, [x9]
Lloh3:
adrp x10, l_.str.1@PAGE
Lloh4:
add x10, x10, l_.str.1@PAGEOFF
Lloh5:
adrp x11, l_.str@PAGE
Lloh6:
add x11, x11, l_.str@PAGEOFF
cmp w8, w9
csel x0, x11, x10, eq
b LBB0_3
LBB0_2:
Lloh7:
adrp x0, l_.str.2@PAGE
Lloh8:
add x0, x0, l_.str.2@PAGEOFF
bl _push
ldr x0, [x21, #8]
bl _emit_expr
Lloh9:
adrp x0, l_.str.3@PAGE
Lloh10:
add x0, x0, l_.str.3@PAGEOFF
bl _pop
ldr x8, [x21]
ldr x8, [x8]
Lloh11:
adrp x9, _KIND_LONG@GOTPAGE
Lloh12:
ldr x9, [x9, _KIND_LONG@GOTPAGEOFF]
ldr w8, [x8]
Lloh13:
ldr w9, [x9]
Lloh14:
adrp x10, _KIND_LLONG@GOTPAGE
Lloh15:
ldr x10, [x10, _KIND_LLONG@GOTPAGEOFF]
Lloh16:
ldr w10, [x10]
cmp w8, w10
ccmp w8, w9, #4, ne
Lloh17:
adrp x8, l_.str.5@PAGE
Lloh18:
add x8, x8, l_.str.5@PAGEOFF
Lloh19:
adrp x9, l_.str.4@PAGE
Lloh20:
add x9, x9, l_.str.4@PAGEOFF
csel x0, x9, x8, eq
LBB0_3:
bl _emit
ldr x8, [x21]
ldr x0, [x8]
bl _is_flotype
cbnz x0, LBB0_5
; %bb.4:
ldr x8, [x21]
ldr x8, [x8]
ldr x8, [x8, #8]
cmp x8, #0
csel x19, x20, x19, eq
LBB0_5:
str x19, [sp]
Lloh21:
adrp x0, l_.str.6@PAGE
Lloh22:
add x0, x0, l_.str.6@PAGEOFF
bl _emit
Lloh23:
adrp x0, l_.str.7@PAGE
Lloh24:
add x0, x0, l_.str.7@PAGEOFF
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _emit
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh19, Lloh20
.loh AdrpAdd Lloh17, Lloh18
.loh AdrpLdrGotLdr Lloh14, Lloh15, Lloh16
.loh AdrpLdrGotLdr Lloh11, Lloh12, Lloh13
.loh AdrpAdd Lloh9, Lloh10
.loh AdrpAdd Lloh7, Lloh8
.loh AdrpAdd Lloh23, Lloh24
.loh AdrpAdd Lloh21, Lloh22
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_FLOAT,4,2 ; @KIND_FLOAT
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "ucomiss #xmm0, #xmm1"
l_.str.1: ; @.str.1
.asciz "ucomisd #xmm0, #xmm1"
l_.str.2: ; @.str.2
.asciz "rax"
l_.str.3: ; @.str.3
.asciz "rcx"
.comm _KIND_LONG,4,2 ; @KIND_LONG
.comm _KIND_LLONG,4,2 ; @KIND_LLONG
l_.str.4: ; @.str.4
.asciz "cmp #rax, #rcx"
l_.str.5: ; @.str.5
.asciz "cmp #eax, #ecx"
l_.str.6: ; @.str.6
.asciz "%s #al"
l_.str.7: ; @.str.7
.asciz "movzb #al, #eax"
.no_dead_strip _emit_comp
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_comp.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_compound_stmt
_emit_compound_stmt: ## @emit_compound_stmt
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movq %rdi, %r14
movl (%rdi), %edi
callq _vec_len
testl %eax, %eax
jle LBB0_3
## %bb.1:
xorl %ebx, %ebx
.p2align 4, 0x90
LBB0_2: ## =>This Inner Loop Header: Depth=1
movl (%r14), %edi
movl %ebx, %esi
callq _vec_get
movl %eax, %edi
callq _emit_expr
incl %ebx
movl (%r14), %edi
callq _vec_len
cmpl %eax, %ebx
jl LBB0_2
LBB0_3:
popq %rbx
popq %r14
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_compound_stmt
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_compound_stmt
_emit_compound_stmt: ; @emit_compound_stmt
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w0, [x0]
bl _vec_len
cmp w0, #1
b.lt LBB0_3
; %bb.1:
mov w20, #0
LBB0_2: ; =>This Inner Loop Header: Depth=1
ldr w0, [x19]
mov x1, x20
bl _vec_get
bl _emit_expr
add w20, w20, #1
ldr w0, [x19]
bl _vec_len
cmp w20, w0
b.lt LBB0_2
LBB0_3:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_compound_stmt
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_compound_stmt.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_computed_goto
_emit_computed_goto: ## @emit_computed_goto
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl (%rdi), %edi
callq _emit_expr
leaq L_.str(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "jmp *#rax"
.no_dead_strip _emit_computed_goto
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_computed_goto
_emit_computed_goto: ; @emit_computed_goto
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
ldr w0, [x0]
bl _emit_expr
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
b _emit
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "jmp *#rax"
.no_dead_strip _emit_computed_goto
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_computed_goto.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_conv
_emit_conv: ## @emit_conv
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movq (%rdi), %rdi
callq _emit_expr
movl 8(%rbx), %edi
movq (%rbx), %rax
movl (%rax), %esi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_load_convert ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_conv
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_conv
_emit_conv: ; @emit_conv
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr x0, [x0]
bl _emit_expr
ldr w0, [x19, #8]
ldr x8, [x19]
ldr w1, [x8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_load_convert
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_conv
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_conv.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_copy_struct
_emit_copy_struct: ## @emit_copy_struct
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
.cfi_offset %rbx, -48
.cfi_offset %r12, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rsi, %rbx
movq %rdi, %r14
leaq L_.str(%rip), %rdi
callq _push
leaq L_.str.1(%rip), %rdi
callq _push
movq %rbx, %rdi
callq _emit_addr
leaq L_.str.2(%rip), %rdi
xorl %ebx, %ebx
xorl %eax, %eax
callq _emit
movq %r14, %rdi
callq _emit_addr
movq (%r14), %rax
movl (%rax), %eax
testl %eax, %eax
jle LBB0_3
## %bb.1:
leaq L_.str.3(%rip), %r15
leaq L_.str.4(%rip), %r12
xorl %ebx, %ebx
.p2align 4, 0x90
LBB0_2: ## =>This Inner Loop Header: Depth=1
movq %r15, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq _emit
movq %r12, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq _emit
addl $8, %ebx
movq (%r14), %rax
movl (%rax), %eax
cmpl %eax, %ebx
jl LBB0_2
LBB0_3:
cmpl %eax, %ebx
jge LBB0_6
## %bb.4:
leaq L_.str.5(%rip), %r15
leaq L_.str.6(%rip), %r12
.p2align 4, 0x90
LBB0_5: ## =>This Inner Loop Header: Depth=1
movq %r15, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq _emit
movq %r12, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq _emit
addl $4, %ebx
movq (%r14), %rax
movl (%rax), %eax
cmpl %eax, %ebx
jl LBB0_5
LBB0_6:
cmpl %eax, %ebx
jge LBB0_9
## %bb.7:
leaq L_.str.7(%rip), %r15
leaq L_.str.8(%rip), %r12
.p2align 4, 0x90
LBB0_8: ## =>This Inner Loop Header: Depth=1
movq %r15, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq _emit
movq %r12, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq _emit
incl %ebx
movq (%r14), %rax
cmpl (%rax), %ebx
jl LBB0_8
LBB0_9:
leaq L_.str.1(%rip), %rdi
callq _pop
leaq L_.str(%rip), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp _pop ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rcx"
L_.str.1: ## @.str.1
.asciz "r11"
L_.str.2: ## @.str.2
.asciz "mov #rax, #rcx"
L_.str.3: ## @.str.3
.asciz "movq %d(#rcx), #r11"
L_.str.4: ## @.str.4
.asciz "movq #r11, %d(#rax)"
L_.str.5: ## @.str.5
.asciz "movl %d(#rcx), #r11"
L_.str.6: ## @.str.6
.asciz "movl #r11, %d(#rax)"
L_.str.7: ## @.str.7
.asciz "movb %d(#rcx), #r11"
L_.str.8: ## @.str.8
.asciz "movb #r11, %d(#rax)"
.no_dead_strip _emit_copy_struct
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_copy_struct
_emit_copy_struct: ; @emit_copy_struct
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x20, x1
mov x19, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _push
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _push
mov x0, x20
bl _emit_addr
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
mov x0, x19
bl _emit_addr
ldr x8, [x19]
ldr w8, [x8]
cmp w8, #1
b.lt LBB0_4
; %bb.1:
mov w22, #0
Lloh6:
adrp x20, l_.str.3@PAGE
Lloh7:
add x20, x20, l_.str.3@PAGEOFF
Lloh8:
adrp x21, l_.str.4@PAGE
Lloh9:
add x21, x21, l_.str.4@PAGEOFF
LBB0_2: ; =>This Inner Loop Header: Depth=1
str x22, [sp]
mov x0, x20
bl _emit
str x22, [sp]
mov x0, x21
bl _emit
add w22, w22, #8
ldr x8, [x19]
ldr w8, [x8]
cmp w22, w8
b.lt LBB0_2
; %bb.3:
; kill: def $w22 killed $w22 killed $x22 def $x22
cmp w22, w8
b.lt LBB0_5
b LBB0_7
LBB0_4:
mov w22, #0
cmp w22, w8
b.ge LBB0_7
LBB0_5:
Lloh10:
adrp x20, l_.str.5@PAGE
Lloh11:
add x20, x20, l_.str.5@PAGEOFF
Lloh12:
adrp x21, l_.str.6@PAGE
Lloh13:
add x21, x21, l_.str.6@PAGEOFF
LBB0_6: ; =>This Inner Loop Header: Depth=1
str x22, [sp]
mov x0, x20
bl _emit
str x22, [sp]
mov x0, x21
bl _emit
add w22, w22, #4
ldr x8, [x19]
ldr w8, [x8]
cmp w22, w8
b.lt LBB0_6
LBB0_7:
; kill: def $w22 killed $w22 killed $x22 def $x22
cmp w22, w8
b.ge LBB0_10
; %bb.8:
Lloh14:
adrp x20, l_.str.7@PAGE
Lloh15:
add x20, x20, l_.str.7@PAGEOFF
Lloh16:
adrp x21, l_.str.8@PAGE
Lloh17:
add x21, x21, l_.str.8@PAGEOFF
LBB0_9: ; =>This Inner Loop Header: Depth=1
str x22, [sp]
mov x0, x20
bl _emit
str x22, [sp]
mov x0, x21
bl _emit
add w22, w22, #1
ldr x8, [x19]
ldr w8, [x8]
cmp w22, w8
b.lt LBB0_9
LBB0_10:
Lloh18:
adrp x0, l_.str.1@PAGE
Lloh19:
add x0, x0, l_.str.1@PAGEOFF
bl _pop
Lloh20:
adrp x0, l_.str@PAGE
Lloh21:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _pop
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh16, Lloh17
.loh AdrpAdd Lloh14, Lloh15
.loh AdrpAdd Lloh20, Lloh21
.loh AdrpAdd Lloh18, Lloh19
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rcx"
l_.str.1: ; @.str.1
.asciz "r11"
l_.str.2: ; @.str.2
.asciz "mov #rax, #rcx"
l_.str.3: ; @.str.3
.asciz "movq %d(#rcx), #r11"
l_.str.4: ; @.str.4
.asciz "movq #r11, %d(#rax)"
l_.str.5: ; @.str.5
.asciz "movl %d(#rcx), #r11"
l_.str.6: ; @.str.6
.asciz "movl #r11, %d(#rax)"
l_.str.7: ; @.str.7
.asciz "movb %d(#rcx), #r11"
l_.str.8: ; @.str.8
.asciz "movb #r11, %d(#rax)"
.no_dead_strip _emit_copy_struct
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_copy_struct.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_data
_emit_data: ## @emit_data
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
leaq L_.str(%rip), %rdi
movl %edx, %esi
callq _emit
movq (%rbx), %rax
movq (%rax), %rcx
cmpl $0, 4(%rcx)
jne LBB0_2
## %bb.1:
movl 8(%rax), %esi
leaq L_.str.1(%rip), %rdi
callq _emit_noindent
movq (%rbx), %rax
LBB0_2:
movl 8(%rax), %esi
leaq L_.str.2(%rip), %rdi
callq _emit_noindent
movl 8(%rbx), %edi
movq (%rbx), %rax
movq (%rax), %rax
movl (%rax), %esi
movl %r14d, %edx
movl %r15d, %ecx
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _do_emit_data ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz ".data %d"
L_.str.1: ## @.str.1
.asciz ".global %s"
L_.str.2: ## @.str.2
.asciz "%s:"
.no_dead_strip _emit_data
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_data
_emit_data: ; @emit_data
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x2
mov x20, x1
mov x21, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
mov x1, x2
bl _emit
ldr x8, [x21]
ldr x9, [x8]
ldr w9, [x9, #4]
cbnz w9, LBB0_2
; %bb.1:
ldr w1, [x8, #8]
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _emit_noindent
ldr x8, [x21]
LBB0_2:
ldr w1, [x8, #8]
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
bl _emit_noindent
ldr w0, [x21, #8]
ldr x8, [x21]
ldr x8, [x8]
ldr w1, [x8]
mov x2, x20
mov x3, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _do_emit_data
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz ".data %d"
l_.str.1: ; @.str.1
.asciz ".global %s"
l_.str.2: ; @.str.2
.asciz "%s:"
.no_dead_strip _emit_data
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_data.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_data_addr
_emit_data_addr: ## @emit_data_addr
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $129, %eax
je LBB0_3
## %bb.1:
cmpl $128, %eax
jne LBB0_5
## %bb.2:
movl %esi, %r14d
xorl %eax, %eax
callq _make_label
movq %rax, %r15
leal 1(%r14), %r12d
leaq L_.str(%rip), %r13
movq %r13, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq _emit
movq %r15, %rdi
callq _emit_label
movl 24(%rbx), %edi
movq 16(%rbx), %rax
movl (%rax), %esi
xorl %edx, %edx
movl %r12d, %ecx
callq _do_emit_data
movq %r13, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq _emit
leaq L_.str.1(%rip), %rdi
movq %r15, %rsi
jmp LBB0_4
LBB0_3:
movq 8(%rbx), %rsi
leaq L_.str.1(%rip), %rdi
LBB0_4:
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
LBB0_5:
leaq L_.str.2(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _error ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz ".data %d"
L_.str.1: ## @.str.1
.asciz ".quad %s"
L_.str.2: ## @.str.2
.asciz "internal error"
.no_dead_strip _emit_data_addr
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_data_addr
_emit_data_addr: ; @emit_data_addr
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x24, x23, [sp, #16] ; 16-byte Folded Spill
stp x22, x21, [sp, #32] ; 16-byte Folded Spill
stp x20, x19, [sp, #48] ; 16-byte Folded Spill
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp, #64
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
mov x20, x0
ldr w8, [x0]
cmp w8, #129
b.eq LBB0_3
; %bb.1:
cmp w8, #128
b.ne LBB0_5
; %bb.2:
mov x19, x1
bl _make_label
mov x21, x0
add w22, w19, #1
str x22, [sp]
Lloh0:
adrp x23, l_.str@PAGE
Lloh1:
add x23, x23, l_.str@PAGEOFF
mov x0, x23
bl _emit
mov x0, x21
bl _emit_label
ldr w0, [x20, #24]
ldr x8, [x20, #16]
ldr w1, [x8]
mov w2, #0
mov x3, x22
bl _do_emit_data
str x19, [sp]
mov x0, x23
bl _emit
str x21, [sp]
b LBB0_4
LBB0_3:
ldr x8, [x20, #8]
str x8, [sp]
LBB0_4:
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _emit
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #80
ret
LBB0_5:
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #80
b _error
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz ".data %d"
l_.str.1: ; @.str.1
.asciz ".quad %s"
l_.str.2: ; @.str.2
.asciz "internal error"
.no_dead_strip _emit_data_addr
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_data_addr.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_data_charptr
_emit_data_charptr: ## @emit_data_charptr
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
.cfi_offset %rbx, -48
.cfi_offset %r12, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %esi, %r14d
movq %rdi, %r15
xorl %eax, %eax
callq _make_label
movq %rax, %rbx
leal 1(%r14), %esi
leaq L_.str(%rip), %r12
movq %r12, %rdi
xorl %eax, %eax
callq _emit
movq %rbx, %rdi
callq _emit_label
movq %r15, %rdi
callq _quote_cstring
leaq L_.str.1(%rip), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq _emit
movq %r12, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq _emit
leaq L_.str.2(%rip), %rdi
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz ".data %d"
L_.str.1: ## @.str.1
.asciz ".string \"%s\""
L_.str.2: ## @.str.2
.asciz ".quad %s"
.no_dead_strip _emit_data_charptr
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_data_charptr
_emit_data_charptr: ; @emit_data_charptr
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x1
mov x20, x0
bl _make_label
mov x21, x0
add w8, w19, #1
str x8, [sp]
Lloh0:
adrp x22, l_.str@PAGE
Lloh1:
add x22, x22, l_.str@PAGEOFF
mov x0, x22
bl _emit
mov x0, x21
bl _emit_label
mov x0, x20
bl _quote_cstring
str x0, [sp]
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _emit
str x19, [sp]
mov x0, x22
bl _emit
str x21, [sp]
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
ret
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz ".data %d"
l_.str.1: ; @.str.1
.asciz ".string \"%s\""
l_.str.2: ; @.str.2
.asciz ".quad %s"
.no_dead_strip _emit_data_charptr
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_data_charptr.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_data_primtype
_emit_data_primtype: ## @emit_data_primtype
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rsi, %rbx
movl (%rdi), %eax
addl $-128, %eax
cmpl $8, %eax
ja LBB0_26
## %bb.1:
leaq LJTI0_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_10:
movl 8(%rbx), %eax
movq _OP_LABEL_ADDR@GOTPCREL(%rip), %rcx
cmpl (%rcx), %eax
jne LBB0_13
## %bb.11:
movl 36(%rbx), %esi
leaq L_.str.4(%rip), %rdi
jmp LBB0_7
LBB0_13:
movq 16(%rbx), %r8
movq 24(%r8), %rsi
movl (%rsi), %edi
movq _KIND_ARRAY@GOTPCREL(%rip), %rcx
cmpl (%rcx), %edi
jne LBB0_15
## %bb.14:
movq 8(%rsi), %rcx
cmpl $135, (%rcx)
jne LBB0_15
## %bb.27:
movl 32(%r8), %edi
movl %edx, %esi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit_data_charptr ## TAILCALL
LBB0_15:
movq _AST_GVAR@GOTPCREL(%rip), %r14
cmpl (%r14), %eax
jne LBB0_17
## %bb.16:
movl 4(%rbx), %esi
leaq L_.str.4(%rip), %rdi
jmp LBB0_7
LBB0_26:
callq _ty2s
movslq %eax, %r14
movq %rbx, %rdi
callq _node2s
leaq L_.str.8(%rip), %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _error ## TAILCALL
LBB0_8:
movq %rbx, %rdi
xorl %esi, %esi
callq _eval_intexpr
leaq L_.str.3(%rip), %rdi
jmp LBB0_6
LBB0_9:
movq %rbx, %rdi
xorl %esi, %esi
callq _eval_intexpr
leaq L_.str(%rip), %rdi
jmp LBB0_6
LBB0_2:
movl (%rbx), %esi
leaq L_.str(%rip), %rdi
jmp LBB0_7
LBB0_3:
movl (%rbx), %esi
leaq L_.str.1(%rip), %rdi
jmp LBB0_7
LBB0_5:
movq %rbx, %rdi
xorl %esi, %esi
callq _eval_intexpr
leaq L_.str.2(%rip), %rdi
LBB0_6:
movl %eax, %esi
jmp LBB0_7
LBB0_4:
movq %rbx, %rdi
xorl %esi, %esi
callq _eval_intexpr
xorl %esi, %esi
testl %eax, %eax
setne %sil
leaq L_.str.2(%rip), %rdi
LBB0_7:
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
LBB0_17:
movq $0, -32(%rbp)
leaq -32(%rbp), %rsi
movq %rbx, %rdi
callq _eval_intexpr
movl %eax, %r15d
movq -32(%rbp), %rax
testq %rax, %rax
je LBB0_18
## %bb.19:
movl 8(%rax), %ecx
movq _AST_CONV@GOTPCREL(%rip), %rdx
cmpl (%rdx), %ecx
je LBB0_21
## %bb.20:
movq _AST_ADDR@GOTPCREL(%rip), %rdx
movq %rax, %rdi
cmpl (%rdx), %ecx
jne LBB0_22
LBB0_21:
movq 16(%rax), %rdi
movq %rdi, -32(%rbp)
movl 8(%rdi), %ecx
LBB0_22:
movq 24(%rax), %rbx
cmpl (%r14), %ecx
je LBB0_24
## %bb.23:
callq _node2s
leaq L_.str.6(%rip), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq _error
LBB0_24:
movq 8(%rbx), %rdi
callq _assert
movq -32(%rbp), %rax
movl 4(%rax), %esi
movq 8(%rbx), %rax
imull 4(%rax), %r15d
leaq L_.str.7(%rip), %rdi
movl %r15d, %edx
xorl %eax, %eax
callq _emit
jmp LBB0_25
LBB0_18:
leaq L_.str.5(%rip), %rdi
movl %r15d, %esi
xorl %eax, %eax
callq _emit
LBB0_25:
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
.long L0_0_set_8
.long L0_0_set_10
.long L0_0_set_10
.long L0_0_set_10
.long L0_0_set_9
.long L0_0_set_2
.long L0_0_set_3
.long L0_0_set_5
.long L0_0_set_4
.end_data_region
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz ".long %d"
L_.str.1: ## @.str.1
.asciz ".quad %ld"
L_.str.2: ## @.str.2
.asciz ".byte %d"
L_.str.3: ## @.str.3
.asciz ".short %d"
.comm _OP_LABEL_ADDR,4,2 ## @OP_LABEL_ADDR
L_.str.4: ## @.str.4
.asciz ".quad %s"
.comm _KIND_ARRAY,4,2 ## @KIND_ARRAY
.comm _AST_GVAR,4,2 ## @AST_GVAR
L_.str.5: ## @.str.5
.asciz ".quad %u"
.comm _AST_CONV,4,2 ## @AST_CONV
.comm _AST_ADDR,4,2 ## @AST_ADDR
L_.str.6: ## @.str.6
.asciz "global variable expected, but got %s"
L_.str.7: ## @.str.7
.asciz ".quad %s+%u"
L_.str.8: ## @.str.8
.asciz "don't know how to handle\n <%s>\n <%s>"
.no_dead_strip _emit_data_primtype
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_data_primtype
_emit_data_primtype: ; @emit_data_primtype
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x1
ldr w8, [x0]
sub w8, w8, #128
cmp w8, #8
b.hi LBB0_10
; %bb.1:
Lloh0:
adrp x9, lJTI0_0@PAGE
Lloh1:
add x9, x9, lJTI0_0@PAGEOFF
adr x10, LBB0_2
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_2:
ldr w8, [x19, #8]
Lloh2:
adrp x9, _OP_LABEL_ADDR@GOTPAGE
Lloh3:
ldr x9, [x9, _OP_LABEL_ADDR@GOTPAGEOFF]
Lloh4:
ldr w9, [x9]
cmp w8, w9
b.ne LBB0_4
; %bb.3:
ldr w1, [x19, #36]
b LBB0_9
LBB0_4:
ldr x9, [x19, #16]
ldr x10, [x9, #24]
ldr w11, [x10]
Lloh5:
adrp x12, _KIND_ARRAY@GOTPAGE
Lloh6:
ldr x12, [x12, _KIND_ARRAY@GOTPAGEOFF]
Lloh7:
ldr w12, [x12]
cmp w11, w12
b.ne LBB0_7
; %bb.5:
ldr x10, [x10, #8]
ldr w10, [x10]
cmp w10, #135
b.ne LBB0_7
; %bb.6:
ldr w0, [x9, #32]
mov x1, x2
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _emit_data_charptr
LBB0_7:
Lloh8:
adrp x21, _AST_GVAR@GOTPAGE
Lloh9:
ldr x21, [x21, _AST_GVAR@GOTPAGEOFF]
ldr w9, [x21]
cmp w8, w9
b.ne LBB0_20
; %bb.8:
ldr w1, [x19, #4]
LBB0_9:
Lloh10:
adrp x0, l_.str.4@PAGE
Lloh11:
add x0, x0, l_.str.4@PAGEOFF
b LBB0_19
LBB0_10:
bl _ty2s
; kill: def $w0 killed $w0 def $x0
sxtw x20, w0
mov x0, x19
bl _node2s
str x0, [sp]
Lloh12:
adrp x0, l_.str.8@PAGE
Lloh13:
add x0, x0, l_.str.8@PAGEOFF
mov x1, x20
bl _error
b LBB0_28
LBB0_11:
mov x0, x19
mov x1, #0
bl _eval_intexpr
mov x1, x0
Lloh14:
adrp x0, l_.str.3@PAGE
Lloh15:
add x0, x0, l_.str.3@PAGEOFF
b LBB0_19
LBB0_12:
mov x0, x19
mov x1, #0
bl _eval_intexpr
mov x1, x0
b LBB0_14
LBB0_13:
ldr w1, [x19]
LBB0_14:
Lloh16:
adrp x0, l_.str@PAGE
Lloh17:
add x0, x0, l_.str@PAGEOFF
b LBB0_19
LBB0_15:
ldr w1, [x19]
Lloh18:
adrp x0, l_.str.1@PAGE
Lloh19:
add x0, x0, l_.str.1@PAGEOFF
b LBB0_19
LBB0_16:
mov x0, x19
mov x1, #0
bl _eval_intexpr
mov x1, x0
b LBB0_18
LBB0_17:
mov x0, x19
mov x1, #0
bl _eval_intexpr
cmp w0, #0
cset w1, ne
LBB0_18:
Lloh20:
adrp x0, l_.str.2@PAGE
Lloh21:
add x0, x0, l_.str.2@PAGEOFF
LBB0_19:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _emit
LBB0_20:
str xzr, [sp, #8]
add x1, sp, #8
mov x0, x19
bl _eval_intexpr
mov x19, x0
ldr x0, [sp, #8]
cbz x0, LBB0_26
; %bb.21:
ldr x20, [x0, #24]
ldr w8, [x0, #8]
Lloh22:
adrp x9, _AST_CONV@GOTPAGE
Lloh23:
ldr x9, [x9, _AST_CONV@GOTPAGEOFF]
Lloh24:
ldr w9, [x9]
Lloh25:
adrp x10, _AST_ADDR@GOTPAGE
Lloh26:
ldr x10, [x10, _AST_ADDR@GOTPAGEOFF]
Lloh27:
ldr w10, [x10]
cmp w8, w9
ccmp w8, w10, #4, ne
b.ne LBB0_23
; %bb.22:
ldr x0, [x0, #16]
str x0, [sp, #8]
ldr w8, [x0, #8]
LBB0_23:
ldr w9, [x21]
cmp w8, w9
b.eq LBB0_25
; %bb.24:
bl _node2s
mov x1, x0
Lloh28:
adrp x0, l_.str.6@PAGE
Lloh29:
add x0, x0, l_.str.6@PAGEOFF
bl _error
LBB0_25:
ldr x0, [x20, #8]
bl _assert
ldr x8, [sp, #8]
ldr w1, [x8, #4]
ldr x8, [x20, #8]
ldr w8, [x8, #4]
mul w8, w8, w19
str x8, [sp]
Lloh30:
adrp x0, l_.str.7@PAGE
Lloh31:
add x0, x0, l_.str.7@PAGEOFF
b LBB0_27
LBB0_26:
Lloh32:
adrp x0, l_.str.5@PAGE
Lloh33:
add x0, x0, l_.str.5@PAGEOFF
mov x1, x19
LBB0_27:
bl _emit
LBB0_28:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
ret
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpLdrGotLdr Lloh2, Lloh3, Lloh4
.loh AdrpLdrGotLdr Lloh5, Lloh6, Lloh7
.loh AdrpLdrGot Lloh8, Lloh9
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh14, Lloh15
.loh AdrpAdd Lloh16, Lloh17
.loh AdrpAdd Lloh18, Lloh19
.loh AdrpAdd Lloh20, Lloh21
.loh AdrpLdrGotLdr Lloh25, Lloh26, Lloh27
.loh AdrpLdrGotLdr Lloh22, Lloh23, Lloh24
.loh AdrpAdd Lloh28, Lloh29
.loh AdrpAdd Lloh30, Lloh31
.loh AdrpAdd Lloh32, Lloh33
.cfi_endproc
.section __TEXT,__const
lJTI0_0:
.byte (LBB0_11-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_12-LBB0_2)>>2
.byte (LBB0_13-LBB0_2)>>2
.byte (LBB0_15-LBB0_2)>>2
.byte (LBB0_16-LBB0_2)>>2
.byte (LBB0_17-LBB0_2)>>2
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz ".long %d"
l_.str.1: ; @.str.1
.asciz ".quad %ld"
l_.str.2: ; @.str.2
.asciz ".byte %d"
l_.str.3: ; @.str.3
.asciz ".short %d"
.comm _OP_LABEL_ADDR,4,2 ; @OP_LABEL_ADDR
l_.str.4: ; @.str.4
.asciz ".quad %s"
.comm _KIND_ARRAY,4,2 ; @KIND_ARRAY
.comm _AST_GVAR,4,2 ; @AST_GVAR
l_.str.5: ; @.str.5
.asciz ".quad %u"
.comm _AST_CONV,4,2 ; @AST_CONV
.comm _AST_ADDR,4,2 ; @AST_ADDR
l_.str.6: ; @.str.6
.asciz "global variable expected, but got %s"
l_.str.7: ; @.str.7
.asciz ".quad %s+%u"
l_.str.8: ; @.str.8
.asciz "don't know how to handle\n <%s>\n <%s>"
.no_dead_strip _emit_data_primtype
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_data_primtype.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_decl
_emit_decl: ## @emit_decl
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, %rax
movl 8(%rdi), %edi
testl %edi, %edi
je LBB0_1
## %bb.2:
movq (%rax), %rax
movl 8(%rax), %esi
movq (%rax), %rax
movl (%rax), %edx
popq %rbp
jmp _emit_decl_init ## TAILCALL
LBB0_1:
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_decl
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_decl
_emit_decl: ; @emit_decl
.cfi_startproc
; %bb.0:
mov x8, x0
ldr w0, [x0, #8]
cbz w0, LBB0_2
; %bb.1:
ldr x8, [x8]
ldr w1, [x8, #8]
ldr x8, [x8]
ldr w2, [x8]
b _emit_decl_init
LBB0_2:
ret
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_decl
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_decl.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_decl_init
_emit_decl_init: ## @emit_decl_init
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %esi, %ebx
movq %rdi, %r14
callq _emit_fill_holes
movq %r14, %rdi
callq _vec_len
testl %eax, %eax
jle LBB0_7
## %bb.1:
movslq %ebx, %r12
xorl %r15d, %r15d
movq _AST_LITERAL@GOTPCREL(%rip), %r13
jmp LBB0_2
.p2align 4, 0x90
LBB0_5: ## in Loop: Header=BB0_2 Depth=1
callq _emit_expr
movq 16(%rbx), %rdi
movq 8(%rbx), %rsi
addq %r12, %rsi
callq _emit_lsave
LBB0_6: ## in Loop: Header=BB0_2 Depth=1
incl %r15d
movq %r14, %rdi
callq _vec_len
cmpl %eax, %r15d
jge LBB0_7
LBB0_2: ## =>This Inner Loop Header: Depth=1
movq %r14, %rdi
movl %r15d, %esi
callq _vec_get
movq %rax, %rbx
movq (%rax), %rax
xorl %edi, %edi
movq _AST_INIT@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
sete %dil
callq _assert
movq 24(%rbx), %rdi
movq (%rdi), %rax
cmpq (%r13), %rax
jne LBB0_5
## %bb.3: ## in Loop: Header=BB0_2 Depth=1
movq 16(%rbx), %rsi
cmpq $0, (%rsi)
jg LBB0_5
## %bb.4: ## in Loop: Header=BB0_2 Depth=1
movq 8(%rbx), %rdx
addq %r12, %rdx
callq _emit_save_literal
jmp LBB0_6
LBB0_7:
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _AST_INIT,8,3 ## @AST_INIT
.comm _AST_LITERAL,8,3 ## @AST_LITERAL
.no_dead_strip _emit_decl_init
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_decl_init
_emit_decl_init: ; @emit_decl_init
.cfi_startproc
; %bb.0:
stp x24, x23, [sp, #-64]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
mov x21, x1
mov x19, x0
bl _emit_fill_holes
mov x0, x19
bl _vec_len
cmp w0, #1
b.lt LBB0_6
; %bb.1:
mov w20, #0
sxtw x22, w21
Lloh0:
adrp x23, _AST_INIT@GOTPAGE
Lloh1:
ldr x23, [x23, _AST_INIT@GOTPAGEOFF]
Lloh2:
adrp x24, _AST_LITERAL@GOTPAGE
Lloh3:
ldr x24, [x24, _AST_LITERAL@GOTPAGEOFF]
b LBB0_4
LBB0_2: ; in Loop: Header=BB0_4 Depth=1
bl _emit_expr
ldp x8, x0, [x21, #8]
add x1, x8, x22
bl _emit_lsave
LBB0_3: ; in Loop: Header=BB0_4 Depth=1
add w20, w20, #1
mov x0, x19
bl _vec_len
cmp w20, w0
b.ge LBB0_6
LBB0_4: ; =>This Inner Loop Header: Depth=1
mov x0, x19
mov x1, x20
bl _vec_get
mov x21, x0
ldr x8, [x0]
ldr x9, [x23]
cmp x8, x9
cset w0, eq
bl _assert
ldp x1, x0, [x21, #16]
ldr x8, [x1]
ldr x9, [x0]
ldr x10, [x24]
cmp x9, x10
ccmp x8, #0, #0, eq
b.gt LBB0_2
; %bb.5: ; in Loop: Header=BB0_4 Depth=1
ldr x8, [x21, #8]
add x2, x8, x22
bl _emit_save_literal
b LBB0_3
LBB0_6:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
ldp x24, x23, [sp], #64 ; 16-byte Folded Reload
ret
.loh AdrpLdrGot Lloh2, Lloh3
.loh AdrpLdrGot Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _AST_INIT,8,3 ; @AST_INIT
.comm _AST_LITERAL,8,3 ; @AST_LITERAL
.no_dead_strip _emit_decl_init
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_decl_init.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_deref
_emit_deref: ## @emit_deref
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movq (%rdi), %rdi
callq _emit_expr
movq (%rbx), %rax
movq (%rax), %rax
movl (%rax), %edi
leaq L_.str(%rip), %rsi
xorl %edx, %edx
callq _emit_lload
movl 8(%rbx), %edi
movq (%rbx), %rax
movq (%rax), %rax
movl (%rax), %esi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_load_convert ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rax"
.no_dead_strip _emit_deref
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_deref
_emit_deref: ; @emit_deref
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr x0, [x0]
bl _emit_expr
ldr x8, [x19]
ldr x8, [x8]
ldr w0, [x8]
Lloh0:
adrp x1, l_.str@PAGE
Lloh1:
add x1, x1, l_.str@PAGEOFF
mov w2, #0
bl _emit_lload
ldr w0, [x19, #8]
ldr x8, [x19]
ldr x8, [x8]
ldr w1, [x8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_load_convert
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rax"
.no_dead_strip _emit_deref
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_deref.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_expr
_emit_expr: ## @emit_expr
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
callq _maybe_print_source_loc
movl (%rbx), %eax
addl $-33, %eax
cmpl $120, %eax
ja LBB0_37
## %bb.1:
leaq LJTI0_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_13:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_ternary ## TAILCALL
LBB0_26:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_lognot ## TAILCALL
LBB0_37:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_binop ## TAILCALL
LBB0_27:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_bitand ## TAILCALL
LBB0_33:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_comma ## TAILCALL
LBB0_34:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_assign ## TAILCALL
LBB0_28:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_bitor ## TAILCALL
LBB0_29:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_bitnot ## TAILCALL
LBB0_20:
leaq L_.str(%rip), %rsi
jmp LBB0_21
LBB0_22:
leaq L_.str.1(%rip), %rsi
LBB0_21:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_pre_inc_dec ## TAILCALL
LBB0_23:
leaq L_.str(%rip), %rsi
jmp LBB0_24
LBB0_25:
leaq L_.str.1(%rip), %rsi
LBB0_24:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_post_inc_dec ## TAILCALL
LBB0_31:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_logor ## TAILCALL
LBB0_30:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_logand ## TAILCALL
LBB0_35:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_label_addr ## TAILCALL
LBB0_32:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_cast ## TAILCALL
LBB0_19:
movl 4(%rbx), %esi
movl 8(%rbx), %edi
xorl %edx, %edx
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_load_struct_ref ## TAILCALL
LBB0_17:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_return ## TAILCALL
LBB0_3:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_lvar ## TAILCALL
LBB0_2:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_literal ## TAILCALL
LBB0_15:
movl 12(%rbx), %edi
testl %edi, %edi
je LBB0_38
## %bb.16:
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_label ## TAILCALL
LBB0_4:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_gvar ## TAILCALL
LBB0_14:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_goto ## TAILCALL
LBB0_5:
movq %rbx, %rdi
jmp LBB0_6
LBB0_7:
movq %rbx, %rdi
callq _maybe_emit_builtin
testl %eax, %eax
je LBB0_8
LBB0_38:
addq $8, %rsp
popq %rbx
popq %rbp
retq
LBB0_8:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_func_call ## TAILCALL
LBB0_12:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_deref ## TAILCALL
LBB0_9:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_decl ## TAILCALL
LBB0_10:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_conv ## TAILCALL
LBB0_36:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_computed_goto ## TAILCALL
LBB0_18:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_compound_stmt ## TAILCALL
LBB0_11:
movq 16(%rbx), %rdi
LBB0_6:
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_addr ## TAILCALL
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_37, LBB0_37-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_33, LBB0_33-LJTI0_0
.set L0_0_set_34, LBB0_34-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
.set L0_0_set_29, LBB0_29-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_31, LBB0_31-LJTI0_0
.set L0_0_set_30, LBB0_30-LJTI0_0
.set L0_0_set_35, LBB0_35-LJTI0_0
.set L0_0_set_32, LBB0_32-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_36, LBB0_36-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
.long L0_0_set_26
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_27
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_33
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_34
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_37
.long L0_0_set_28
.long L0_0_set_37
.long L0_0_set_29
.long L0_0_set_37
.long L0_0_set_20
.long L0_0_set_22
.long L0_0_set_23
.long L0_0_set_25
.long L0_0_set_31
.long L0_0_set_30
.long L0_0_set_35
.long L0_0_set_32
.long L0_0_set_13
.long L0_0_set_19
.long L0_0_set_17
.long L0_0_set_3
.long L0_0_set_2
.long L0_0_set_15
.long L0_0_set_13
.long L0_0_set_4
.long L0_0_set_14
.long L0_0_set_8
.long L0_0_set_5
.long L0_0_set_7
.long L0_0_set_12
.long L0_0_set_9
.long L0_0_set_10
.long L0_0_set_36
.long L0_0_set_18
.long L0_0_set_11
.end_data_region
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "add"
L_.str.1: ## @.str.1
.asciz "sub"
.no_dead_strip _emit_expr
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_expr
_emit_expr: ; @emit_expr
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
bl _maybe_print_source_loc
ldr w8, [x19]
sub w8, w8, #33
cmp w8, #120
b.hi LBB0_4
; %bb.1:
Lloh0:
adrp x9, lJTI0_0@PAGE
Lloh1:
add x9, x9, lJTI0_0@PAGEOFF
adr x10, LBB0_2
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_2:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_ternary
LBB0_3:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_lognot
LBB0_4:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_binop
LBB0_5:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_bitand
LBB0_6:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_comma
LBB0_7:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_assign
LBB0_8:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_bitor
LBB0_9:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_bitnot
LBB0_10:
Lloh2:
adrp x1, l_.str@PAGE
Lloh3:
add x1, x1, l_.str@PAGEOFF
b LBB0_12
LBB0_11:
Lloh4:
adrp x1, l_.str.1@PAGE
Lloh5:
add x1, x1, l_.str.1@PAGEOFF
LBB0_12:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_pre_inc_dec
LBB0_13:
Lloh6:
adrp x1, l_.str@PAGE
Lloh7:
add x1, x1, l_.str@PAGEOFF
b LBB0_15
LBB0_14:
Lloh8:
adrp x1, l_.str.1@PAGE
Lloh9:
add x1, x1, l_.str.1@PAGEOFF
LBB0_15:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_post_inc_dec
LBB0_16:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_logor
LBB0_17:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_logand
LBB0_18:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_label_addr
LBB0_19:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_cast
LBB0_20:
ldp w1, w0, [x19, #4]
mov w2, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_load_struct_ref
LBB0_21:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_return
LBB0_22:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_lvar
LBB0_23:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_literal
LBB0_24:
ldr w0, [x19, #12]
cbz w0, LBB0_30
; %bb.25:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_label
LBB0_26:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_gvar
LBB0_27:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_goto
LBB0_28:
mov x0, x19
b LBB0_38
LBB0_29:
mov x0, x19
bl _maybe_emit_builtin
cbz w0, LBB0_31
LBB0_30:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
LBB0_31:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_func_call
LBB0_32:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_deref
LBB0_33:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_decl
LBB0_34:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_conv
LBB0_35:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_computed_goto
LBB0_36:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_compound_stmt
LBB0_37:
ldr x0, [x19, #16]
LBB0_38:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_addr
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh8, Lloh9
.cfi_endproc
.section __TEXT,__const
lJTI0_0:
.byte (LBB0_3-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_5-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_6-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_7-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_9-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_10-LBB0_2)>>2
.byte (LBB0_11-LBB0_2)>>2
.byte (LBB0_13-LBB0_2)>>2
.byte (LBB0_14-LBB0_2)>>2
.byte (LBB0_16-LBB0_2)>>2
.byte (LBB0_17-LBB0_2)>>2
.byte (LBB0_18-LBB0_2)>>2
.byte (LBB0_19-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_20-LBB0_2)>>2
.byte (LBB0_21-LBB0_2)>>2
.byte (LBB0_22-LBB0_2)>>2
.byte (LBB0_23-LBB0_2)>>2
.byte (LBB0_24-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_26-LBB0_2)>>2
.byte (LBB0_27-LBB0_2)>>2
.byte (LBB0_31-LBB0_2)>>2
.byte (LBB0_28-LBB0_2)>>2
.byte (LBB0_29-LBB0_2)>>2
.byte (LBB0_32-LBB0_2)>>2
.byte (LBB0_33-LBB0_2)>>2
.byte (LBB0_34-LBB0_2)>>2
.byte (LBB0_35-LBB0_2)>>2
.byte (LBB0_36-LBB0_2)>>2
.byte (LBB0_37-LBB0_2)>>2
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "add"
l_.str.1: ; @.str.1
.asciz "sub"
.no_dead_strip _emit_expr
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_expr.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_fill_holes
_emit_fill_holes: ## @emit_fill_holes
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edx, -48(%rbp) ## 4-byte Spill
movl %esi, -44(%rbp) ## 4-byte Spill
movq %rdi, %r13
callq _vec_len
movl %eax, %r14d
movl %eax, %r12d
leal (,%r14,8), %edi
callq _malloc
movq %rax, %r15
testl %r14d, %r14d
jle LBB0_1
## %bb.3:
xorl %r14d, %r14d
.p2align 4, 0x90
LBB0_4: ## =>This Inner Loop Header: Depth=1
movq %r13, %rdi
movl %r14d, %esi
callq _vec_get
movq %rax, (%r15,%r14,8)
incq %r14
cmpq %r14, %r12
jne LBB0_4
## %bb.5:
movq _cmpinit@GOTPCREL(%rip), %rax
movl (%rax), %ecx
movq %r15, %rdi
movl %r12d, %esi
movl $8, %edx
callq _qsort
xorl %ebx, %ebx
xorl %edi, %edi
movl -44(%rbp), %r13d ## 4-byte Reload
jmp LBB0_6
.p2align 4, 0x90
LBB0_8: ## in Loop: Header=BB0_6 Depth=1
movq 8(%r14), %rax
addl (%rax), %esi
incq %rbx
movl %esi, %edi
cmpq %rbx, %r12
je LBB0_2
LBB0_6: ## =>This Inner Loop Header: Depth=1
movq (%r15,%rbx,8), %r14
movl (%r14), %esi
cmpl %esi, %edi
jge LBB0_8
## %bb.7: ## in Loop: Header=BB0_6 Depth=1
addl %r13d, %edi
addl %r13d, %esi
callq _emit_zero_filler
movl (%r14), %esi
jmp LBB0_8
LBB0_1:
movq _cmpinit@GOTPCREL(%rip), %rax
movl (%rax), %ecx
movq %r15, %rdi
movl %r12d, %esi
movl $8, %edx
callq _qsort
xorl %esi, %esi
movl -44(%rbp), %r13d ## 4-byte Reload
LBB0_2:
addl %r13d, %esi
movl -48(%rbp), %eax ## 4-byte Reload
addl %r13d, %eax
movl %esi, %edi
movl %eax, %esi
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _emit_zero_filler ## TAILCALL
.cfi_endproc
## -- End function
.comm _cmpinit,4,2 ## @cmpinit
.no_dead_strip _emit_fill_holes
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_fill_holes
_emit_fill_holes: ; @emit_fill_holes
.cfi_startproc
; %bb.0:
stp x24, x23, [sp, #-64]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
mov x19, x2
mov x20, x1
mov x23, x0
bl _vec_len
mov x24, x0
mov w21, w0
lsl w0, w0, #3
bl _malloc
mov x22, x0
cmp w24, #0
b.le LBB0_7
; %bb.1:
mov x24, #0
LBB0_2: ; =>This Inner Loop Header: Depth=1
mov x0, x23
mov x1, x24
bl _vec_get
str x0, [x22, x24, lsl #3]
add x24, x24, #1
cmp x21, x24
b.ne LBB0_2
; %bb.3:
Lloh0:
adrp x8, _cmpinit@GOTPAGE
Lloh1:
ldr x8, [x8, _cmpinit@GOTPAGEOFF]
Lloh2:
ldr w3, [x8]
mov x0, x22
mov x1, x21
mov w2, #8
bl _qsort
mov w8, #0
b LBB0_5
LBB0_4: ; in Loop: Header=BB0_5 Depth=1
ldr x8, [x23, #8]
ldr w8, [x8]
add w8, w8, w9
add x22, x22, #8
subs x21, x21, #1
b.eq LBB0_8
LBB0_5: ; =>This Inner Loop Header: Depth=1
ldr x23, [x22]
ldr w9, [x23]
cmp w8, w9
b.ge LBB0_4
; %bb.6: ; in Loop: Header=BB0_5 Depth=1
add w0, w8, w20
add w1, w9, w20
bl _emit_zero_filler
ldr w9, [x23]
b LBB0_4
LBB0_7:
Lloh3:
adrp x8, _cmpinit@GOTPAGE
Lloh4:
ldr x8, [x8, _cmpinit@GOTPAGEOFF]
Lloh5:
ldr w3, [x8]
mov x0, x22
mov x1, x21
mov w2, #8
bl _qsort
mov w8, #0
LBB0_8:
add w0, w8, w20
add w1, w19, w20
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
ldp x24, x23, [sp], #64 ; 16-byte Folded Reload
b _emit_zero_filler
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpLdrGotLdr Lloh3, Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _cmpinit,4,2 ; @cmpinit
.no_dead_strip _emit_fill_holes
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_fill_holes.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_func_call
_emit_func_call: ## @emit_func_call
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $40, %rsp
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %r15
movq (%rdi), %rcx
movq _AST_FUNCPTR_CALL@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rcx, -72(%rbp) ## 8-byte Spill
movq %rax, -64(%rbp) ## 8-byte Spill
cmpq %rax, %rcx
jne LBB0_2
## %bb.1:
movq 16(%r15), %rax
movq (%rax), %rax
jmp LBB0_3
LBB0_2:
leaq 32(%r15), %rax
LBB0_3:
movq _stackpos@GOTPCREL(%rip), %r14
movl (%r14), %ecx
movl %ecx, -44(%rbp) ## 4-byte Spill
movq (%rax), %rax
movq %rax, -80(%rbp) ## 8-byte Spill
xorl %eax, %eax
callq _make_vector
movq %rax, %rbx
xorl %eax, %eax
callq _make_vector
movq %rax, %r13
xorl %eax, %eax
callq _make_vector
movq %rax, %r12
movl 24(%r15), %ecx
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq _classify_args
movq %rbx, -56(%rbp) ## 8-byte Spill
movq %rbx, %rdi
callq _vec_len
movl %eax, %ebx
movq %r13, %rdi
callq _vec_len
movl %ebx, %edi
movl %eax, %esi
callq _save_arg_regs
movq %r14, %rbx
movl (%r14), %r14d
testb $15, %r14b
je LBB0_5
## %bb.4:
leaq L_.str(%rip), %rdi
xorl %eax, %eax
callq _emit
addl $8, (%rbx)
LBB0_5:
movq %r12, %rdi
callq _vec_reverse
movq %rax, %rdi
callq _emit_args
movl %eax, %r12d
movq -64(%rbp), %rax ## 8-byte Reload
cmpq %rax, -72(%rbp) ## 8-byte Folded Reload
jne LBB0_7
## %bb.6:
movq 16(%r15), %rdi
callq _emit_expr
leaq L_.str.1(%rip), %rdi
callq _push
movq -56(%rbp), %rbx ## 8-byte Reload
movq %rbx, %rdi
callq _emit_args
movq %r13, %rdi
callq _emit_args
movq %r13, %rdi
callq _vec_len
movl %eax, %edi
callq _pop_float_args
movq %rbx, %rdi
callq _vec_len
movl %eax, %edi
callq _pop_int_args
leaq L_.str.2(%rip), %rdi
callq _pop
jmp LBB0_8
LBB0_7:
movq -56(%rbp), %rbx ## 8-byte Reload
movq %rbx, %rdi
callq _emit_args
movq %r13, %rdi
callq _emit_args
movq %r13, %rdi
callq _vec_len
movl %eax, %edi
callq _pop_float_args
movq %rbx, %rdi
callq _vec_len
movl %eax, %edi
callq _pop_int_args
LBB0_8:
movq -80(%rbp), %rax ## 8-byte Reload
cmpq $0, (%rax)
je LBB0_10
## %bb.9:
movq %r13, %rdi
callq _vec_len
leaq L_.str.3(%rip), %rdi
movl %eax, %esi
xorl %eax, %eax
callq _emit
LBB0_10:
movq -64(%rbp), %rax ## 8-byte Reload
cmpq %rax, -72(%rbp) ## 8-byte Folded Reload
jne LBB0_12
## %bb.11:
leaq L_.str.4(%rip), %rdi
xorl %eax, %eax
callq _emit
jmp LBB0_13
LBB0_12:
movl 12(%r15), %esi
leaq L_.str.5(%rip), %rdi
xorl %eax, %eax
callq _emit
LBB0_13:
movl 8(%r15), %edi
callq _maybe_booleanize_retval
testl %r12d, %r12d
movq _stackpos@GOTPCREL(%rip), %r15
jle LBB0_15
## %bb.14:
leaq L_.str.6(%rip), %rdi
movl %r12d, %esi
xorl %eax, %eax
callq _emit
subl %r12d, (%r15)
LBB0_15:
testb $15, %r14b
je LBB0_17
## %bb.16:
leaq L_.str.7(%rip), %rdi
xorl %eax, %eax
callq _emit
addl $-8, (%r15)
LBB0_17:
movq %rbx, %rdi
callq _vec_len
movl %eax, %ebx
movq %r13, %rdi
callq _vec_len
movl %ebx, %edi
movl %eax, %esi
callq _restore_arg_regs
xorl %edi, %edi
movl -44(%rbp), %eax ## 4-byte Reload
cmpl (%r15), %eax
sete %dil
addq $40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _assert ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _stackpos,4,2 ## @stackpos
.comm _AST_FUNCPTR_CALL,8,3 ## @AST_FUNCPTR_CALL
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "sub $8, #rsp"
L_.str.1: ## @.str.1
.asciz "rax"
L_.str.2: ## @.str.2
.asciz "r11"
L_.str.3: ## @.str.3
.asciz "mov $%u, #eax"
L_.str.4: ## @.str.4
.asciz "call *#r11"
L_.str.5: ## @.str.5
.asciz "call %s"
L_.str.6: ## @.str.6
.asciz "add $%d, #rsp"
L_.str.7: ## @.str.7
.asciz "add $8, #rsp"
.no_dead_strip _emit_func_call
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_func_call
_emit_func_call: ; @emit_func_call
.cfi_startproc
; %bb.0:
sub sp, sp, #112
.cfi_def_cfa_offset 112
stp x28, x27, [sp, #16] ; 16-byte Folded Spill
stp x26, x25, [sp, #32] ; 16-byte Folded Spill
stp x24, x23, [sp, #48] ; 16-byte Folded Spill
stp x22, x21, [sp, #64] ; 16-byte Folded Spill
stp x20, x19, [sp, #80] ; 16-byte Folded Spill
stp x29, x30, [sp, #96] ; 16-byte Folded Spill
add x29, sp, #96
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
.cfi_offset w25, -72
.cfi_offset w26, -80
.cfi_offset w27, -88
.cfi_offset w28, -96
mov x21, x0
Lloh0:
adrp x24, _stackpos@GOTPAGE
Lloh1:
ldr x24, [x24, _stackpos@GOTPAGEOFF]
ldr x26, [x0]
Lloh2:
adrp x8, _AST_FUNCPTR_CALL@GOTPAGE
Lloh3:
ldr x8, [x8, _AST_FUNCPTR_CALL@GOTPAGEOFF]
Lloh4:
ldr x27, [x8]
cmp x26, x27
b.ne LBB0_2
; %bb.1:
ldr x8, [x21, #16]
ldr x8, [x8]
b LBB0_3
LBB0_2:
add x8, x21, #32
LBB0_3:
ldr w25, [x24]
ldr x28, [x8]
bl _make_vector
mov x20, x0
bl _make_vector
mov x19, x0
bl _make_vector
mov x22, x0
ldr w3, [x21, #24]
mov x0, x20
mov x1, x19
mov x2, x22
bl _classify_args
mov x0, x20
bl _vec_len
mov x23, x0
mov x0, x19
bl _vec_len
mov x1, x0
mov x0, x23
bl _save_arg_regs
ldr w8, [x24]
ands w23, w8, #0xf
b.eq LBB0_5
; %bb.4:
Lloh5:
adrp x0, l_.str@PAGE
Lloh6:
add x0, x0, l_.str@PAGEOFF
bl _emit
ldr w8, [x24]
add w8, w8, #8
str w8, [x24]
LBB0_5:
mov x0, x22
bl _vec_reverse
bl _emit_args
mov x22, x0
cmp x26, x27
b.ne LBB0_7
; %bb.6:
ldr x0, [x21, #16]
bl _emit_expr
Lloh7:
adrp x0, l_.str.1@PAGE
Lloh8:
add x0, x0, l_.str.1@PAGEOFF
bl _push
mov x0, x20
bl _emit_args
mov x0, x19
bl _emit_args
mov x0, x19
bl _vec_len
bl _pop_float_args
mov x0, x20
bl _vec_len
bl _pop_int_args
Lloh9:
adrp x0, l_.str.2@PAGE
Lloh10:
add x0, x0, l_.str.2@PAGEOFF
bl _pop
ldr x8, [x28]
cbnz x8, LBB0_8
b LBB0_9
LBB0_7:
mov x0, x20
bl _emit_args
mov x0, x19
bl _emit_args
mov x0, x19
bl _vec_len
bl _pop_float_args
mov x0, x20
bl _vec_len
bl _pop_int_args
ldr x8, [x28]
cbz x8, LBB0_9
LBB0_8:
mov x0, x19
bl _vec_len
; kill: def $w0 killed $w0 def $x0
str x0, [sp]
Lloh11:
adrp x0, l_.str.3@PAGE
Lloh12:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
LBB0_9:
cmp x26, x27
b.ne LBB0_11
; %bb.10:
Lloh13:
adrp x0, l_.str.4@PAGE
Lloh14:
add x0, x0, l_.str.4@PAGEOFF
b LBB0_12
LBB0_11:
ldr w8, [x21, #12]
str x8, [sp]
Lloh15:
adrp x0, l_.str.5@PAGE
Lloh16:
add x0, x0, l_.str.5@PAGEOFF
LBB0_12:
bl _emit
ldr w0, [x21, #8]
bl _maybe_booleanize_retval
cmp w22, #1
b.lt LBB0_14
; %bb.13:
str x22, [sp]
Lloh17:
adrp x0, l_.str.6@PAGE
Lloh18:
add x0, x0, l_.str.6@PAGEOFF
bl _emit
ldr w8, [x24]
sub w8, w8, w22
str w8, [x24]
LBB0_14:
cbz w23, LBB0_16
; %bb.15:
Lloh19:
adrp x0, l_.str.7@PAGE
Lloh20:
add x0, x0, l_.str.7@PAGEOFF
bl _emit
ldr w8, [x24]
sub w8, w8, #8
str w8, [x24]
LBB0_16:
mov x0, x20
bl _vec_len
mov x20, x0
mov x0, x19
bl _vec_len
mov x1, x0
mov x0, x20
bl _restore_arg_regs
ldr w8, [x24]
cmp w25, w8
cset w0, eq
ldp x29, x30, [sp, #96] ; 16-byte Folded Reload
ldp x20, x19, [sp, #80] ; 16-byte Folded Reload
ldp x22, x21, [sp, #64] ; 16-byte Folded Reload
ldp x24, x23, [sp, #48] ; 16-byte Folded Reload
ldp x26, x25, [sp, #32] ; 16-byte Folded Reload
ldp x28, x27, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #112
b _assert
.loh AdrpLdrGotLdr Lloh2, Lloh3, Lloh4
.loh AdrpLdrGot Lloh0, Lloh1
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpAdd Lloh9, Lloh10
.loh AdrpAdd Lloh7, Lloh8
.loh AdrpAdd Lloh11, Lloh12
.loh AdrpAdd Lloh13, Lloh14
.loh AdrpAdd Lloh15, Lloh16
.loh AdrpAdd Lloh17, Lloh18
.loh AdrpAdd Lloh19, Lloh20
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _stackpos,4,2 ; @stackpos
.comm _AST_FUNCPTR_CALL,8,3 ; @AST_FUNCPTR_CALL
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "sub $8, #rsp"
l_.str.1: ; @.str.1
.asciz "rax"
l_.str.2: ; @.str.2
.asciz "r11"
l_.str.3: ; @.str.3
.asciz "mov $%u, #eax"
l_.str.4: ; @.str.4
.asciz "call *#r11"
l_.str.5: ; @.str.5
.asciz "call %s"
l_.str.6: ; @.str.6
.asciz "add $%d, #rsp"
l_.str.7: ; @.str.7
.asciz "add $8, #rsp"
.no_dead_strip _emit_func_call
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_func_call.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_func_prologue
_emit_func_prologue: ## @emit_func_prologue
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %r14
leaq L_.str(%rip), %rdi
xorl %r15d, %r15d
xorl %eax, %eax
callq _emit
movq 8(%r14), %rax
cmpl $0, 16(%rax)
jne LBB0_2
## %bb.1:
movl 24(%r14), %esi
leaq L_.str.1(%rip), %rdi
callq _emit_noindent
LBB0_2:
movl 24(%r14), %esi
leaq L_.str.2(%rip), %rdi
callq _emit_noindent
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.4(%rip), %rdi
callq _push
leaq L_.str.5(%rip), %rdi
xorl %eax, %eax
callq _emit
movq 8(%r14), %rax
cmpq $0, 8(%rax)
je LBB0_4
## %bb.3:
movl 20(%r14), %edi
callq _set_reg_nums
xorl %eax, %eax
callq _emit_regsave_area
movq %rax, %r15
negl %r15d
LBB0_4:
movl 20(%r14), %edi
movl %r15d, %esi
callq _push_func_params
movl 20(%r14), %edi
callq _vec_len
movl %eax, %ebx
movl 16(%r14), %edi
callq _vec_len
testl %eax, %eax
jle LBB0_9
## %bb.5:
shll $3, %ebx
subl %ebx, %r15d
xorl %r12d, %r12d
xorl %ebx, %ebx
movq %r14, -48(%rbp) ## 8-byte Spill
.p2align 4, 0x90
LBB0_6: ## =>This Inner Loop Header: Depth=1
movl 16(%r14), %edi
movl %ebx, %esi
callq _vec_get
movq %rax, %r13
movq 8(%rax), %rax
movl (%rax), %edi
movl $8, %esi
callq _align
movl %eax, %r14d
xorl %edi, %edi
testb $7, %r14b
sete %dil
callq _assert
subl %r14d, %r15d
movl %r15d, (%r13)
addl %r14d, %r12d
movq -48(%rbp), %r14 ## 8-byte Reload
incl %ebx
movl 16(%r14), %edi
callq _vec_len
cmpl %eax, %ebx
jl LBB0_6
## %bb.7:
testl %r12d, %r12d
je LBB0_9
## %bb.8:
leaq L_.str.6(%rip), %rdi
movl %r12d, %esi
xorl %eax, %eax
callq _emit
movq _stackpos@GOTPCREL(%rip), %rax
addl %r12d, (%rax)
LBB0_9:
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz ".text"
L_.str.1: ## @.str.1
.asciz ".global %s"
L_.str.2: ## @.str.2
.asciz "%s:"
L_.str.3: ## @.str.3
.asciz "nop"
L_.str.4: ## @.str.4
.asciz "rbp"
L_.str.5: ## @.str.5
.asciz "mov #rsp, #rbp"
L_.str.6: ## @.str.6
.asciz "sub $%d, #rsp"
.comm _stackpos,4,2 ## @stackpos
.no_dead_strip _emit_func_prologue
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_func_prologue
_emit_func_prologue: ; @emit_func_prologue
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x24, x23, [sp, #16] ; 16-byte Folded Spill
stp x22, x21, [sp, #32] ; 16-byte Folded Spill
stp x20, x19, [sp, #48] ; 16-byte Folded Spill
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp, #64
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
mov x19, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _emit
ldr x8, [x19, #8]
ldr w8, [x8, #16]
cbnz w8, LBB0_2
; %bb.1:
ldr w1, [x19, #24]
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _emit_noindent
LBB0_2:
ldr w1, [x19, #24]
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
bl _emit_noindent
Lloh6:
adrp x0, l_.str.3@PAGE
Lloh7:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
Lloh8:
adrp x0, l_.str.4@PAGE
Lloh9:
add x0, x0, l_.str.4@PAGEOFF
bl _push
Lloh10:
adrp x0, l_.str.5@PAGE
Lloh11:
add x0, x0, l_.str.5@PAGEOFF
bl _emit
ldr x8, [x19, #8]
ldr x8, [x8, #8]
cbz x8, LBB0_4
; %bb.3:
ldr w0, [x19, #20]
bl _set_reg_nums
bl _emit_regsave_area
neg w21, w0
b LBB0_5
LBB0_4:
mov w21, #0
LBB0_5:
ldr w0, [x19, #20]
mov x1, x21
bl _push_func_params
ldr w0, [x19, #20]
bl _vec_len
mov x22, x0
ldr w0, [x19, #16]
bl _vec_len
cmp w0, #1
b.lt LBB0_10
; %bb.6:
mov w23, #0
mov w20, #0
sub w24, w21, w22, lsl #3
LBB0_7: ; =>This Inner Loop Header: Depth=1
ldr w0, [x19, #16]
mov x1, x20
bl _vec_get
mov x21, x0
ldr x8, [x0, #8]
ldr w0, [x8]
mov w1, #8
bl _align
mov x22, x0
tst w0, #0x7
cset w0, eq
bl _assert
sub w24, w24, w22
str w24, [x21]
add w23, w22, w23
add w20, w20, #1
ldr w0, [x19, #16]
bl _vec_len
cmp w20, w0
b.lt LBB0_7
; %bb.8:
cbz w23, LBB0_10
; %bb.9:
str x23, [sp]
Lloh12:
adrp x0, l_.str.6@PAGE
Lloh13:
add x0, x0, l_.str.6@PAGEOFF
bl _emit
Lloh14:
adrp x8, _stackpos@GOTPAGE
Lloh15:
ldr x8, [x8, _stackpos@GOTPAGEOFF]
ldr w9, [x8]
add w9, w9, w23
str w9, [x8]
LBB0_10:
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #80
ret
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpLdrGot Lloh14, Lloh15
.loh AdrpAdd Lloh12, Lloh13
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz ".text"
l_.str.1: ; @.str.1
.asciz ".global %s"
l_.str.2: ; @.str.2
.asciz "%s:"
l_.str.3: ; @.str.3
.asciz "nop"
l_.str.4: ; @.str.4
.asciz "rbp"
l_.str.5: ; @.str.5
.asciz "mov #rsp, #rbp"
l_.str.6: ; @.str.6
.asciz "sub $%d, #rsp"
.comm _stackpos,4,2 ; @stackpos
.no_dead_strip _emit_func_prologue
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_func_prologue.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_gload
_emit_gload: ## @emit_gload
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edx, %r15d
movq %rsi, %r14
movq (%rdi), %rax
movq _KIND_ARRAY@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_3
## %bb.1:
testl %r15d, %r15d
je LBB0_2
## %bb.4:
leaq L_.str(%rip), %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
LBB0_3:
movq %rdi, %rbx
callq _get_load_inst
leaq L_.str.2(%rip), %rdi
movq %rax, %rsi
movq %r14, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq _emit
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _maybe_emit_bitshift_load ## TAILCALL
LBB0_2:
leaq L_.str.1(%rip), %rdi
movq %r14, %rsi
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_ARRAY,8,3 ## @KIND_ARRAY
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "lea %s+%d(#rip), #rax"
L_.str.1: ## @.str.1
.asciz "lea %s(#rip), #rax"
L_.str.2: ## @.str.2
.asciz "%s %s+%d(#rip), #rax"
.no_dead_strip _emit_gload
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_gload
_emit_gload: ; @emit_gload
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x21, x2
mov x19, x1
ldr x8, [x0]
Lloh0:
adrp x9, _KIND_ARRAY@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_ARRAY@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_3
; %bb.1:
cbz w21, LBB0_4
; %bb.2:
str x21, [sp]
Lloh3:
adrp x0, l_.str@PAGE
Lloh4:
add x0, x0, l_.str@PAGEOFF
mov x1, x19
bl _emit
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
ret
LBB0_3:
mov x20, x0
bl _get_load_inst
mov x1, x0
; kill: def $w21 killed $w21 killed $x21 def $x21
stp x19, x21, [sp]
Lloh5:
adrp x0, l_.str.2@PAGE
Lloh6:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
mov x0, x20
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _maybe_emit_bitshift_load
LBB0_4:
Lloh7:
adrp x0, l_.str.1@PAGE
Lloh8:
add x0, x0, l_.str.1@PAGEOFF
mov x1, x19
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _emit
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpAdd Lloh7, Lloh8
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_ARRAY,8,3 ; @KIND_ARRAY
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "lea %s+%d(#rip), #rax"
l_.str.1: ; @.str.1
.asciz "lea %s(#rip), #rax"
l_.str.2: ; @.str.2
.asciz "%s %s+%d(#rip), #rax"
.no_dead_strip _emit_gload
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_gload.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_global_var
_emit_global_var: ## @emit_global_var
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
cmpq $0, (%rdi)
je LBB0_2
## %bb.1:
xorl %esi, %esi
xorl %edx, %edx
popq %rbp
jmp _emit_data ## TAILCALL
LBB0_2:
popq %rbp
jmp _emit_bss ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_global_var
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_global_var
_emit_global_var: ; @emit_global_var
.cfi_startproc
; %bb.0:
ldr x8, [x0]
cbz x8, LBB0_2
; %bb.1:
mov w1, #0
mov w2, #0
b _emit_data
LBB0_2:
b _emit_bss
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_global_var
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_global_var.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_goto
_emit_goto: ## @emit_goto
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movl (%rdi), %edi
callq _assert
movl (%rbx), %edi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_jmp ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_goto
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_goto
_emit_goto: ; @emit_goto
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w0, [x0]
bl _assert
ldr w0, [x19]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_jmp
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_goto
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_goto.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_gsave
_emit_gsave: ## @emit_gsave
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edx, %r14d
movq %rsi, %r13
movq %rdi, %r15
movq (%rsi), %rax
movq _KIND_ARRAY@GOTPCREL(%rip), %rcx
xorl %edi, %edi
cmpq (%rcx), %rax
setne %dil
callq _assert
movq %r13, %rdi
callq _maybe_convert_bool
movq %r13, %rdi
movl $97, %esi
callq _get_int_reg
movq %rax, %r12
leaq L_.str(%rip), %rdi
movq %r15, %rsi
movl %r14d, %edx
callq _format
movq %rax, %rbx
movq %r13, %rdi
movq %rax, %rsi
callq _maybe_emit_bitshift_save
leaq L_.str.1(%rip), %rdi
movq %r12, %rsi
movq %rbx, %rdx
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_ARRAY,8,3 ## @KIND_ARRAY
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%s+%d(%%rip)"
L_.str.1: ## @.str.1
.asciz "mov #%s, %s"
.no_dead_strip _emit_gsave
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_gsave
_emit_gsave: ; @emit_gsave
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x2
mov x20, x1
mov x21, x0
ldr x8, [x1]
Lloh0:
adrp x9, _KIND_ARRAY@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_ARRAY@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
cset w0, ne
bl _assert
mov x0, x20
bl _maybe_convert_bool
mov x0, x20
mov w1, #97
bl _get_int_reg
mov x22, x0
Lloh3:
adrp x0, l_.str@PAGE
Lloh4:
add x0, x0, l_.str@PAGEOFF
mov x1, x21
mov x2, x19
bl _format
mov x19, x0
mov x0, x20
mov x1, x19
bl _maybe_emit_bitshift_save
Lloh5:
adrp x0, l_.str.1@PAGE
Lloh6:
add x0, x0, l_.str.1@PAGEOFF
mov x1, x22
mov x2, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_ARRAY,8,3 ; @KIND_ARRAY
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%s+%d(%%rip)"
l_.str.1: ; @.str.1
.asciz "mov #%s, %s"
.no_dead_strip _emit_gsave
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_gsave.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_gvar
_emit_gvar: ## @emit_gvar
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl (%rdi), %esi
movl 4(%rdi), %edi
xorl %edx, %edx
popq %rbp
jmp _emit_gload ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_gvar
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_gvar
_emit_gvar: ; @emit_gvar
.cfi_startproc
; %bb.0:
ldp w1, w8, [x0]
mov x0, x8
mov w2, #0
b _emit_gload
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_gvar
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_gvar.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_intcast
_emit_intcast: ## @emit_intcast
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl (%rdi), %eax
leal -132(%rax), %ecx
cmpl $2, %ecx
jb LBB0_4
## %bb.1:
cmpl $128, %eax
je LBB0_5
## %bb.2:
cmpl $131, %eax
jne LBB0_7
## %bb.3:
cmpl $0, 4(%rdi)
leaq L_.str.5(%rip), %rax
leaq L_.str.4(%rip), %rdi
jmp LBB0_6
LBB0_4:
cmpl $0, 4(%rdi)
leaq L_.str.1(%rip), %rax
leaq L_.str(%rip), %rdi
jmp LBB0_6
LBB0_5:
cmpl $0, 4(%rdi)
leaq L_.str.3(%rip), %rax
leaq L_.str.2(%rip), %rdi
LBB0_6:
cmoveq %rax, %rdi
popq %rbp
jmp _emit ## TAILCALL
LBB0_7:
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "movzbq #al, #rax"
L_.str.1: ## @.str.1
.asciz "movsbq #al, #rax"
L_.str.2: ## @.str.2
.asciz "movzwq #ax, #rax"
L_.str.3: ## @.str.3
.asciz "movswq #ax, #rax"
L_.str.4: ## @.str.4
.asciz "mov #eax, #eax"
L_.str.5: ## @.str.5
.asciz "cltq"
.no_dead_strip _emit_intcast
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_intcast
_emit_intcast: ; @emit_intcast
.cfi_startproc
; %bb.0:
ldr w8, [x0]
sub w9, w8, #132
cmp w9, #2
b.lo LBB0_4
; %bb.1:
cmp w8, #128
b.eq LBB0_5
; %bb.2:
cmp w8, #131
b.ne LBB0_7
; %bb.3:
ldr w8, [x0, #4]
Lloh0:
adrp x9, l_.str.4@PAGE
Lloh1:
add x9, x9, l_.str.4@PAGEOFF
Lloh2:
adrp x10, l_.str.5@PAGE
Lloh3:
add x10, x10, l_.str.5@PAGEOFF
b LBB0_6
LBB0_4:
ldr w8, [x0, #4]
Lloh4:
adrp x9, l_.str@PAGE
Lloh5:
add x9, x9, l_.str@PAGEOFF
Lloh6:
adrp x10, l_.str.1@PAGE
Lloh7:
add x10, x10, l_.str.1@PAGEOFF
b LBB0_6
LBB0_5:
ldr w8, [x0, #4]
Lloh8:
adrp x9, l_.str.2@PAGE
Lloh9:
add x9, x9, l_.str.2@PAGEOFF
Lloh10:
adrp x10, l_.str.3@PAGE
Lloh11:
add x10, x10, l_.str.3@PAGEOFF
LBB0_6:
cmp w8, #0
csel x0, x10, x9, eq
b _emit
LBB0_7:
ret
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh8, Lloh9
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "movzbq #al, #rax"
l_.str.1: ; @.str.1
.asciz "movsbq #al, #rax"
l_.str.2: ; @.str.2
.asciz "movzwq #ax, #rax"
l_.str.3: ; @.str.3
.asciz "movswq #ax, #rax"
l_.str.4: ; @.str.4
.asciz "mov #eax, #eax"
l_.str.5: ; @.str.5
.asciz "cltq"
.no_dead_strip _emit_intcast
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_intcast.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_je
_emit_je: ## @emit_je
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
leaq L_.str(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.1(%rip), %rdi
movq %rbx, %rsi
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "test #rax, #rax"
L_.str.1: ## @.str.1
.asciz "je %s"
.no_dead_strip _emit_je
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_je
_emit_je: ; @emit_je
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _emit
str x19, [sp]
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _emit
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
ret
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "test #rax, #rax"
l_.str.1: ; @.str.1
.asciz "je %s"
.no_dead_strip _emit_je
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_je.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_jmp
_emit_jmp: ## @emit_jmp
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, %rsi
leaq L_.str(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "jmp %s"
.no_dead_strip _emit_jmp
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_jmp
_emit_jmp: ; @emit_jmp
.cfi_startproc
; %bb.0:
mov x1, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
b _emit
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "jmp %s"
.no_dead_strip _emit_jmp
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_jmp.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_label
_emit_label: ## @emit_label
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, %rsi
leaq L_.str(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%s:"
.no_dead_strip _emit_label
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_label
_emit_label: ; @emit_label
.cfi_startproc
; %bb.0:
mov x1, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
b _emit
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%s:"
.no_dead_strip _emit_label
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_label.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_label_addr
_emit_label_addr: ## @emit_label_addr
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl (%rdi), %esi
leaq L_.str(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "mov $%s, #rax"
.no_dead_strip _emit_label_addr
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_label_addr
_emit_label_addr: ; @emit_label_addr
.cfi_startproc
; %bb.0:
ldr w1, [x0]
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
b _emit
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "mov $%s, #rax"
.no_dead_strip _emit_label_addr
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_label_addr.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_literal
_emit_literal: ## @emit_literal
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq 16(%rdi), %rax
movl (%rax), %eax
addl $-128, %eax
cmpl $9, %eax
ja LBB0_14
## %bb.1:
movq %rdi, %rbx
leaq LJTI0_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_2:
movq 40(%rbx), %rsi
leaq L_.str(%rip), %rdi
jmp LBB0_7
LBB0_3:
movq 40(%rbx), %rsi
leaq L_.str.1(%rip), %rdi
jmp LBB0_7
LBB0_8:
movq 32(%rbx), %rsi
testq %rsi, %rsi
jne LBB0_10
## %bb.9:
xorl %eax, %eax
callq _make_label
movq %rax, 32(%rbx)
leaq L_.str.2(%rip), %rdi
callq _emit_noindent
movq 32(%rbx), %rdi
callq _emit_label
movq (%rbx), %rsi
leaq L_.str.6(%rip), %rdi
callq _emit
leaq L_.str.4(%rip), %rdi
callq _emit_noindent
movq 32(%rbx), %rsi
LBB0_10:
leaq L_.str.7(%rip), %rdi
jmp LBB0_7
LBB0_14:
leaq L_.str.10(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _error ## TAILCALL
LBB0_4:
movq 32(%rbx), %rsi
testq %rsi, %rsi
jne LBB0_6
## %bb.5:
xorl %eax, %eax
callq _make_label
movq %rax, 32(%rbx)
movss (%rbx), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss %xmm0, -16(%rbp)
leaq L_.str.2(%rip), %rdi
callq _emit_noindent
movq 32(%rbx), %rdi
callq _emit_label
movq -16(%rbp), %rsi
leaq L_.str.3(%rip), %rdi
callq _emit
leaq L_.str.4(%rip), %rdi
callq _emit_noindent
movq 32(%rbx), %rsi
LBB0_6:
leaq L_.str.5(%rip), %rdi
jmp LBB0_7
LBB0_11:
movq 8(%rbx), %rsi
testq %rsi, %rsi
jne LBB0_13
## %bb.12:
xorl %eax, %eax
callq _make_label
movq %rax, 8(%rbx)
leaq L_.str.2(%rip), %rdi
callq _emit_noindent
movq 8(%rbx), %rdi
callq _emit_label
movl 24(%rbx), %edi
movq 16(%rbx), %rax
movl 4(%rax), %esi
decl %esi
callq _quote_cstring_len
leaq L_.str.8(%rip), %rdi
movq %rax, %rsi
callq _emit
leaq L_.str.4(%rip), %rdi
callq _emit_noindent
movq 8(%rbx), %rsi
LBB0_13:
leaq L_.str.9(%rip), %rdi
LBB0_7:
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
.long L0_0_set_2
.long L0_0_set_3
.long L0_0_set_3
.long L0_0_set_8
.long L0_0_set_2
.long L0_0_set_4
.long L0_0_set_8
.long L0_0_set_2
.long L0_0_set_2
.long L0_0_set_11
.end_data_region
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "mov $%u, #rax"
L_.str.1: ## @.str.1
.asciz "mov $%lu, #rax"
L_.str.2: ## @.str.2
.asciz ".data"
L_.str.3: ## @.str.3
.asciz ".long %d"
L_.str.4: ## @.str.4
.asciz ".text"
L_.str.5: ## @.str.5
.asciz "movss %s(#rip), #xmm0"
L_.str.6: ## @.str.6
.asciz ".quad %lu"
L_.str.7: ## @.str.7
.asciz "movsd %s(#rip), #xmm0"
L_.str.8: ## @.str.8
.asciz ".string \"%s\""
L_.str.9: ## @.str.9
.asciz "lea %s(#rip), #rax"
L_.str.10: ## @.str.10
.asciz "internal error"
.no_dead_strip _emit_literal
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_literal
_emit_literal: ; @emit_literal
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
ldr x8, [x0, #16]
ldr w8, [x8]
sub w8, w8, #128
cmp w8, #9
b.hi LBB0_7
; %bb.1:
mov x19, x0
Lloh0:
adrp x9, lJTI0_0@PAGE
Lloh1:
add x9, x9, lJTI0_0@PAGEOFF
adr x10, LBB0_2
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_2:
ldr x1, [x19, #40]
Lloh2:
adrp x0, l_.str@PAGE
Lloh3:
add x0, x0, l_.str@PAGEOFF
b LBB0_14
LBB0_3:
ldr x1, [x19, #40]
Lloh4:
adrp x0, l_.str.1@PAGE
Lloh5:
add x0, x0, l_.str.1@PAGEOFF
b LBB0_14
LBB0_4:
ldr x1, [x19, #32]
cbnz x1, LBB0_6
; %bb.5:
bl _make_label
str x0, [x19, #32]
Lloh6:
adrp x0, l_.str.2@PAGE
Lloh7:
add x0, x0, l_.str.2@PAGEOFF
bl _emit_noindent
ldr x0, [x19, #32]
bl _emit_label
ldr x1, [x19]
Lloh8:
adrp x0, l_.str.6@PAGE
Lloh9:
add x0, x0, l_.str.6@PAGEOFF
bl _emit
Lloh10:
adrp x0, l_.str.4@PAGE
Lloh11:
add x0, x0, l_.str.4@PAGEOFF
bl _emit_noindent
ldr x1, [x19, #32]
LBB0_6:
Lloh12:
adrp x0, l_.str.7@PAGE
Lloh13:
add x0, x0, l_.str.7@PAGEOFF
b LBB0_14
LBB0_7:
Lloh14:
adrp x0, l_.str.10@PAGE
Lloh15:
add x0, x0, l_.str.10@PAGEOFF
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
b _error
LBB0_8:
ldr x1, [x19, #32]
cbnz x1, LBB0_10
; %bb.9:
bl _make_label
str x0, [x19, #32]
ldr s0, [x19]
str s0, [sp, #8]
Lloh16:
adrp x0, l_.str.2@PAGE
Lloh17:
add x0, x0, l_.str.2@PAGEOFF
bl _emit_noindent
ldr x0, [x19, #32]
bl _emit_label
ldr x1, [sp, #8]
Lloh18:
adrp x0, l_.str.3@PAGE
Lloh19:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
Lloh20:
adrp x0, l_.str.4@PAGE
Lloh21:
add x0, x0, l_.str.4@PAGEOFF
bl _emit_noindent
ldr x1, [x19, #32]
LBB0_10:
Lloh22:
adrp x0, l_.str.5@PAGE
Lloh23:
add x0, x0, l_.str.5@PAGEOFF
b LBB0_14
LBB0_11:
ldr x1, [x19, #8]
cbnz x1, LBB0_13
; %bb.12:
bl _make_label
str x0, [x19, #8]
Lloh24:
adrp x0, l_.str.2@PAGE
Lloh25:
add x0, x0, l_.str.2@PAGEOFF
bl _emit_noindent
ldr x0, [x19, #8]
bl _emit_label
ldr w0, [x19, #24]
ldr x8, [x19, #16]
ldr w8, [x8, #4]
sub w1, w8, #1
bl _quote_cstring_len
mov x1, x0
Lloh26:
adrp x0, l_.str.8@PAGE
Lloh27:
add x0, x0, l_.str.8@PAGEOFF
bl _emit
Lloh28:
adrp x0, l_.str.4@PAGE
Lloh29:
add x0, x0, l_.str.4@PAGEOFF
bl _emit_noindent
ldr x1, [x19, #8]
LBB0_13:
Lloh30:
adrp x0, l_.str.9@PAGE
Lloh31:
add x0, x0, l_.str.9@PAGEOFF
LBB0_14:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
b _emit
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh14, Lloh15
.loh AdrpAdd Lloh20, Lloh21
.loh AdrpAdd Lloh18, Lloh19
.loh AdrpAdd Lloh16, Lloh17
.loh AdrpAdd Lloh22, Lloh23
.loh AdrpAdd Lloh28, Lloh29
.loh AdrpAdd Lloh26, Lloh27
.loh AdrpAdd Lloh24, Lloh25
.loh AdrpAdd Lloh30, Lloh31
.cfi_endproc
.section __TEXT,__const
lJTI0_0:
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_3-LBB0_2)>>2
.byte (LBB0_3-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_11-LBB0_2)>>2
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "mov $%u, #rax"
l_.str.1: ; @.str.1
.asciz "mov $%lu, #rax"
l_.str.2: ; @.str.2
.asciz ".data"
l_.str.3: ; @.str.3
.asciz ".long %d"
l_.str.4: ; @.str.4
.asciz ".text"
l_.str.5: ; @.str.5
.asciz "movss %s(#rip), #xmm0"
l_.str.6: ; @.str.6
.asciz ".quad %lu"
l_.str.7: ; @.str.7
.asciz "movsd %s(#rip), #xmm0"
l_.str.8: ; @.str.8
.asciz ".string \"%s\""
l_.str.9: ; @.str.9
.asciz "lea %s(#rip), #rax"
l_.str.10: ; @.str.10
.asciz "internal error"
.no_dead_strip _emit_literal
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_literal.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_lload
_emit_lload: ## @emit_lload
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edx, %r15d
movq %rsi, %r14
movq (%rdi), %rax
movq _KIND_ARRAY@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_3
## %bb.1:
leaq L_.str(%rip), %rdi
jmp LBB0_2
LBB0_3:
movq _KIND_FLOAT@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_5
## %bb.4:
leaq L_.str.1(%rip), %rdi
jmp LBB0_2
LBB0_5:
movq _KIND_DOUBLE@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
je LBB0_7
## %bb.6:
movq _KIND_LDOUBLE@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
je LBB0_7
## %bb.8:
movq %rdi, %rbx
callq _get_load_inst
leaq L_.str.3(%rip), %rdi
movq %rax, %rsi
movl %r15d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq _emit
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _maybe_emit_bitshift_load ## TAILCALL
LBB0_7:
leaq L_.str.2(%rip), %rdi
LBB0_2:
movl %r15d, %esi
movq %r14, %rdx
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_ARRAY,8,3 ## @KIND_ARRAY
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "lea %d(#%s), #rax"
.comm _KIND_FLOAT,8,3 ## @KIND_FLOAT
L_.str.1: ## @.str.1
.asciz "movss %d(#%s), #xmm0"
.comm _KIND_DOUBLE,8,3 ## @KIND_DOUBLE
.comm _KIND_LDOUBLE,8,3 ## @KIND_LDOUBLE
L_.str.2: ## @.str.2
.asciz "movsd %d(#%s), #xmm0"
L_.str.3: ## @.str.3
.asciz "%s %d(#%s), #rax"
.no_dead_strip _emit_lload
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_lload
_emit_lload: ; @emit_lload
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x22, x21, [sp, #32] ; 16-byte Folded Spill
stp x20, x19, [sp, #48] ; 16-byte Folded Spill
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp, #64
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x2
mov x20, x1
ldr x8, [x0]
Lloh0:
adrp x9, _KIND_ARRAY@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_ARRAY@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_2
; %bb.1:
stp x19, x20, [sp]
Lloh3:
adrp x0, l_.str@PAGE
Lloh4:
add x0, x0, l_.str@PAGEOFF
b LBB0_6
LBB0_2:
Lloh5:
adrp x9, _KIND_FLOAT@GOTPAGE
Lloh6:
ldr x9, [x9, _KIND_FLOAT@GOTPAGEOFF]
Lloh7:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_4
; %bb.3:
; kill: def $w19 killed $w19 killed $x19 def $x19
stp x19, x20, [sp]
Lloh8:
adrp x0, l_.str.1@PAGE
Lloh9:
add x0, x0, l_.str.1@PAGEOFF
b LBB0_6
LBB0_4:
Lloh10:
adrp x9, _KIND_DOUBLE@GOTPAGE
Lloh11:
ldr x9, [x9, _KIND_DOUBLE@GOTPAGEOFF]
Lloh12:
ldr x9, [x9]
Lloh13:
adrp x10, _KIND_LDOUBLE@GOTPAGE
Lloh14:
ldr x10, [x10, _KIND_LDOUBLE@GOTPAGEOFF]
Lloh15:
ldr x10, [x10]
cmp x8, x9
ccmp x8, x10, #4, ne
b.ne LBB0_7
; %bb.5:
; kill: def $w19 killed $w19 killed $x19 def $x19
stp x19, x20, [sp]
Lloh16:
adrp x0, l_.str.2@PAGE
Lloh17:
add x0, x0, l_.str.2@PAGEOFF
LBB0_6:
bl _emit
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #80
ret
LBB0_7:
mov x21, x0
bl _get_load_inst
; kill: def $w19 killed $w19 killed $x19 def $x19
stp x19, x20, [sp, #8]
str x0, [sp]
Lloh18:
adrp x0, l_.str.3@PAGE
Lloh19:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
mov x0, x21
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #80
b _maybe_emit_bitshift_load
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpLdrGotLdr Lloh5, Lloh6, Lloh7
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpLdrGotLdr Lloh13, Lloh14, Lloh15
.loh AdrpLdrGotLdr Lloh10, Lloh11, Lloh12
.loh AdrpAdd Lloh16, Lloh17
.loh AdrpAdd Lloh18, Lloh19
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_ARRAY,8,3 ; @KIND_ARRAY
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "lea %d(#%s), #rax"
.comm _KIND_FLOAT,8,3 ; @KIND_FLOAT
l_.str.1: ; @.str.1
.asciz "movss %d(#%s), #xmm0"
.comm _KIND_DOUBLE,8,3 ; @KIND_DOUBLE
.comm _KIND_LDOUBLE,8,3 ; @KIND_LDOUBLE
l_.str.2: ; @.str.2
.asciz "movsd %d(#%s), #xmm0"
l_.str.3: ; @.str.3
.asciz "%s %d(#%s), #rax"
.no_dead_strip _emit_lload
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_lload.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_load_convert
_emit_load_convert: ## @emit_load_convert
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq _is_inttype
testq %rax, %rax
je LBB0_4
## %bb.1:
movq (%r14), %rax
movq _KIND_FLOAT@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_4
## %bb.2:
leaq L_.str(%rip), %rdi
jmp LBB0_3
LBB0_4:
movq %rbx, %rdi
callq _is_inttype
testq %rax, %rax
je LBB0_7
## %bb.5:
movq (%r14), %rax
movq _KIND_DOUBLE@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_7
## %bb.6:
leaq L_.str.1(%rip), %rdi
jmp LBB0_3
LBB0_7:
movq (%rbx), %rcx
movq _KIND_FLOAT@GOTPCREL(%rip), %rax
movq (%rax), %rdi
movq _KIND_DOUBLE@GOTPCREL(%rip), %rdx
cmpq %rdi, %rcx
jne LBB0_8
## %bb.12:
movq (%rdx), %rdx
cmpq %rdx, (%r14)
jne LBB0_9
## %bb.13:
leaq L_.str.2(%rip), %rdi
jmp LBB0_3
LBB0_8:
movq (%rdx), %rdx
LBB0_9:
cmpq %rdx, %rcx
sete %dl
movq _KIND_LDOUBLE@GOTPCREL(%rip), %rsi
cmpq (%rsi), %rcx
sete %al
orb %dl, %al
movq (%r14), %rcx
cmpb $1, %al
jne LBB0_14
## %bb.10:
cmpq %rdi, %rcx
jne LBB0_14
## %bb.11:
leaq L_.str.3(%rip), %rdi
LBB0_3:
popq %rbx
popq %r14
popq %rbp
jmp _emit ## TAILCALL
LBB0_14:
movq _KIND_BOOL@GOTPCREL(%rip), %rax
cmpq (%rax), %rcx
jne LBB0_15
## %bb.19:
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp _emit_to_bool ## TAILCALL
LBB0_15:
movq %rbx, %rdi
callq _is_inttype
testq %rax, %rax
je LBB0_17
## %bb.16:
movq %r14, %rdi
callq _is_inttype
testq %rax, %rax
je LBB0_17
## %bb.20:
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp _emit_intcast ## TAILCALL
LBB0_17:
movq %r14, %rdi
callq _is_inttype
testq %rax, %rax
je LBB0_18
## %bb.21:
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp _emit_toint ## TAILCALL
LBB0_18:
popq %rbx
popq %r14
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_FLOAT,8,3 ## @KIND_FLOAT
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "cvtsi2ss #eax, #xmm0"
.comm _KIND_DOUBLE,8,3 ## @KIND_DOUBLE
L_.str.1: ## @.str.1
.asciz "cvtsi2sd #eax, #xmm0"
L_.str.2: ## @.str.2
.asciz "cvtps2pd #xmm0, #xmm0"
.comm _KIND_LDOUBLE,8,3 ## @KIND_LDOUBLE
L_.str.3: ## @.str.3
.asciz "cvtpd2ps #xmm0, #xmm0"
.comm _KIND_BOOL,8,3 ## @KIND_BOOL
.no_dead_strip _emit_load_convert
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_load_convert
_emit_load_convert: ; @emit_load_convert
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x1
mov x20, x0
mov x0, x1
bl _is_inttype
Lloh0:
adrp x21, _KIND_FLOAT@GOTPAGE
Lloh1:
ldr x21, [x21, _KIND_FLOAT@GOTPAGEOFF]
cbz x0, LBB0_3
; %bb.1:
ldr x8, [x20]
ldr x9, [x21]
cmp x8, x9
b.ne LBB0_3
; %bb.2:
Lloh2:
adrp x0, l_.str@PAGE
Lloh3:
add x0, x0, l_.str@PAGEOFF
b LBB0_14
LBB0_3:
mov x0, x19
bl _is_inttype
cbz x0, LBB0_6
; %bb.4:
ldr x8, [x20]
Lloh4:
adrp x9, _KIND_DOUBLE@GOTPAGE
Lloh5:
ldr x9, [x9, _KIND_DOUBLE@GOTPAGEOFF]
Lloh6:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_6
; %bb.5:
Lloh7:
adrp x0, l_.str.1@PAGE
Lloh8:
add x0, x0, l_.str.1@PAGEOFF
b LBB0_14
LBB0_6:
ldr x9, [x19]
ldr x8, [x21]
cmp x9, x8
b.ne LBB0_9
; %bb.7:
ldr x11, [x20]
Lloh9:
adrp x10, _KIND_DOUBLE@GOTPAGE
Lloh10:
ldr x10, [x10, _KIND_DOUBLE@GOTPAGEOFF]
Lloh11:
ldr x10, [x10]
cmp x11, x10
b.ne LBB0_10
; %bb.8:
Lloh12:
adrp x0, l_.str.2@PAGE
Lloh13:
add x0, x0, l_.str.2@PAGEOFF
b LBB0_14
LBB0_9:
Lloh14:
adrp x10, _KIND_DOUBLE@GOTPAGE
Lloh15:
ldr x10, [x10, _KIND_DOUBLE@GOTPAGEOFF]
Lloh16:
ldr x10, [x10]
LBB0_10:
Lloh17:
adrp x11, _KIND_LDOUBLE@GOTPAGE
Lloh18:
ldr x11, [x11, _KIND_LDOUBLE@GOTPAGEOFF]
Lloh19:
ldr x11, [x11]
cmp x9, x11
ccmp x9, x10, #4, ne
ldr x9, [x20]
ccmp x9, x8, #0, eq
b.eq LBB0_13
; %bb.11:
Lloh20:
adrp x8, _KIND_BOOL@GOTPAGE
Lloh21:
ldr x8, [x8, _KIND_BOOL@GOTPAGEOFF]
Lloh22:
ldr x8, [x8]
cmp x9, x8
b.ne LBB0_15
; %bb.12:
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_to_bool
LBB0_13:
Lloh23:
adrp x0, l_.str.3@PAGE
Lloh24:
add x0, x0, l_.str.3@PAGEOFF
LBB0_14:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit
LBB0_15:
mov x0, x19
bl _is_inttype
cbz x0, LBB0_18
; %bb.16:
mov x0, x20
bl _is_inttype
cbz x0, LBB0_18
; %bb.17:
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_intcast
LBB0_18:
mov x0, x20
bl _is_inttype
cbz x0, LBB0_20
; %bb.19:
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_toint
LBB0_20:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
ret
.loh AdrpLdrGot Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpLdrGotLdr Lloh4, Lloh5, Lloh6
.loh AdrpAdd Lloh7, Lloh8
.loh AdrpLdrGotLdr Lloh9, Lloh10, Lloh11
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpLdrGotLdr Lloh14, Lloh15, Lloh16
.loh AdrpLdrGotLdr Lloh17, Lloh18, Lloh19
.loh AdrpLdrGotLdr Lloh20, Lloh21, Lloh22
.loh AdrpAdd Lloh23, Lloh24
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_FLOAT,8,3 ; @KIND_FLOAT
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "cvtsi2ss #eax, #xmm0"
.comm _KIND_DOUBLE,8,3 ; @KIND_DOUBLE
l_.str.1: ; @.str.1
.asciz "cvtsi2sd #eax, #xmm0"
l_.str.2: ; @.str.2
.asciz "cvtps2pd #xmm0, #xmm0"
.comm _KIND_LDOUBLE,8,3 ; @KIND_LDOUBLE
l_.str.3: ; @.str.3
.asciz "cvtpd2ps #xmm0, #xmm0"
.comm _KIND_BOOL,8,3 ; @KIND_BOOL
.no_dead_strip _emit_load_convert
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_load_convert.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_load_struct_ref
_emit_load_struct_ref: ## @emit_load_struct_ref
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
.p2align 4, 0x90
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl (%rbx), %eax
cmpl $128, %eax
jne LBB0_2
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movq 8(%rbx), %rax
movq 16(%rbx), %rbx
addl (%rax), %r15d
jmp LBB0_1
LBB0_2:
cmpl $131, %eax
je LBB0_8
## %bb.3:
cmpl $130, %eax
je LBB0_6
## %bb.4:
cmpl $129, %eax
jne LBB0_10
## %bb.5:
movq %rbx, %rdi
callq _ensure_lvar_init
movl (%r14), %eax
addl 32(%rbx), %eax
addl %eax, %r15d
leaq L_.str(%rip), %rsi
jmp LBB0_9
LBB0_8:
movl 4(%rbx), %edi
callq _emit_expr
addl (%r14), %r15d
leaq L_.str.1(%rip), %rsi
LBB0_9:
movq %r14, %rdi
movl %r15d, %edx
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit_lload ## TAILCALL
LBB0_6:
movl 24(%rbx), %esi
addl (%r14), %r15d
movq %r14, %rdi
movl %r15d, %edx
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit_gload ## TAILCALL
LBB0_10:
movq %rbx, %rdi
callq _node2s
leaq L_.str.2(%rip), %rdi
movl %eax, %esi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _error ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rbp"
L_.str.1: ## @.str.1
.asciz "rax"
L_.str.2: ## @.str.2
.asciz "internal error: %s"
.no_dead_strip _emit_load_struct_ref
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_load_struct_ref
_emit_load_struct_ref: ; @emit_load_struct_ref
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x20, x2
mov x19, x1
mov x21, x0
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [x21]
cmp w8, #128
b.ne LBB0_3
; %bb.2: ; in Loop: Header=BB0_1 Depth=1
ldp x8, x21, [x21, #8]
ldr w8, [x8]
add w20, w8, w20
b LBB0_1
LBB0_3:
cmp w8, #131
b.eq LBB0_7
; %bb.4:
cmp w8, #130
b.eq LBB0_9
; %bb.5:
cmp w8, #129
b.ne LBB0_10
; %bb.6:
mov x0, x21
bl _ensure_lvar_init
ldr w8, [x21, #32]
ldr w9, [x19]
add w8, w9, w8
add w2, w20, w8
Lloh0:
adrp x1, l_.str@PAGE
Lloh1:
add x1, x1, l_.str@PAGEOFF
b LBB0_8
LBB0_7:
ldr w0, [x21, #4]
bl _emit_expr
ldr w8, [x19]
add w2, w20, w8
Lloh2:
adrp x1, l_.str.1@PAGE
Lloh3:
add x1, x1, l_.str.1@PAGEOFF
LBB0_8:
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_lload
LBB0_9:
ldr w1, [x21, #24]
ldr w8, [x19]
add w2, w20, w8
mov x0, x19
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_gload
LBB0_10:
mov x0, x21
bl _node2s
mov x1, x0
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _error
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rbp"
l_.str.1: ; @.str.1
.asciz "rax"
l_.str.2: ; @.str.2
.asciz "internal error: %s"
.no_dead_strip _emit_load_struct_ref
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_load_struct_ref.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_logand
_emit_logand: ## @emit_logand
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %rbx
xorl %eax, %eax
callq _make_label
movq %rax, %r14
movl 4(%rbx), %edi
callq _emit_expr
leaq L_.str(%rip), %r15
movq %r15, %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.1(%rip), %r12
movq %r12, %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.2(%rip), %r13
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq _emit
movl (%rbx), %edi
callq _emit_expr
movq %r15, %rdi
xorl %eax, %eax
callq _emit
movq %r12, %rdi
xorl %eax, %eax
callq _emit
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq _emit
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r14, %rdi
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _emit_label ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "test #rax, #rax"
L_.str.1: ## @.str.1
.asciz "mov $0, #rax"
L_.str.2: ## @.str.2
.asciz "je %s"
L_.str.3: ## @.str.3
.asciz "mov $1, #rax"
.no_dead_strip _emit_logand
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_logand
_emit_logand: ; @emit_logand
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x24, x23, [sp, #16] ; 16-byte Folded Spill
stp x22, x21, [sp, #32] ; 16-byte Folded Spill
stp x20, x19, [sp, #48] ; 16-byte Folded Spill
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp, #64
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
mov x19, x0
bl _make_label
mov x20, x0
ldr w0, [x19, #4]
bl _emit_expr
Lloh0:
adrp x21, l_.str@PAGE
Lloh1:
add x21, x21, l_.str@PAGEOFF
mov x0, x21
bl _emit
Lloh2:
adrp x22, l_.str.1@PAGE
Lloh3:
add x22, x22, l_.str.1@PAGEOFF
mov x0, x22
bl _emit
str x20, [sp]
Lloh4:
adrp x23, l_.str.2@PAGE
Lloh5:
add x23, x23, l_.str.2@PAGEOFF
mov x0, x23
bl _emit
ldr w0, [x19]
bl _emit_expr
mov x0, x21
bl _emit
mov x0, x22
bl _emit
str x20, [sp]
mov x0, x23
bl _emit
Lloh6:
adrp x0, l_.str.3@PAGE
Lloh7:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
mov x0, x20
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #80
b _emit_label
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "test #rax, #rax"
l_.str.1: ; @.str.1
.asciz "mov $0, #rax"
l_.str.2: ; @.str.2
.asciz "je %s"
l_.str.3: ; @.str.3
.asciz "mov $1, #rax"
.no_dead_strip _emit_logand
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_logand.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_lognot
_emit_lognot: ## @emit_lognot
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl (%rdi), %edi
callq _emit_expr
leaq L_.str(%rip), %rdi
callq _emit
leaq L_.str.1(%rip), %rdi
callq _emit
leaq L_.str.2(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "cmp $0, #rax"
L_.str.1: ## @.str.1
.asciz "sete #al"
L_.str.2: ## @.str.2
.asciz "movzb #al, #eax"
.no_dead_strip _emit_lognot
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_lognot
_emit_lognot: ; @emit_lognot
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
ldr w0, [x0]
bl _emit_expr
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _emit
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _emit
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
b _emit
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "cmp $0, #rax"
l_.str.1: ; @.str.1
.asciz "sete #al"
l_.str.2: ; @.str.2
.asciz "movzb #al, #eax"
.no_dead_strip _emit_lognot
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_lognot.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_logor
_emit_logor: ## @emit_logor
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %rbx
xorl %eax, %eax
callq _make_label
movq %rax, %r14
movl 4(%rbx), %edi
callq _emit_expr
leaq L_.str(%rip), %r15
movq %r15, %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.1(%rip), %r12
movq %r12, %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.2(%rip), %r13
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq _emit
movl (%rbx), %edi
callq _emit_expr
movq %r15, %rdi
xorl %eax, %eax
callq _emit
movq %r12, %rdi
xorl %eax, %eax
callq _emit
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq _emit
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r14, %rdi
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _emit_label ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "test #rax, #rax"
L_.str.1: ## @.str.1
.asciz "mov $1, #rax"
L_.str.2: ## @.str.2
.asciz "jne %s"
L_.str.3: ## @.str.3
.asciz "mov $0, #rax"
.no_dead_strip _emit_logor
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_logor
_emit_logor: ; @emit_logor
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x24, x23, [sp, #16] ; 16-byte Folded Spill
stp x22, x21, [sp, #32] ; 16-byte Folded Spill
stp x20, x19, [sp, #48] ; 16-byte Folded Spill
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp, #64
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
mov x19, x0
bl _make_label
mov x20, x0
ldr w0, [x19, #4]
bl _emit_expr
Lloh0:
adrp x21, l_.str@PAGE
Lloh1:
add x21, x21, l_.str@PAGEOFF
mov x0, x21
bl _emit
Lloh2:
adrp x22, l_.str.1@PAGE
Lloh3:
add x22, x22, l_.str.1@PAGEOFF
mov x0, x22
bl _emit
str x20, [sp]
Lloh4:
adrp x23, l_.str.2@PAGE
Lloh5:
add x23, x23, l_.str.2@PAGEOFF
mov x0, x23
bl _emit
ldr w0, [x19]
bl _emit_expr
mov x0, x21
bl _emit
mov x0, x22
bl _emit
str x20, [sp]
mov x0, x23
bl _emit
Lloh6:
adrp x0, l_.str.3@PAGE
Lloh7:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
mov x0, x20
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #80
b _emit_label
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "test #rax, #rax"
l_.str.1: ; @.str.1
.asciz "mov $1, #rax"
l_.str.2: ; @.str.2
.asciz "jne %s"
l_.str.3: ; @.str.3
.asciz "mov $0, #rax"
.no_dead_strip _emit_logor
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_logor.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_lsave
_emit_lsave: ## @emit_lsave
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %esi, %r14d
movq (%rdi), %rax
movq _KIND_FLOAT@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_3
## %bb.1:
leaq L_.str(%rip), %rdi
jmp LBB0_2
LBB0_3:
movq _KIND_DOUBLE@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_5
## %bb.4:
leaq L_.str.1(%rip), %rdi
LBB0_2:
movl %r14d, %esi
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
LBB0_5:
movq %rdi, %rbx
callq _maybe_convert_bool
movq %rbx, %rdi
movl $97, %esi
callq _get_int_reg
movq %rax, %r15
leaq L_.str.2(%rip), %rdi
movl %r14d, %esi
callq _format
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq _maybe_emit_bitshift_save
leaq L_.str.3(%rip), %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_FLOAT,8,3 ## @KIND_FLOAT
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "movss #xmm0, %d(#rbp)"
.comm _KIND_DOUBLE,8,3 ## @KIND_DOUBLE
L_.str.1: ## @.str.1
.asciz "movsd #xmm0, %d(#rbp)"
L_.str.2: ## @.str.2
.asciz "%d(%%rbp)"
L_.str.3: ## @.str.3
.asciz "mov #%s, %s"
.no_dead_strip _emit_lsave
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_lsave
_emit_lsave: ; @emit_lsave
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x1
ldr x8, [x0]
Lloh0:
adrp x9, _KIND_FLOAT@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_FLOAT@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_2
; %bb.1:
str x19, [sp]
Lloh3:
adrp x0, l_.str@PAGE
Lloh4:
add x0, x0, l_.str@PAGEOFF
b LBB0_5
LBB0_2:
Lloh5:
adrp x9, _KIND_DOUBLE@GOTPAGE
Lloh6:
ldr x9, [x9, _KIND_DOUBLE@GOTPAGEOFF]
Lloh7:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_4
; %bb.3:
; kill: def $w19 killed $w19 killed $x19 def $x19
str x19, [sp]
Lloh8:
adrp x0, l_.str.1@PAGE
Lloh9:
add x0, x0, l_.str.1@PAGEOFF
b LBB0_5
LBB0_4:
mov x20, x0
bl _maybe_convert_bool
mov x0, x20
mov w1, #97
bl _get_int_reg
mov x21, x0
Lloh10:
adrp x0, l_.str.2@PAGE
Lloh11:
add x0, x0, l_.str.2@PAGEOFF
mov x1, x19
bl _format
mov x19, x0
mov x0, x20
mov x1, x19
bl _maybe_emit_bitshift_save
stp x21, x19, [sp]
Lloh12:
adrp x0, l_.str.3@PAGE
Lloh13:
add x0, x0, l_.str.3@PAGEOFF
LBB0_5:
bl _emit
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpLdrGotLdr Lloh5, Lloh6, Lloh7
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh10, Lloh11
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_FLOAT,8,3 ; @KIND_FLOAT
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "movss #xmm0, %d(#rbp)"
.comm _KIND_DOUBLE,8,3 ; @KIND_DOUBLE
l_.str.1: ; @.str.1
.asciz "movsd #xmm0, %d(#rbp)"
l_.str.2: ; @.str.2
.asciz "%d(%%rbp)"
l_.str.3: ; @.str.3
.asciz "mov #%s, %s"
.no_dead_strip _emit_lsave
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_lsave.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_lvar
_emit_lvar: ## @emit_lvar
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
callq _ensure_lvar_init
movl (%rbx), %edx
movl 4(%rbx), %edi
leaq L_.str(%rip), %rsi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_lload ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rbp"
.no_dead_strip _emit_lvar
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_lvar
_emit_lvar: ; @emit_lvar
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
bl _ensure_lvar_init
ldp w2, w0, [x19]
Lloh0:
adrp x1, l_.str@PAGE
Lloh1:
add x1, x1, l_.str@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_lload
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rbp"
.no_dead_strip _emit_lvar
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_lvar.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_padding
_emit_padding: ## @emit_padding
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movl (%rdi), %ebx
subl %esi, %ebx
movl %ebx, %edi
notl %edi
shrl $31, %edi
callq _assert
movl %ebx, %edi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_zero ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_padding
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_padding
_emit_padding: ; @emit_padding
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
ldr w8, [x0]
sub w19, w8, w1
mvn w8, w19
lsr w0, w8, #31
bl _assert
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_zero
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_padding
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_padding.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_pointer_arith
_emit_pointer_arith: ## @emit_pointer_arith
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdx, %r15
movq %rsi, %rbx
movl %edi, %r14d
movq %rsi, %rdi
callq _emit_expr
leaq L_.str(%rip), %rdi
callq _push
leaq L_.str.1(%rip), %rdi
callq _push
movq %r15, %rdi
callq _emit_expr
movq (%rbx), %rax
movq (%rax), %rax
movl (%rax), %esi
cmpl $2, %esi
jl LBB0_2
## %bb.1:
leaq L_.str.2(%rip), %rdi
xorl %eax, %eax
callq _emit
LBB0_2:
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.1(%rip), %rdi
callq _pop
movsbl %r14b, %esi
cmpl $45, %esi
je LBB0_6
## %bb.3:
cmpl $43, %esi
jne LBB0_7
## %bb.4:
leaq L_.str.4(%rip), %rdi
jmp LBB0_5
LBB0_6:
leaq L_.str.5(%rip), %rdi
LBB0_5:
xorl %eax, %eax
callq _emit
jmp LBB0_8
LBB0_7:
leaq L_.str.6(%rip), %rdi
callq _error
LBB0_8:
leaq L_.str(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _pop ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rcx"
L_.str.1: ## @.str.1
.asciz "rax"
L_.str.2: ## @.str.2
.asciz "imul $%d, #rax"
L_.str.3: ## @.str.3
.asciz "mov #rax, #rcx"
L_.str.4: ## @.str.4
.asciz "add #rcx, #rax"
L_.str.5: ## @.str.5
.asciz "sub #rcx, #rax"
L_.str.6: ## @.str.6
.asciz "invalid operator '%d'"
.no_dead_strip _emit_pointer_arith
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_pointer_arith
_emit_pointer_arith: ; @emit_pointer_arith
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x20, x2
mov x21, x1
mov x19, x0
mov x0, x1
bl _emit_expr
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _push
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _push
mov x0, x20
bl _emit_expr
ldr x8, [x21]
ldr x8, [x8]
ldr w8, [x8]
cmp w8, #2
b.lt LBB0_2
; %bb.1:
str x8, [sp]
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
LBB0_2:
Lloh6:
adrp x0, l_.str.3@PAGE
Lloh7:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
Lloh8:
adrp x0, l_.str.1@PAGE
Lloh9:
add x0, x0, l_.str.1@PAGEOFF
bl _pop
cmp w19, #45
b.eq LBB0_5
; %bb.3:
cmp w19, #43
b.ne LBB0_6
; %bb.4:
Lloh10:
adrp x0, l_.str.4@PAGE
Lloh11:
add x0, x0, l_.str.4@PAGEOFF
bl _emit
b LBB0_7
LBB0_5:
Lloh12:
adrp x0, l_.str.5@PAGE
Lloh13:
add x0, x0, l_.str.5@PAGEOFF
bl _emit
b LBB0_7
LBB0_6:
Lloh14:
adrp x0, l_.str.6@PAGE
Lloh15:
add x0, x0, l_.str.6@PAGEOFF
mov x1, x19
bl _error
LBB0_7:
Lloh16:
adrp x0, l_.str@PAGE
Lloh17:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _pop
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh14, Lloh15
.loh AdrpAdd Lloh16, Lloh17
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rcx"
l_.str.1: ; @.str.1
.asciz "rax"
l_.str.2: ; @.str.2
.asciz "imul $%d, #rax"
l_.str.3: ; @.str.3
.asciz "mov #rax, #rcx"
l_.str.4: ; @.str.4
.asciz "add #rcx, #rax"
l_.str.5: ; @.str.5
.asciz "sub #rcx, #rax"
l_.str.6: ; @.str.6
.asciz "invalid operator '%d'"
.no_dead_strip _emit_pointer_arith
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_pointer_arith.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_post_inc_dec
_emit_post_inc_dec: ## @emit_post_inc_dec
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %edi
callq _emit_expr
leaq L_.str(%rip), %rdi
callq _push
movq 8(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je LBB0_1
## %bb.2:
movl (%rax), %edx
jmp LBB0_3
LBB0_1:
movl $1, %edx
LBB0_3:
leaq L_.str.1(%rip), %rdi
movq %r14, %rsi
callq _emit
movl (%rbx), %edi
callq _emit_store
leaq L_.str(%rip), %rdi
popq %rbx
popq %r14
popq %rbp
jmp _pop ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rax"
L_.str.1: ## @.str.1
.asciz "%s $%d, #rax"
.no_dead_strip _emit_post_inc_dec
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_post_inc_dec
_emit_post_inc_dec: ; @emit_post_inc_dec
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x20, x1
mov x19, x0
ldr w0, [x0]
bl _emit_expr
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _push
ldr x8, [x19, #8]
ldr x8, [x8]
cbz x8, LBB0_2
; %bb.1:
ldr w2, [x8]
b LBB0_3
LBB0_2:
mov w2, #1
LBB0_3:
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
mov x1, x20
bl _emit
ldr w0, [x19]
bl _emit_store
Lloh4:
adrp x0, l_.str@PAGE
Lloh5:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _pop
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rax"
l_.str.1: ; @.str.1
.asciz "%s $%d, #rax"
.no_dead_strip _emit_post_inc_dec
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_post_inc_dec.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_pre_inc_dec
_emit_pre_inc_dec: ## @emit_pre_inc_dec
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %edi
callq _emit_expr
movq 8(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je LBB0_1
## %bb.2:
movl (%rax), %edx
jmp LBB0_3
LBB0_1:
movl $1, %edx
LBB0_3:
leaq L_.str(%rip), %rdi
movq %r14, %rsi
callq _emit
movl (%rbx), %edi
popq %rbx
popq %r14
popq %rbp
jmp _emit_store ## TAILCALL
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%s $%d, #rax"
.no_dead_strip _emit_pre_inc_dec
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_pre_inc_dec
_emit_pre_inc_dec: ; @emit_pre_inc_dec
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x20, x1
mov x19, x0
ldr w0, [x0]
bl _emit_expr
ldr x8, [x19, #8]
ldr x8, [x8]
cbz x8, LBB0_2
; %bb.1:
ldr w2, [x8]
b LBB0_3
LBB0_2:
mov w2, #1
LBB0_3:
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
mov x1, x20
bl _emit
ldr w0, [x19]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_store
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%s $%d, #rax"
.no_dead_strip _emit_pre_inc_dec
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_pre_inc_dec.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_regsave_area
_emit_regsave_area: ## @emit_regsave_area
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq _REGAREA_SIZE@GOTPCREL(%rip), %rbx
movl (%rbx), %esi
leaq L_.str(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.1(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.2(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.4(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.5(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.6(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.7(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.8(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.9(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.10(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.11(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.12(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.13(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.14(%rip), %rdi
xorl %eax, %eax
callq _emit
movl (%rbx), %eax
addq $8, %rsp
popq %rbx
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "sub $%d, #rsp"
.comm _REGAREA_SIZE,4,2 ## @REGAREA_SIZE
L_.str.1: ## @.str.1
.asciz "mov #rdi, (#rsp)"
L_.str.2: ## @.str.2
.asciz "mov #rsi, 8(#rsp)"
L_.str.3: ## @.str.3
.asciz "mov #rdx, 16(#rsp)"
L_.str.4: ## @.str.4
.asciz "mov #rcx, 24(#rsp)"
L_.str.5: ## @.str.5
.asciz "mov #r8, 32(#rsp)"
L_.str.6: ## @.str.6
.asciz "mov #r9, 40(#rsp)"
L_.str.7: ## @.str.7
.asciz "movaps #xmm0, 48(#rsp)"
L_.str.8: ## @.str.8
.asciz "movaps #xmm1, 64(#rsp)"
L_.str.9: ## @.str.9
.asciz "movaps #xmm2, 80(#rsp)"
L_.str.10: ## @.str.10
.asciz "movaps #xmm3, 96(#rsp)"
L_.str.11: ## @.str.11
.asciz "movaps #xmm4, 112(#rsp)"
L_.str.12: ## @.str.12
.asciz "movaps #xmm5, 128(#rsp)"
L_.str.13: ## @.str.13
.asciz "movaps #xmm6, 144(#rsp)"
L_.str.14: ## @.str.14
.asciz "movaps #xmm7, 160(#rsp)"
.no_dead_strip _emit_regsave_area
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_regsave_area
_emit_regsave_area: ; @emit_regsave_area
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
Lloh0:
adrp x19, _REGAREA_SIZE@GOTPAGE
Lloh1:
ldr x19, [x19, _REGAREA_SIZE@GOTPAGEOFF]
ldr w8, [x19]
str x8, [sp]
Lloh2:
adrp x0, l_.str@PAGE
Lloh3:
add x0, x0, l_.str@PAGEOFF
bl _emit
Lloh4:
adrp x0, l_.str.1@PAGE
Lloh5:
add x0, x0, l_.str.1@PAGEOFF
bl _emit
Lloh6:
adrp x0, l_.str.2@PAGE
Lloh7:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
Lloh8:
adrp x0, l_.str.3@PAGE
Lloh9:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
Lloh10:
adrp x0, l_.str.4@PAGE
Lloh11:
add x0, x0, l_.str.4@PAGEOFF
bl _emit
Lloh12:
adrp x0, l_.str.5@PAGE
Lloh13:
add x0, x0, l_.str.5@PAGEOFF
bl _emit
Lloh14:
adrp x0, l_.str.6@PAGE
Lloh15:
add x0, x0, l_.str.6@PAGEOFF
bl _emit
Lloh16:
adrp x0, l_.str.7@PAGE
Lloh17:
add x0, x0, l_.str.7@PAGEOFF
bl _emit
Lloh18:
adrp x0, l_.str.8@PAGE
Lloh19:
add x0, x0, l_.str.8@PAGEOFF
bl _emit
Lloh20:
adrp x0, l_.str.9@PAGE
Lloh21:
add x0, x0, l_.str.9@PAGEOFF
bl _emit
Lloh22:
adrp x0, l_.str.10@PAGE
Lloh23:
add x0, x0, l_.str.10@PAGEOFF
bl _emit
Lloh24:
adrp x0, l_.str.11@PAGE
Lloh25:
add x0, x0, l_.str.11@PAGEOFF
bl _emit
Lloh26:
adrp x0, l_.str.12@PAGE
Lloh27:
add x0, x0, l_.str.12@PAGEOFF
bl _emit
Lloh28:
adrp x0, l_.str.13@PAGE
Lloh29:
add x0, x0, l_.str.13@PAGEOFF
bl _emit
Lloh30:
adrp x0, l_.str.14@PAGE
Lloh31:
add x0, x0, l_.str.14@PAGEOFF
bl _emit
ldr w0, [x19]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
ret
.loh AdrpAdd Lloh30, Lloh31
.loh AdrpAdd Lloh28, Lloh29
.loh AdrpAdd Lloh26, Lloh27
.loh AdrpAdd Lloh24, Lloh25
.loh AdrpAdd Lloh22, Lloh23
.loh AdrpAdd Lloh20, Lloh21
.loh AdrpAdd Lloh18, Lloh19
.loh AdrpAdd Lloh16, Lloh17
.loh AdrpAdd Lloh14, Lloh15
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpLdrGot Lloh0, Lloh1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "sub $%d, #rsp"
.comm _REGAREA_SIZE,4,2 ; @REGAREA_SIZE
l_.str.1: ; @.str.1
.asciz "mov #rdi, (#rsp)"
l_.str.2: ; @.str.2
.asciz "mov #rsi, 8(#rsp)"
l_.str.3: ; @.str.3
.asciz "mov #rdx, 16(#rsp)"
l_.str.4: ; @.str.4
.asciz "mov #rcx, 24(#rsp)"
l_.str.5: ; @.str.5
.asciz "mov #r8, 32(#rsp)"
l_.str.6: ; @.str.6
.asciz "mov #r9, 40(#rsp)"
l_.str.7: ; @.str.7
.asciz "movaps #xmm0, 48(#rsp)"
l_.str.8: ; @.str.8
.asciz "movaps #xmm1, 64(#rsp)"
l_.str.9: ; @.str.9
.asciz "movaps #xmm2, 80(#rsp)"
l_.str.10: ; @.str.10
.asciz "movaps #xmm3, 96(#rsp)"
l_.str.11: ; @.str.11
.asciz "movaps #xmm4, 112(#rsp)"
l_.str.12: ; @.str.12
.asciz "movaps #xmm5, 128(#rsp)"
l_.str.13: ; @.str.13
.asciz "movaps #xmm6, 144(#rsp)"
l_.str.14: ; @.str.14
.asciz "movaps #xmm7, 160(#rsp)"
.no_dead_strip _emit_regsave_area
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_regsave_area.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_ret
_emit_ret: ## @emit_ret
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
leaq L_.str(%rip), %rdi
callq _emit
leaq L_.str.1(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "leave"
L_.str.1: ## @.str.1
.asciz "ret"
.no_dead_strip _emit_ret
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_ret
_emit_ret: ; @emit_ret
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _emit
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
b _emit
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "leave"
l_.str.1: ; @.str.1
.asciz "ret"
.no_dead_strip _emit_ret
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_ret.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_return
_emit_return: ## @emit_return
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je LBB0_2
## %bb.1:
callq _emit_expr
movq (%rbx), %rax
movl (%rax), %edi
callq _maybe_booleanize_retval
LBB0_2:
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_ret ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_return
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_return
_emit_return: ; @emit_return
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr x0, [x0]
cbz x0, LBB0_2
; %bb.1:
bl _emit_expr
ldr x8, [x19]
ldr w0, [x8]
bl _maybe_booleanize_retval
LBB0_2:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_ret
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_return
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_return.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_save_literal
_emit_save_literal: ## @emit_save_literal
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edx, %r14d
movq %rdi, %r15
movl (%rsi), %eax
addl $-128, %eax
cmpl $9, %eax
ja LBB0_12
## %bb.1:
leaq LJTI0_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_8:
movl (%r15), %esi
leaq L_.str.3(%rip), %rbx
movq %rbx, %rdi
movl %r14d, %edx
callq _emit
movslq 4(%r15), %rsi
jmp LBB0_9
LBB0_11:
movl 8(%r15), %esi
leaq L_.str.3(%rip), %rbx
movq %rbx, %rdi
movl %r14d, %edx
callq _emit
movslq 12(%r15), %rsi
LBB0_9:
addl $4, %r14d
movq %rbx, %rdi
jmp LBB0_5
LBB0_12:
movq %rsi, %rbx
movq %r15, %rdi
callq _node2s
movl %eax, %r15d
movq %rbx, %rdi
callq _ty2s
leaq L_.str.5(%rip), %rdi
movl %r15d, %esi
movq %rax, %rdx
movl %r14d, %ecx
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _error ## TAILCALL
LBB0_6:
movq (%r15), %rsi
leaq L_.str.1(%rip), %rdi
jmp LBB0_5
LBB0_7:
movq (%r15), %rsi
leaq L_.str.2(%rip), %rdi
jmp LBB0_5
LBB0_10:
movss 8(%r15), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss %xmm0, -32(%rbp)
movq -32(%rbp), %rsi
leaq L_.str.4(%rip), %rdi
jmp LBB0_5
LBB0_2:
xorl %esi, %esi
cmpq $0, (%r15)
setne %sil
jmp LBB0_4
LBB0_3:
movq (%r15), %rsi
LBB0_4:
leaq L_.str(%rip), %rdi
LBB0_5:
movl %r14d, %edx
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
.long L0_0_set_6
.long L0_0_set_8
.long L0_0_set_8
.long L0_0_set_8
.long L0_0_set_11
.long L0_0_set_7
.long L0_0_set_10
.long L0_0_set_11
.long L0_0_set_3
.long L0_0_set_2
.end_data_region
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "movb $%d, %d(#rbp)"
L_.str.1: ## @.str.1
.asciz "movw $%d, %d(#rbp)"
L_.str.2: ## @.str.2
.asciz "movl $%d, %d(#rbp)"
L_.str.3: ## @.str.3
.asciz "movl $%lu, %d(#rbp)"
L_.str.4: ## @.str.4
.asciz "movl $%u, %d(#rbp)"
L_.str.5: ## @.str.5
.asciz "internal error: <%s> <%s> <%d>"
.no_dead_strip _emit_save_literal
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_save_literal
_emit_save_literal: ; @emit_save_literal
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x2
mov x20, x0
ldr w8, [x1]
sub w8, w8, #128
cmp w8, #9
b.hi LBB0_5
; %bb.1:
Lloh0:
adrp x9, lJTI0_0@PAGE
Lloh1:
add x9, x9, lJTI0_0@PAGEOFF
adr x10, LBB0_2
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_2:
ldr w1, [x20]
Lloh2:
adrp x21, l_.str.3@PAGE
Lloh3:
add x21, x21, l_.str.3@PAGEOFF
mov x0, x21
mov x2, x19
bl _emit
ldrsw x1, [x20, #4]
b LBB0_4
LBB0_3:
ldr w1, [x20, #8]
Lloh4:
adrp x21, l_.str.3@PAGE
Lloh5:
add x21, x21, l_.str.3@PAGEOFF
mov x0, x21
mov x2, x19
bl _emit
ldrsw x1, [x20, #12]
LBB0_4:
add w2, w19, #4
mov x0, x21
b LBB0_13
LBB0_5:
mov x21, x1
mov x0, x20
bl _node2s
mov x20, x0
mov x0, x21
bl _ty2s
mov x2, x0
Lloh6:
adrp x0, l_.str.5@PAGE
Lloh7:
add x0, x0, l_.str.5@PAGEOFF
mov x1, x20
mov x3, x19
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _error
LBB0_6:
ldr x1, [x20]
Lloh8:
adrp x0, l_.str.1@PAGE
Lloh9:
add x0, x0, l_.str.1@PAGEOFF
b LBB0_12
LBB0_7:
ldr x1, [x20]
Lloh10:
adrp x0, l_.str.2@PAGE
Lloh11:
add x0, x0, l_.str.2@PAGEOFF
b LBB0_12
LBB0_8:
ldr s0, [x20, #8]
str s0, [sp, #8]
ldr x1, [sp, #8]
Lloh12:
adrp x0, l_.str.4@PAGE
Lloh13:
add x0, x0, l_.str.4@PAGEOFF
b LBB0_12
LBB0_9:
ldr x8, [x20]
cmp x8, #0
cset w1, ne
b LBB0_11
LBB0_10:
ldr x1, [x20]
LBB0_11:
Lloh14:
adrp x0, l_.str@PAGE
Lloh15:
add x0, x0, l_.str@PAGEOFF
LBB0_12:
mov x2, x19
LBB0_13:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
b _emit
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh14, Lloh15
.cfi_endproc
.section __TEXT,__const
lJTI0_0:
.byte (LBB0_6-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_3-LBB0_2)>>2
.byte (LBB0_7-LBB0_2)>>2
.byte (LBB0_8-LBB0_2)>>2
.byte (LBB0_3-LBB0_2)>>2
.byte (LBB0_10-LBB0_2)>>2
.byte (LBB0_9-LBB0_2)>>2
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "movb $%d, %d(#rbp)"
l_.str.1: ; @.str.1
.asciz "movw $%d, %d(#rbp)"
l_.str.2: ; @.str.2
.asciz "movl $%d, %d(#rbp)"
l_.str.3: ; @.str.3
.asciz "movl $%lu, %d(#rbp)"
l_.str.4: ; @.str.4
.asciz "movl $%u, %d(#rbp)"
l_.str.5: ; @.str.5
.asciz "internal error: <%s> <%s> <%d>"
.no_dead_strip _emit_save_literal
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_save_literal.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_store
_emit_store: ## @emit_store
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movl (%rdi), %eax
addl $-128, %eax
cmpl $3, %eax
ja LBB0_6
## %bb.1:
movq %rdi, %rbx
leaq LJTI0_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB0_3:
movl 4(%rbx), %esi
movl 16(%rbx), %edi
xorl %edx, %edx
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_assign_struct_ref ## TAILCALL
LBB0_6:
leaq L_.str(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _error ## TAILCALL
LBB0_4:
movq %rbx, %rdi
callq _ensure_lvar_init
movl 4(%rbx), %edi
movl 12(%rbx), %esi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_lsave ## TAILCALL
LBB0_5:
movl 4(%rbx), %esi
movl 8(%rbx), %edi
xorl %edx, %edx
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_gsave ## TAILCALL
LBB0_2:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_assign_deref ## TAILCALL
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
.long L0_0_set_3
.long L0_0_set_4
.long L0_0_set_5
.long L0_0_set_2
.end_data_region
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "internal error"
.no_dead_strip _emit_store
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_store
_emit_store: ; @emit_store
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
ldr w8, [x0]
sub w8, w8, #128
cmp w8, #3
b.hi LBB0_3
; %bb.1:
mov x19, x0
Lloh0:
adrp x9, lJTI0_0@PAGE
Lloh1:
add x9, x9, lJTI0_0@PAGEOFF
adr x10, LBB0_2
ldrb w11, [x9, x8]
add x10, x10, x11, lsl #2
br x10
LBB0_2:
ldr w0, [x19, #16]
ldr w1, [x19, #4]
mov w2, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_assign_struct_ref
LBB0_3:
Lloh2:
adrp x0, l_.str@PAGE
Lloh3:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _error
LBB0_4:
mov x0, x19
bl _ensure_lvar_init
ldr w0, [x19, #4]
ldr w1, [x19, #12]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_lsave
LBB0_5:
ldp w1, w0, [x19, #4]
mov w2, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_gsave
LBB0_6:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_assign_deref
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.cfi_endproc
.section __TEXT,__const
lJTI0_0:
.byte (LBB0_2-LBB0_2)>>2
.byte (LBB0_4-LBB0_2)>>2
.byte (LBB0_5-LBB0_2)>>2
.byte (LBB0_6-LBB0_2)>>2
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "internal error"
.no_dead_strip _emit_store
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_store.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_ternary
_emit_ternary: ## @emit_ternary
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq %rdi, %r14
movq 16(%rdi), %rdi
callq _emit_expr
xorl %eax, %eax
callq _make_label
movq %rax, %rbx
movq %rax, %rdi
callq _emit_je
movq 8(%r14), %rdi
testq %rdi, %rdi
je LBB0_2
## %bb.1:
callq _emit_expr
LBB0_2:
cmpq $0, (%r14)
je LBB0_4
## %bb.3:
xorl %eax, %eax
callq _make_label
movq %rax, %r15
movq %rax, %rdi
callq _emit_jmp
movq %rbx, %rdi
callq _emit_label
movq (%r14), %rdi
callq _emit_expr
movq %r15, %rbx
LBB0_4:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp _emit_label ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.no_dead_strip _emit_ternary
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_ternary
_emit_ternary: ; @emit_ternary
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x0
ldr x0, [x0, #16]
bl _emit_expr
bl _make_label
mov x20, x0
bl _emit_je
ldr x0, [x19, #8]
cbz x0, LBB0_2
; %bb.1:
bl _emit_expr
LBB0_2:
ldr x8, [x19]
cbz x8, LBB0_4
; %bb.3:
bl _make_label
mov x21, x0
bl _emit_jmp
mov x0, x20
bl _emit_label
ldr x0, [x19]
bl _emit_expr
mov x20, x21
LBB0_4:
mov x0, x20
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_label
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.no_dead_strip _emit_ternary
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_ternary.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_to_bool
_emit_to_bool: ## @emit_to_bool
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
callq _is_flotype
testq %rax, %rax
je LBB0_2
## %bb.1:
movl $1, %edi
callq _push_xmm
leaq L_.str(%rip), %rdi
xorl %eax, %eax
callq _emit
movq (%rbx), %rax
movq _KIND_FLOAT@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
leaq L_.str.2(%rip), %rax
leaq L_.str.3(%rip), %rsi
cmoveq %rax, %rsi
leaq L_.str.1(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.4(%rip), %rdi
xorl %eax, %eax
callq _emit
movl $1, %edi
callq _pop_xmm
jmp LBB0_3
LBB0_2:
leaq L_.str.5(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.4(%rip), %rdi
xorl %eax, %eax
callq _emit
LBB0_3:
leaq L_.str.6(%rip), %rdi
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "xorpd #xmm1, #xmm1"
L_.str.1: ## @.str.1
.asciz "%s #xmm1, #xmm0"
.comm _KIND_FLOAT,8,3 ## @KIND_FLOAT
L_.str.2: ## @.str.2
.asciz "ucomiss"
L_.str.3: ## @.str.3
.asciz "ucomisd"
L_.str.4: ## @.str.4
.asciz "setne #al"
L_.str.5: ## @.str.5
.asciz "cmp $0, #rax"
L_.str.6: ## @.str.6
.asciz "movzb #al, #eax"
.no_dead_strip _emit_to_bool
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_to_bool
_emit_to_bool: ; @emit_to_bool
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
bl _is_flotype
cbz x0, LBB0_2
; %bb.1:
mov w0, #1
bl _push_xmm
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _emit
ldr x8, [x19]
Lloh2:
adrp x9, _KIND_FLOAT@GOTPAGE
Lloh3:
ldr x9, [x9, _KIND_FLOAT@GOTPAGEOFF]
Lloh4:
ldr x9, [x9]
Lloh5:
adrp x10, l_.str.3@PAGE
Lloh6:
add x10, x10, l_.str.3@PAGEOFF
Lloh7:
adrp x11, l_.str.2@PAGE
Lloh8:
add x11, x11, l_.str.2@PAGEOFF
cmp x8, x9
csel x8, x11, x10, eq
str x8, [sp]
Lloh9:
adrp x0, l_.str.1@PAGE
Lloh10:
add x0, x0, l_.str.1@PAGEOFF
bl _emit
Lloh11:
adrp x0, l_.str.4@PAGE
Lloh12:
add x0, x0, l_.str.4@PAGEOFF
bl _emit
mov w0, #1
bl _pop_xmm
b LBB0_3
LBB0_2:
Lloh13:
adrp x0, l_.str.5@PAGE
Lloh14:
add x0, x0, l_.str.5@PAGEOFF
bl _emit
Lloh15:
adrp x0, l_.str.4@PAGE
Lloh16:
add x0, x0, l_.str.4@PAGEOFF
bl _emit
LBB0_3:
Lloh17:
adrp x0, l_.str.6@PAGE
Lloh18:
add x0, x0, l_.str.6@PAGEOFF
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
b _emit
.loh AdrpAdd Lloh11, Lloh12
.loh AdrpAdd Lloh9, Lloh10
.loh AdrpAdd Lloh7, Lloh8
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpLdrGotLdr Lloh2, Lloh3, Lloh4
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh15, Lloh16
.loh AdrpAdd Lloh13, Lloh14
.loh AdrpAdd Lloh17, Lloh18
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "xorpd #xmm1, #xmm1"
l_.str.1: ; @.str.1
.asciz "%s #xmm1, #xmm0"
.comm _KIND_FLOAT,8,3 ; @KIND_FLOAT
l_.str.2: ; @.str.2
.asciz "ucomiss"
l_.str.3: ; @.str.3
.asciz "ucomisd"
l_.str.4: ; @.str.4
.asciz "setne #al"
l_.str.5: ; @.str.5
.asciz "cmp $0, #rax"
l_.str.6: ; @.str.6
.asciz "movzb #al, #eax"
.no_dead_strip _emit_to_bool
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_to_bool.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_toint
_emit_toint: ## @emit_toint
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq (%rdi), %rax
movq _KIND_FLOAT@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_2
## %bb.1:
leaq L_.str(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
LBB0_2:
movq _KIND_DOUBLE@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_5
## %bb.3:
leaq L_.str.1(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
LBB0_5:
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _KIND_FLOAT,8,3 ## @KIND_FLOAT
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "cvttss2si #xmm0, #eax"
.comm _KIND_DOUBLE,8,3 ## @KIND_DOUBLE
L_.str.1: ## @.str.1
.asciz "cvttsd2si #xmm0, #eax"
.no_dead_strip _emit_toint
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_toint
_emit_toint: ; @emit_toint
.cfi_startproc
; %bb.0:
ldr x8, [x0]
Lloh0:
adrp x9, _KIND_FLOAT@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_FLOAT@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_2
; %bb.1:
Lloh3:
adrp x0, l_.str@PAGE
Lloh4:
add x0, x0, l_.str@PAGEOFF
b _emit
LBB0_2:
Lloh5:
adrp x9, _KIND_DOUBLE@GOTPAGE
Lloh6:
ldr x9, [x9, _KIND_DOUBLE@GOTPAGEOFF]
Lloh7:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_4
; %bb.3:
Lloh8:
adrp x0, l_.str.1@PAGE
Lloh9:
add x0, x0, l_.str.1@PAGEOFF
b _emit
LBB0_4:
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh3, Lloh4
.loh AdrpLdrGotLdr Lloh5, Lloh6, Lloh7
.loh AdrpAdd Lloh8, Lloh9
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _KIND_FLOAT,8,3 ; @KIND_FLOAT
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "cvttss2si #xmm0, #eax"
.comm _KIND_DOUBLE,8,3 ; @KIND_DOUBLE
l_.str.1: ; @.str.1
.asciz "cvttsd2si #xmm0, #eax"
.no_dead_strip _emit_toint
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_toint.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _emit_toplevel ## -- Begin function emit_toplevel
.p2align 4, 0x90
_emit_toplevel: ## @emit_toplevel
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movq _stackpos@GOTPCREL(%rip), %rax
movl $8, (%rax)
movq (%rdi), %rax
movq _AST_FUNC@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_1
## %bb.3:
movq %rbx, %rdi
callq _emit_func_prologue
movl 8(%rbx), %edi
callq _emit_expr
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_ret ## TAILCALL
LBB0_1:
movq _AST_DECL@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_2
## %bb.4:
movq %rbx, %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _emit_global_var ## TAILCALL
LBB0_2:
leaq L_.str(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %rbp
jmp _error ## TAILCALL
.cfi_endproc
## -- End function
.comm _stackpos,4,2 ## @stackpos
.comm _AST_FUNC,8,3 ## @AST_FUNC
.comm _AST_DECL,8,3 ## @AST_DECL
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "internal error"
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _emit_toplevel ; -- Begin function emit_toplevel
.p2align 2
_emit_toplevel: ; @emit_toplevel
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
Lloh0:
adrp x8, _stackpos@GOTPAGE
Lloh1:
ldr x8, [x8, _stackpos@GOTPAGEOFF]
mov w9, #8
Lloh2:
str w9, [x8]
ldr x8, [x0]
Lloh3:
adrp x9, _AST_FUNC@GOTPAGE
Lloh4:
ldr x9, [x9, _AST_FUNC@GOTPAGEOFF]
Lloh5:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_2
; %bb.1:
mov x0, x19
bl _emit_func_prologue
ldr w0, [x19, #8]
bl _emit_expr
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_ret
LBB0_2:
Lloh6:
adrp x9, _AST_DECL@GOTPAGE
Lloh7:
ldr x9, [x9, _AST_DECL@GOTPAGEOFF]
Lloh8:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_4
; %bb.3:
mov x0, x19
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _emit_global_var
LBB0_4:
Lloh9:
adrp x0, l_.str@PAGE
Lloh10:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
b _error
.loh AdrpLdrGotLdr Lloh3, Lloh4, Lloh5
.loh AdrpLdrGotStr Lloh0, Lloh1, Lloh2
.loh AdrpLdrGotLdr Lloh6, Lloh7, Lloh8
.loh AdrpAdd Lloh9, Lloh10
.cfi_endproc
; -- End function
.comm _stackpos,4,2 ; @stackpos
.comm _AST_FUNC,8,3 ; @AST_FUNC
.comm _AST_DECL,8,3 ; @AST_DECL
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "internal error"
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_toplevel.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_zero
_emit_zero: ## @emit_zero
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %edi, %ebx
cmpl $8, %edi
jl LBB0_1
## %bb.8:
leaq L_.str(%rip), %r14
.p2align 4, 0x90
LBB0_9: ## =>This Inner Loop Header: Depth=1
movq %r14, %rdi
callq _emit
leal -8(%rbx), %r15d
cmpl $15, %ebx
movl %r15d, %ebx
ja LBB0_9
## %bb.2:
cmpl $4, %r15d
jl LBB0_3
LBB0_10:
leaq L_.str.1(%rip), %r14
.p2align 4, 0x90
LBB0_11: ## =>This Inner Loop Header: Depth=1
movq %r14, %rdi
callq _emit
leal -4(%r15), %ebx
cmpl $7, %r15d
movl %ebx, %r15d
ja LBB0_11
## %bb.4:
testl %ebx, %ebx
jg LBB0_5
jmp LBB0_7
LBB0_1:
movl %ebx, %r15d
cmpl $4, %r15d
jge LBB0_10
LBB0_3:
movl %r15d, %ebx
testl %ebx, %ebx
jle LBB0_7
LBB0_5:
incl %ebx
leaq L_.str.2(%rip), %r14
.p2align 4, 0x90
LBB0_6: ## =>This Inner Loop Header: Depth=1
movq %r14, %rdi
callq _emit
decl %ebx
cmpl $1, %ebx
ja LBB0_6
LBB0_7:
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz ".quad 0"
L_.str.1: ## @.str.1
.asciz ".long 0"
L_.str.2: ## @.str.2
.asciz ".byte 0"
.no_dead_strip _emit_zero
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_zero
_emit_zero: ; @emit_zero
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x0
cmp w0, #8
b.lt LBB0_7
; %bb.1:
Lloh0:
adrp x20, l_.str@PAGE
Lloh1:
add x20, x20, l_.str@PAGEOFF
LBB0_2: ; =>This Inner Loop Header: Depth=1
mov x0, x20
bl _emit
sub w21, w19, #8
cmp w19, #15
mov x19, x21
b.hi LBB0_2
; %bb.3:
cmp w21, #4
b.lt LBB0_8
LBB0_4:
Lloh2:
adrp x19, l_.str.1@PAGE
Lloh3:
add x19, x19, l_.str.1@PAGEOFF
LBB0_5: ; =>This Inner Loop Header: Depth=1
mov x0, x19
bl _emit
sub w8, w21, #4
cmp w21, #7
mov x21, x8
b.hi LBB0_5
; %bb.6:
cmp w8, #1
b.ge LBB0_9
b LBB0_11
LBB0_7:
mov x21, x19
cmp w21, #4
b.ge LBB0_4
LBB0_8:
mov x8, x21
cmp w8, #1
b.lt LBB0_11
LBB0_9:
add w20, w8, #1
Lloh4:
adrp x19, l_.str.2@PAGE
Lloh5:
add x19, x19, l_.str.2@PAGEOFF
LBB0_10: ; =>This Inner Loop Header: Depth=1
mov x0, x19
bl _emit
sub w20, w20, #1
cmp w20, #1
b.hi LBB0_10
LBB0_11:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
ret
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz ".quad 0"
l_.str.1: ; @.str.1
.asciz ".long 0"
l_.str.2: ; @.str.2
.asciz ".byte 0"
.no_dead_strip _emit_zero
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_zero.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function emit_zero_filler
_emit_zero_filler: ## @emit_zero_filler
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
.cfi_offset %rbx, -48
.cfi_offset %r12, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movl %esi, %r14d
movl %edi, %ebx
leal -4(%r14), %r12d
cmpl %edi, %r12d
jl LBB0_3
## %bb.1:
leaq L_.str(%rip), %r15
.p2align 4, 0x90
LBB0_2: ## =>This Inner Loop Header: Depth=1
movq %r15, %rdi
movl %ebx, %esi
callq _emit
addl $4, %ebx
cmpl %r12d, %ebx
jle LBB0_2
LBB0_3:
cmpl %r14d, %ebx
jge LBB0_6
## %bb.4:
leaq L_.str.1(%rip), %r15
.p2align 4, 0x90
LBB0_5: ## =>This Inner Loop Header: Depth=1
movq %r15, %rdi
movl %ebx, %esi
callq _emit
incl %ebx
cmpl %ebx, %r14d
jne LBB0_5
LBB0_6:
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "movl $0, %d(#rbp)"
L_.str.1: ## @.str.1
.asciz "movb $0, %d(#rbp)"
.no_dead_strip _emit_zero_filler
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function emit_zero_filler
_emit_zero_filler: ; @emit_zero_filler
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
mov x19, x1
mov x20, x0
sub w22, w1, #4
cmp w22, w0
b.lt LBB0_3
; %bb.1:
Lloh0:
adrp x21, l_.str@PAGE
Lloh1:
add x21, x21, l_.str@PAGEOFF
LBB0_2: ; =>This Inner Loop Header: Depth=1
mov x0, x21
mov x1, x20
bl _emit
add w20, w20, #4
cmp w20, w22
b.le LBB0_2
LBB0_3:
cmp w20, w19
b.ge LBB0_6
; %bb.4:
Lloh2:
adrp x21, l_.str.1@PAGE
Lloh3:
add x21, x21, l_.str.1@PAGEOFF
LBB0_5: ; =>This Inner Loop Header: Depth=1
mov x0, x21
mov x1, x20
bl _emit
add w20, w20, #1
cmp w19, w20
b.ne LBB0_5
LBB0_6:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
ret
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "movl $0, %d(#rbp)"
l_.str.1: ; @.str.1
.asciz "movb $0, %d(#rbp)"
.no_dead_strip _emit_zero_filler
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_emit_zero_filler.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function ensure_lvar_init
_ensure_lvar_init: ## @ensure_lvar_init
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movq (%rdi), %rax
movq _AST_LVAR@GOTPCREL(%rip), %rcx
xorl %edi, %edi
cmpq (%rcx), %rax
sete %dil
callq _assert
movq 8(%rbx), %rdi
testq %rdi, %rdi
je LBB0_2
## %bb.1:
movl 24(%rbx), %esi
movq 16(%rbx), %rax
movl (%rax), %edx
callq _emit_decl_init
LBB0_2:
movq $0, 8(%rbx)
addq $8, %rsp
popq %rbx
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.comm _AST_LVAR,8,3 ## @AST_LVAR
.no_dead_strip _ensure_lvar_init
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function ensure_lvar_init
_ensure_lvar_init: ; @ensure_lvar_init
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr x8, [x0]
Lloh0:
adrp x9, _AST_LVAR@GOTPAGE
Lloh1:
ldr x9, [x9, _AST_LVAR@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
cset w0, eq
bl _assert
ldr x0, [x19, #8]
cbz x0, LBB0_2
; %bb.1:
ldr w1, [x19, #24]
ldr x8, [x19, #16]
ldr w2, [x8]
bl _emit_decl_init
LBB0_2:
str xzr, [x19, #8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.comm _AST_LVAR,8,3 ; @AST_LVAR
.no_dead_strip _ensure_lvar_init
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_ensure_lvar_init.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function get_caller_list
_get_caller_list: ## @get_caller_list
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
xorl %eax, %eax
callq _make_buffer
movq %rax, %r14
movq _functions@GOTPCREL(%rip), %r13
movl (%r13), %edi
callq _vec_len
testl %eax, %eax
jle LBB0_4
## %bb.1:
movl (%r13), %edi
xorl %esi, %esi
callq _vec_get
leaq L_.str.1(%rip), %rsi
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq _buf_printf
movl (%r13), %edi
callq _vec_len
cmpl $2, %eax
jl LBB0_4
## %bb.2:
movl $1, %ebx
leaq L_.str(%rip), %r15
leaq L_.str.1(%rip), %r12
.p2align 4, 0x90
LBB0_3: ## =>This Inner Loop Header: Depth=1
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq _buf_printf
movl (%r13), %edi
movl %ebx, %esi
callq _vec_get
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
xorl %eax, %eax
callq _buf_printf
incl %ebx
movl (%r13), %edi
callq _vec_len
cmpl %eax, %ebx
jl LBB0_3
LBB0_4:
movq %r14, %rdi
xorl %esi, %esi
callq _buf_write
movq %r14, %rdi
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _buf_body ## TAILCALL
.cfi_endproc
## -- End function
.comm _functions,4,2 ## @functions
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz " -> "
L_.str.1: ## @.str.1
.asciz "%s"
.no_dead_strip _get_caller_list
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function get_caller_list
_get_caller_list: ; @get_caller_list
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x24, x23, [sp, #16] ; 16-byte Folded Spill
stp x22, x21, [sp, #32] ; 16-byte Folded Spill
stp x20, x19, [sp, #48] ; 16-byte Folded Spill
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp, #64
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
bl _make_buffer
mov x19, x0
Lloh0:
adrp x23, _functions@GOTPAGE
Lloh1:
ldr x23, [x23, _functions@GOTPAGEOFF]
ldr w0, [x23]
bl _vec_len
cmp w0, #1
b.lt LBB0_4
; %bb.1:
ldr w0, [x23]
mov w1, #0
bl _vec_get
; kill: def $w0 killed $w0 def $x0
str x0, [sp]
Lloh2:
adrp x1, l_.str.1@PAGE
Lloh3:
add x1, x1, l_.str.1@PAGEOFF
mov x0, x19
bl _buf_printf
ldr w0, [x23]
bl _vec_len
cmp w0, #2
b.lt LBB0_4
; %bb.2:
mov w20, #1
Lloh4:
adrp x21, l_.str@PAGE
Lloh5:
add x21, x21, l_.str@PAGEOFF
Lloh6:
adrp x22, l_.str.1@PAGE
Lloh7:
add x22, x22, l_.str.1@PAGEOFF
LBB0_3: ; =>This Inner Loop Header: Depth=1
mov x0, x19
mov x1, x21
bl _buf_printf
ldr w0, [x23]
mov x1, x20
bl _vec_get
; kill: def $w0 killed $w0 def $x0
str x0, [sp]
mov x0, x19
mov x1, x22
bl _buf_printf
add w20, w20, #1
ldr w0, [x23]
bl _vec_len
cmp w20, w0
b.lt LBB0_3
LBB0_4:
mov x0, x19
mov w1, #0
bl _buf_write
mov x0, x19
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #80
b _buf_body
.loh AdrpLdrGot Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _functions,4,2 ; @functions
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz " -> "
l_.str.1: ; @.str.1
.asciz "%s"
.no_dead_strip _get_caller_list
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_get_caller_list.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function maybe_booleanize_retval
_maybe_booleanize_retval: ## @maybe_booleanize_retval
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq (%rdi), %rax
movq _KIND_BOOL@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_1
## %bb.2:
leaq L_.str(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
LBB0_1:
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _KIND_BOOL,8,3 ## @KIND_BOOL
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "movzx #al, #rax"
.no_dead_strip _maybe_booleanize_retval
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function maybe_booleanize_retval
_maybe_booleanize_retval: ; @maybe_booleanize_retval
.cfi_startproc
; %bb.0:
ldr x8, [x0]
Lloh0:
adrp x9, _KIND_BOOL@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_BOOL@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_2
; %bb.1:
Lloh3:
adrp x0, l_.str@PAGE
Lloh4:
add x0, x0, l_.str@PAGEOFF
b _emit
LBB0_2:
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh3, Lloh4
.cfi_endproc
; -- End function
.comm _KIND_BOOL,8,3 ; @KIND_BOOL
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "movzx #al, #rax"
.no_dead_strip _maybe_booleanize_retval
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_maybe_booleanize_retval.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function maybe_convert_bool
_maybe_convert_bool: ## @maybe_convert_bool
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq (%rdi), %rax
movq _KIND_BOOL@GOTPCREL(%rip), %rcx
cmpq (%rcx), %rax
jne LBB0_1
## %bb.2:
leaq L_.str(%rip), %rdi
callq _emit
leaq L_.str.1(%rip), %rdi
popq %rbp
jmp _emit ## TAILCALL
LBB0_1:
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _KIND_BOOL,8,3 ## @KIND_BOOL
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "test #rax, #rax"
L_.str.1: ## @.str.1
.asciz "setne #al"
.no_dead_strip _maybe_convert_bool
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function maybe_convert_bool
_maybe_convert_bool: ; @maybe_convert_bool
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
ldr x8, [x0]
Lloh0:
adrp x9, _KIND_BOOL@GOTPAGE
Lloh1:
ldr x9, [x9, _KIND_BOOL@GOTPAGEOFF]
Lloh2:
ldr x9, [x9]
cmp x8, x9
b.ne LBB0_2
; %bb.1:
Lloh3:
adrp x0, l_.str@PAGE
Lloh4:
add x0, x0, l_.str@PAGEOFF
bl _emit
Lloh5:
adrp x0, l_.str.1@PAGE
Lloh6:
add x0, x0, l_.str.1@PAGEOFF
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
b _emit
LBB0_2:
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpAdd Lloh5, Lloh6
.loh AdrpAdd Lloh3, Lloh4
.cfi_endproc
; -- End function
.comm _KIND_BOOL,8,3 ; @KIND_BOOL
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "test #rax, #rax"
l_.str.1: ; @.str.1
.asciz "setne #al"
.no_dead_strip _maybe_convert_bool
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_maybe_convert_bool.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function maybe_emit_bitshift_load
_maybe_emit_bitshift_load: ## @maybe_emit_bitshift_load
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
cmpq $0, (%rdi)
jle LBB0_1
## %bb.2:
movq %rdi, %rbx
movl 8(%rdi), %esi
leaq L_.str(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.1(%rip), %r14
movq %r14, %rdi
callq _push
movb (%rbx), %cl
movl $-1, %esi
shll %cl, %esi
notl %esi
leaq L_.str.2(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp _pop ## TAILCALL
LBB0_1:
popq %rbx
popq %r14
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "shr $%d, #rax"
L_.str.1: ## @.str.1
.asciz "rcx"
L_.str.2: ## @.str.2
.asciz "mov $0x%lx, #rcx"
L_.str.3: ## @.str.3
.asciz "and #rcx, #rax"
.no_dead_strip _maybe_emit_bitshift_load
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function maybe_emit_bitshift_load
_maybe_emit_bitshift_load: ; @maybe_emit_bitshift_load
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
ldr x8, [x0]
cmp x8, #1
b.lt LBB0_2
; %bb.1:
mov x19, x0
ldr w8, [x0, #8]
str x8, [sp]
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _emit
Lloh2:
adrp x20, l_.str.1@PAGE
Lloh3:
add x20, x20, l_.str.1@PAGEOFF
mov x0, x20
bl _push
ldr w8, [x19]
mov w9, #-1
lsl w8, w9, w8
mvn w8, w8
str x8, [sp]
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
Lloh6:
adrp x0, l_.str.3@PAGE
Lloh7:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
mov x0, x20
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
b _pop
LBB0_2:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #48
ret
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "shr $%d, #rax"
l_.str.1: ; @.str.1
.asciz "rcx"
l_.str.2: ; @.str.2
.asciz "mov $0x%lx, #rcx"
l_.str.3: ; @.str.3
.asciz "and #rcx, #rax"
.no_dead_strip _maybe_emit_bitshift_load
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_maybe_emit_bitshift_load.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function maybe_emit_bitshift_save
_maybe_emit_bitshift_save: ## @maybe_emit_bitshift_save
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
.cfi_offset %rbx, -56
.cfi_offset %r12, -48
.cfi_offset %r13, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
cmpq $0, (%rdi)
jle LBB0_1
## %bb.2:
movq %rsi, %r13
movq %rdi, %r12
leaq L_.str(%rip), %rdi
callq _push
leaq L_.str.1(%rip), %r15
movq %r15, %rdi
callq _push
movb (%r12), %cl
movl $-1, %ebx
movl $-1, %esi
shll %cl, %esi
notl %esi
leaq L_.str.2(%rip), %r14
movq %r14, %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
callq _emit
movl 8(%r12), %esi
leaq L_.str.4(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r12, %rdi
movl $99, %esi
callq _get_int_reg
leaq L_.str.5(%rip), %rdi
movq %r13, %rsi
movl %eax, %edx
xorl %eax, %eax
callq _emit
movb (%r12), %cl
movb 8(%r12), %al
shll %cl, %ebx
notl %ebx
movl %eax, %ecx
shll %cl, %ebx
notl %ebx
movq %r14, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq _emit
leaq L_.str.6(%rip), %rdi
xorl %eax, %eax
callq _emit
leaq L_.str.7(%rip), %rdi
xorl %eax, %eax
callq _emit
movq %r15, %rdi
callq _pop
leaq L_.str(%rip), %rdi
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp _pop ## TAILCALL
LBB0_1:
addq $8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "rcx"
L_.str.1: ## @.str.1
.asciz "rdi"
L_.str.2: ## @.str.2
.asciz "mov $0x%lx, #rdi"
L_.str.3: ## @.str.3
.asciz "and #rdi, #rax"
L_.str.4: ## @.str.4
.asciz "shl $%d, #rax"
L_.str.5: ## @.str.5
.asciz "mov %s, #%s"
L_.str.6: ## @.str.6
.asciz "and #rdi, #rcx"
L_.str.7: ## @.str.7
.asciz "or #rcx, #rax"
.no_dead_strip _maybe_emit_bitshift_save
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function maybe_emit_bitshift_save
_maybe_emit_bitshift_save: ; @maybe_emit_bitshift_save
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x24, x23, [sp, #16] ; 16-byte Folded Spill
stp x22, x21, [sp, #32] ; 16-byte Folded Spill
stp x20, x19, [sp, #48] ; 16-byte Folded Spill
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add x29, sp, #64
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
.cfi_offset w23, -56
.cfi_offset w24, -64
ldr x8, [x0]
cmp x8, #1
b.lt LBB0_2
; %bb.1:
mov x22, x1
mov x21, x0
Lloh0:
adrp x19, l_.str@PAGE
Lloh1:
add x19, x19, l_.str@PAGEOFF
mov x0, x19
bl _push
Lloh2:
adrp x20, l_.str.1@PAGE
Lloh3:
add x20, x20, l_.str.1@PAGEOFF
mov x0, x20
bl _push
ldr w8, [x21]
mov w24, #-1
lsl w8, w24, w8
mvn w8, w8
str x8, [sp]
Lloh4:
adrp x23, l_.str.2@PAGE
Lloh5:
add x23, x23, l_.str.2@PAGEOFF
mov x0, x23
bl _emit
Lloh6:
adrp x0, l_.str.3@PAGE
Lloh7:
add x0, x0, l_.str.3@PAGEOFF
bl _emit
ldr w8, [x21, #8]
str x8, [sp]
Lloh8:
adrp x0, l_.str.4@PAGE
Lloh9:
add x0, x0, l_.str.4@PAGEOFF
bl _emit
mov x0, x21
mov w1, #99
bl _get_int_reg
; kill: def $w0 killed $w0 def $x0
stp x22, x0, [sp]
Lloh10:
adrp x0, l_.str.5@PAGE
Lloh11:
add x0, x0, l_.str.5@PAGEOFF
bl _emit
ldr w8, [x21]
lsl w8, w24, w8
mvn w8, w8
ldr w9, [x21, #8]
lsl w8, w8, w9
mvn w8, w8
str x8, [sp]
mov x0, x23
bl _emit
Lloh12:
adrp x0, l_.str.6@PAGE
Lloh13:
add x0, x0, l_.str.6@PAGEOFF
bl _emit
Lloh14:
adrp x0, l_.str.7@PAGE
Lloh15:
add x0, x0, l_.str.7@PAGEOFF
bl _emit
mov x0, x20
bl _pop
mov x0, x19
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #80
b _pop
LBB0_2:
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
ldp x24, x23, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #80
ret
.loh AdrpAdd Lloh14, Lloh15
.loh AdrpAdd Lloh12, Lloh13
.loh AdrpAdd Lloh10, Lloh11
.loh AdrpAdd Lloh8, Lloh9
.loh AdrpAdd Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "rcx"
l_.str.1: ; @.str.1
.asciz "rdi"
l_.str.2: ; @.str.2
.asciz "mov $0x%lx, #rdi"
l_.str.3: ; @.str.3
.asciz "and #rdi, #rax"
l_.str.4: ; @.str.4
.asciz "shl $%d, #rax"
l_.str.5: ; @.str.5
.asciz "mov %s, #%s"
l_.str.6: ; @.str.6
.asciz "and #rdi, #rcx"
l_.str.7: ; @.str.7
.asciz "or #rcx, #rax"
.no_dead_strip _maybe_emit_bitshift_save
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_maybe_emit_bitshift_save.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function maybe_emit_builtin
_maybe_emit_builtin: ## @maybe_emit_builtin
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
.cfi_offset %rbx, -24
movq %rdi, %rbx
movl (%rdi), %esi
leaq L_.str(%rip), %rdi
callq _strcmp
testl %eax, %eax
je LBB0_1
## %bb.2:
movl (%rbx), %esi
leaq L_.str.1(%rip), %rdi
callq _strcmp
testl %eax, %eax
je LBB0_3
## %bb.4:
movl (%rbx), %esi
leaq L_.str.2(%rip), %rdi
callq _strcmp
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne LBB0_7
## %bb.5:
movq %rbx, %rdi
callq _emit_builtin_va_start
jmp LBB0_6
LBB0_1:
movq %rbx, %rdi
callq _emit_builtin_return_address
jmp LBB0_6
LBB0_3:
movq %rbx, %rdi
callq _emit_builtin_reg_class
LBB0_6:
movl $1, %eax
LBB0_7:
addq $8, %rsp
popq %rbx
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "__builtin_return_address"
L_.str.1: ## @.str.1
.asciz "__builtin_reg_class"
L_.str.2: ## @.str.2
.asciz "__builtin_va_start"
.no_dead_strip _maybe_emit_builtin
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function maybe_emit_builtin
_maybe_emit_builtin: ; @maybe_emit_builtin
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
mov x19, x0
ldr w1, [x0]
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _strcmp
cbz w0, LBB0_4
; %bb.1:
ldr w1, [x19]
Lloh2:
adrp x0, l_.str.1@PAGE
Lloh3:
add x0, x0, l_.str.1@PAGEOFF
bl _strcmp
cbz w0, LBB0_5
; %bb.2:
ldr w1, [x19]
Lloh4:
adrp x0, l_.str.2@PAGE
Lloh5:
add x0, x0, l_.str.2@PAGEOFF
bl _strcmp
cbz w0, LBB0_6
; %bb.3:
mov w0, #0
b LBB0_8
LBB0_4:
mov x0, x19
bl _emit_builtin_return_address
b LBB0_7
LBB0_5:
mov x0, x19
bl _emit_builtin_reg_class
b LBB0_7
LBB0_6:
mov x0, x19
bl _emit_builtin_va_start
LBB0_7:
mov w0, #1
LBB0_8:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.loh AdrpAdd Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpAdd Lloh4, Lloh5
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "__builtin_return_address"
l_.str.1: ; @.str.1
.asciz "__builtin_reg_class"
l_.str.2: ; @.str.2
.asciz "__builtin_va_start"
.no_dead_strip _maybe_emit_builtin
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_maybe_emit_builtin.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function maybe_print_source_line
_maybe_print_source_line: ## @maybe_print_source_line
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
.cfi_offset %rbx, -48
.cfi_offset %r12, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq _dumpsource@GOTPCREL(%rip), %rax
cmpl $0, (%rax)
je LBB0_5
## %bb.1:
movl %esi, %r14d
movq %rdi, %r15
movq _source_lines@GOTPCREL(%rip), %r12
movl (%r12), %edi
movq %r15, %rsi
callq _map_get
movq %rax, %rbx
testq %rax, %rax
jne LBB0_4
## %bb.2:
movq %r15, %rdi
callq _read_source_file
testq %rax, %rax
je LBB0_5
## %bb.3:
movq %rax, %rbx
movl (%r12), %edi
movq %r15, %rsi
movq %rax, %rdx
callq _map_put
LBB0_4:
movslq %r14d, %rax
movq -8(%rbx,%rax,8), %rsi
leaq L_.str(%rip), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp _emit_nostack ## TAILCALL
LBB0_5:
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _dumpsource,4,2 ## @dumpsource
.comm _source_lines,4,2 ## @source_lines
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "# %s"
.no_dead_strip _maybe_print_source_line
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function maybe_print_source_line
_maybe_print_source_line: ; @maybe_print_source_line
.cfi_startproc
; %bb.0:
stp x22, x21, [sp, #-48]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 48
stp x20, x19, [sp, #16] ; 16-byte Folded Spill
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #32
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
Lloh0:
adrp x8, _dumpsource@GOTPAGE
Lloh1:
ldr x8, [x8, _dumpsource@GOTPAGEOFF]
Lloh2:
ldr w8, [x8]
cbz w8, LBB0_5
; %bb.1:
mov x19, x1
mov x20, x0
Lloh3:
adrp x22, _source_lines@GOTPAGE
Lloh4:
ldr x22, [x22, _source_lines@GOTPAGEOFF]
ldr w0, [x22]
mov x1, x20
bl _map_get
mov x21, x0
cbnz x0, LBB0_4
; %bb.2:
mov x0, x20
bl _read_source_file
cbz x0, LBB0_5
; %bb.3:
mov x21, x0
ldr w0, [x22]
mov x1, x20
mov x2, x21
bl _map_put
LBB0_4:
sub w8, w19, #1
ldr x1, [x21, w8, sxtw #3]
Lloh5:
adrp x0, l_.str@PAGE
Lloh6:
add x0, x0, l_.str@PAGEOFF
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
b _emit_nostack
LBB0_5:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
ldp x22, x21, [sp], #48 ; 16-byte Folded Reload
ret
.loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2
.loh AdrpLdrGot Lloh3, Lloh4
.loh AdrpAdd Lloh5, Lloh6
.cfi_endproc
; -- End function
.comm _dumpsource,4,2 ; @dumpsource
.comm _source_lines,4,2 ; @source_lines
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "# %s"
.no_dead_strip _maybe_print_source_line
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_maybe_print_source_line.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function maybe_print_source_loc
_maybe_print_source_loc: ## @maybe_print_source_loc
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
.cfi_offset %rbx, -48
.cfi_offset %r12, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq (%rdi), %rax
testq %rax, %rax
je LBB0_6
## %bb.1:
movq %rdi, %r15
movq (%rax), %r14
movq _source_files@GOTPCREL(%rip), %r12
movl (%r12), %edi
movq %r14, %rsi
callq _map_get
movq %rax, %rbx
testq %rax, %rax
jne LBB0_3
## %bb.2:
movl (%r12), %edi
callq _map_len
incl %eax
movslq %eax, %rbx
movl (%r12), %edi
movq %r14, %rsi
movq %rbx, %rdx
callq _map_put
movq %r14, %rdi
callq _quote_cstring
leaq L_.str(%rip), %rdi
movq %rbx, %rsi
movl %eax, %edx
xorl %eax, %eax
callq _emit
LBB0_3:
movq (%r15), %rax
movl 8(%rax), %edx
leaq L_.str.1(%rip), %rdi
movq %rbx, %rsi
callq _format
movq %rax, %rbx
movq _last_loc@GOTPCREL(%rip), %r12
movq (%r12), %rsi
movq %rax, %rdi
callq _strcmp
testq %rax, %rax
je LBB0_5
## %bb.4:
leaq L_.str.2(%rip), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq _emit
movq (%r15), %rax
movl 8(%rax), %esi
movq %r14, %rdi
callq _maybe_print_source_line
LBB0_5:
movq %rbx, (%r12)
LBB0_6:
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _source_files,4,2 ## @source_files
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz ".file %ld \"%s\""
L_.str.1: ## @.str.1
.asciz ".loc %ld %d 0"
.comm _last_loc,8,3 ## @last_loc
L_.str.2: ## @.str.2
.asciz "%s"
.no_dead_strip _maybe_print_source_loc
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function maybe_print_source_loc
_maybe_print_source_loc: ; @maybe_print_source_loc
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x22, x21, [sp, #16] ; 16-byte Folded Spill
stp x20, x19, [sp, #32] ; 16-byte Folded Spill
stp x29, x30, [sp, #48] ; 16-byte Folded Spill
add x29, sp, #48
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
.cfi_offset w21, -40
.cfi_offset w22, -48
ldr x8, [x0]
cbz x8, LBB0_6
; %bb.1:
mov x19, x0
ldr x20, [x8]
Lloh0:
adrp x22, _source_files@GOTPAGE
Lloh1:
ldr x22, [x22, _source_files@GOTPAGEOFF]
ldr w0, [x22]
mov x1, x20
bl _map_get
mov x21, x0
cbnz x0, LBB0_3
; %bb.2:
ldr w0, [x22]
bl _map_len
add w8, w0, #1
sxtw x21, w8
ldr w0, [x22]
mov x1, x20
mov x2, x21
bl _map_put
mov x0, x20
bl _quote_cstring
; kill: def $w0 killed $w0 def $x0
stp x21, x0, [sp]
Lloh2:
adrp x0, l_.str@PAGE
Lloh3:
add x0, x0, l_.str@PAGEOFF
bl _emit
LBB0_3:
ldr x8, [x19]
ldr w2, [x8, #8]
Lloh4:
adrp x0, l_.str.1@PAGE
Lloh5:
add x0, x0, l_.str.1@PAGEOFF
mov x1, x21
bl _format
mov x21, x0
Lloh6:
adrp x22, _last_loc@GOTPAGE
Lloh7:
ldr x22, [x22, _last_loc@GOTPAGEOFF]
ldr x1, [x22]
bl _strcmp
cbz x0, LBB0_5
; %bb.4:
str x21, [sp]
Lloh8:
adrp x0, l_.str.2@PAGE
Lloh9:
add x0, x0, l_.str.2@PAGEOFF
bl _emit
ldr x8, [x19]
ldr w1, [x8, #8]
mov x0, x20
bl _maybe_print_source_line
LBB0_5:
str x21, [x22]
LBB0_6:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
ldp x20, x19, [sp, #32] ; 16-byte Folded Reload
ldp x22, x21, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #64
ret
.loh AdrpLdrGot Lloh0, Lloh1
.loh AdrpAdd Lloh2, Lloh3
.loh AdrpLdrGot Lloh6, Lloh7
.loh AdrpAdd Lloh4, Lloh5
.loh AdrpAdd Lloh8, Lloh9
.cfi_endproc
; -- End function
.comm _source_files,4,2 ; @source_files
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz ".file %ld \"%s\""
l_.str.1: ; @.str.1
.asciz ".loc %ld %d 0"
.comm _last_loc,8,3 ; @last_loc
l_.str.2: ; @.str.2
.asciz "%s"
.no_dead_strip _maybe_print_source_loc
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_maybe_print_source_loc.c
|
anghabench
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 4, 0x90 ## -- Begin function pop
_pop: ## @pop
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, %rsi
leaq L_.str(%rip), %rdi
callq _emit
movq _stackpos@GOTPCREL(%rip), %rax
movq (%rax), %rcx
leaq -8(%rcx), %rdx
movq %rdx, (%rax)
xorl %edi, %edi
cmpq $8, %rcx
setge %dil
popq %rbp
jmp _assert ## TAILCALL
.cfi_endproc
## -- End function
.comm _SAVE,4,2 ## @SAVE
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "pop #%s"
.comm _stackpos,8,3 ## @stackpos
.no_dead_strip _pop
.subsections_via_symbols
|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.p2align 2 ; -- Begin function pop
_pop: ; @pop
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
mov x1, x0
Lloh0:
adrp x0, l_.str@PAGE
Lloh1:
add x0, x0, l_.str@PAGEOFF
bl _emit
Lloh2:
adrp x8, _stackpos@GOTPAGE
Lloh3:
ldr x8, [x8, _stackpos@GOTPAGEOFF]
ldr x9, [x8]
sub x10, x9, #8
str x10, [x8]
cmp x9, #7
cset w0, gt
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
b _assert
.loh AdrpLdrGot Lloh2, Lloh3
.loh AdrpAdd Lloh0, Lloh1
.cfi_endproc
; -- End function
.comm _SAVE,4,2 ; @SAVE
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "pop #%s"
.comm _stackpos,8,3 ; @stackpos
.no_dead_strip _pop
.subsections_via_symbols
|
AnghaBench/8cc/extr_gen.c_pop.c
|
anghabench
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.