Created
May 22, 2019 17:31
-
-
Save boj/36bd951b61332ad9cbeb39acf7baee2f to your computer and use it in GitHub Desktop.
ghc -ddump-asm Main.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==================== Asm code ==================== | |
.section .rodata.str,"aMS",@progbits,1 | |
.align 1 | |
.align 1 | |
$trModule1_r1Lj_bytes: | |
.asciz "main" | |
==================== Asm code ==================== | |
.section .data | |
.align 8 | |
.align 1 | |
$trModule2_r1LJ_closure: | |
.quad GHC.Types.TrNameS_con_info | |
.quad $trModule1_r1Lj_bytes | |
==================== Asm code ==================== | |
.section .rodata.str,"aMS",@progbits,1 | |
.align 1 | |
.align 1 | |
$trModule3_r1LK_bytes: | |
.asciz "Main" | |
==================== Asm code ==================== | |
.section .data | |
.align 8 | |
.align 1 | |
$trModule4_r1LL_closure: | |
.quad GHC.Types.TrNameS_con_info | |
.quad $trModule3_r1LK_bytes | |
==================== Asm code ==================== | |
.section .data | |
.align 8 | |
.align 1 | |
.globl Main.$trModule_closure | |
.type Main.$trModule_closure, @object | |
Main.$trModule_closure: | |
.quad GHC.Types.Module_con_info | |
.quad $trModule2_r1LJ_closure+1 | |
.quad $trModule4_r1LL_closure+1 | |
.quad 3 | |
==================== Asm code ==================== | |
.section .data | |
.align 8 | |
.align 1 | |
sat_s1M0_closure: | |
.quad sat_s1M0_info | |
.quad 0 | |
.quad 0 | |
.quad 0 | |
==================== Asm code ==================== | |
.section .text | |
.align 8 | |
.align 8 | |
.long S1Mj_srt-(sat_s1M0_info)+0 | |
.long 0 | |
.quad 0 | |
.quad 4294967317 | |
sat_s1M0_info: | |
_c1Me: | |
leaq -40(%rbp),%rax | |
cmpq %r15,%rax | |
jb _c1Mf | |
_c1Mg: | |
addq $32,%r12 | |
cmpq 856(%r13),%r12 | |
ja _c1Mi | |
_c1Mh: | |
subq $8,%rsp | |
movq %r13,%rax | |
movq %rbx,%rsi | |
movq %rax,%rdi | |
xorl %eax,%eax | |
call newCAF | |
addq $8,%rsp | |
testq %rax,%rax | |
je _c1Mb | |
_c1Ma: | |
movq $stg_bh_upd_frame_info,-16(%rbp) | |
movq %rax,-8(%rbp) | |
movq $GHC.Integer.Type.S#_con_info,-24(%r12) | |
movq $3,-16(%r12) | |
leaq -23(%r12),%rax | |
movq $GHC.Integer.Type.S#_con_info,-8(%r12) | |
movq $2,(%r12) | |
leaq -7(%r12),%rbx | |
movl $GHC.Num.$fNumInteger_closure,%r14d | |
movq $stg_ap_pp_info,-40(%rbp) | |
movq %rbx,-32(%rbp) | |
movq %rax,-24(%rbp) | |
addq $-40,%rbp | |
jmp GHC.Num.+_info | |
_c1Mb: | |
jmp *(%rbx) | |
_c1Mi: | |
movq $32,904(%r13) | |
_c1Mf: | |
jmp *-16(%r13) | |
.size sat_s1M0_info, .-sat_s1M0_info | |
==================== Asm code ==================== | |
.section .data | |
.align 8 | |
.align 1 | |
.globl Main.main_closure | |
.type Main.main_closure, @object | |
Main.main_closure: | |
.quad Main.main_info | |
.quad 0 | |
.quad 0 | |
.quad 0 | |
==================== Asm code ==================== | |
.section .text | |
.align 8 | |
.align 8 | |
.long S1Mj_srt-(Main.main_info)+8 | |
.long 0 | |
.quad 0 | |
.quad 30064771093 | |
.globl Main.main_info | |
.type Main.main_info, @object | |
Main.main_info: | |
_c1Mw: | |
leaq -16(%rbp),%rax | |
cmpq %r15,%rax | |
jb _c1Mx | |
_c1My: | |
subq $8,%rsp | |
movq %r13,%rax | |
movq %rbx,%rsi | |
movq %rax,%rdi | |
xorl %eax,%eax | |
call newCAF | |
addq $8,%rsp | |
testq %rax,%rax | |
je _c1Mv | |
_c1Mu: | |
movq $stg_bh_upd_frame_info,-16(%rbp) | |
movq %rax,-8(%rbp) | |
movl $sat_s1M0_closure,%esi | |
movl $GHC.Show.$fShowInteger_closure,%r14d | |
movl $System.IO.print_closure,%ebx | |
addq $-16,%rbp | |
jmp stg_ap_pp_fast | |
_c1Mv: | |
jmp *(%rbx) | |
_c1Mx: | |
jmp *-16(%r13) | |
.size Main.main_info, .-Main.main_info | |
==================== Asm code ==================== | |
.section .data | |
.align 8 | |
.align 1 | |
.globl :Main.main_closure | |
.type :Main.main_closure, @object | |
:Main.main_closure: | |
.quad :Main.main_info | |
.quad 0 | |
.quad 0 | |
.quad 0 | |
==================== Asm code ==================== | |
.section .text | |
.align 8 | |
.align 8 | |
.long S1Mj_srt-(:Main.main_info)+32 | |
.long 0 | |
.quad 0 | |
.quad 12884901909 | |
.globl :Main.main_info | |
.type :Main.main_info, @object | |
:Main.main_info: | |
_c1MK: | |
leaq -16(%rbp),%rax | |
cmpq %r15,%rax | |
jb _c1ML | |
_c1MM: | |
subq $8,%rsp | |
movq %r13,%rax | |
movq %rbx,%rsi | |
movq %rax,%rdi | |
xorl %eax,%eax | |
call newCAF | |
addq $8,%rsp | |
testq %rax,%rax | |
je _c1MJ | |
_c1MI: | |
movq $stg_bh_upd_frame_info,-16(%rbp) | |
movq %rax,-8(%rbp) | |
movl $Main.main_closure,%r14d | |
movl $GHC.TopHandler.runMainIO_closure,%ebx | |
addq $-16,%rbp | |
jmp stg_ap_p_fast | |
_c1MJ: | |
jmp *(%rbx) | |
_c1ML: | |
jmp *-16(%r13) | |
.size :Main.main_info, .-:Main.main_info | |
==================== Asm code ==================== | |
.section .data.rel.ro | |
.align 8 | |
.align 1 | |
S1Mj_srt: | |
.quad GHC.Num.$fNumInteger_closure | |
.quad System.IO.print_closure | |
.quad GHC.Show.$fShowInteger_closure | |
.quad sat_s1M0_closure | |
.quad GHC.TopHandler.runMainIO_closure | |
.quad Main.main_closure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment