Last active
October 20, 2017 08:07
-
-
Save ryukinix/adb5c524627ad582ba4f574c426b4cce to your computer and use it in GitHub Desktop.
Haskell hello world assembly generated with -S option
This file contains 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
main = print "Be cancer" |
This file contains 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
.section .data | |
.align 8 | |
.align 1 | |
.globl __stginit_Main | |
.type __stginit_Main, @object | |
__stginit_Main: | |
.section .data | |
.align 8 | |
.align 1 | |
s1ky_closure: | |
.quad s1ky_info | |
.quad 0 | |
.quad 0 | |
.quad 0 | |
.section .rodata.str,"aMS",@progbits,1 | |
.align 1 | |
.align 1 | |
c1kF_str: | |
.asciz "Be cancer" | |
.section .text | |
.align 8 | |
.align 8 | |
.long S1kJ_srt-(s1ky_info)+0 | |
.long 0 | |
.quad 0 | |
.quad 4294967317 | |
s1ky_info: | |
.Lc1kG: | |
leaq -16(%rbp),%rax | |
cmpq %r15,%rax | |
jb .Lc1kH | |
.Lc1kI: | |
subq $8,%rsp | |
movq %r13,%rax | |
movq %rbx,%rsi | |
movq %rax,%rdi | |
xorl %eax,%eax | |
call newCAF | |
addq $8,%rsp | |
testq %rax,%rax | |
je .Lc1kE | |
.Lc1kD: | |
movq $stg_bh_upd_frame_info,-16(%rbp) | |
movq %rax,-8(%rbp) | |
movl $c1kF_str,%r14d | |
movl $ghczmprim_GHCziCString_unpackCStringzh_closure,%ebx | |
addq $-16,%rbp | |
jmp stg_ap_n_fast | |
.Lc1kE: | |
jmp *(%rbx) | |
.Lc1kH: | |
jmp *-16(%r13) | |
.size s1ky_info, .-s1ky_info | |
.section .data | |
.align 8 | |
.align 1 | |
s1kx_closure: | |
.quad s1kx_info | |
.quad 0 | |
.quad 0 | |
.quad 0 | |
.section .text | |
.align 8 | |
.align 8 | |
.long S1kJ_srt-(s1kx_info)+8 | |
.long 0 | |
.quad 0 | |
.quad 12884901909 | |
s1kx_info: | |
.Lc1kW: | |
leaq -16(%rbp),%rax | |
cmpq %r15,%rax | |
jb .Lc1kX | |
.Lc1kY: | |
subq $8,%rsp | |
movq %r13,%rax | |
movq %rbx,%rsi | |
movq %rax,%rdi | |
xorl %eax,%eax | |
call newCAF | |
addq $8,%rsp | |
testq %rax,%rax | |
je .Lc1kV | |
.Lc1kU: | |
movq $stg_bh_upd_frame_info,-16(%rbp) | |
movq %rax,-8(%rbp) | |
movl $base_GHCziShow_zdfShowChar_closure,%r14d | |
movl $base_GHCziShow_zdfShowZMZN_closure,%ebx | |
addq $-16,%rbp | |
jmp stg_ap_p_fast | |
.Lc1kV: | |
jmp *(%rbx) | |
.Lc1kX: | |
jmp *-16(%r13) | |
.size s1kx_info, .-s1kx_info | |
.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 | |
.section .text | |
.align 8 | |
.align 8 | |
.long S1kJ_srt-(Main_main_info)+24 | |
.long 0 | |
.quad 0 | |
.quad 30064771093 | |
.globl Main_main_info | |
.type Main_main_info, @object | |
Main_main_info: | |
.Lc1la: | |
leaq -16(%rbp),%rax | |
cmpq %r15,%rax | |
jb .Lc1lb | |
.Lc1lc: | |
subq $8,%rsp | |
movq %r13,%rax | |
movq %rbx,%rsi | |
movq %rax,%rdi | |
xorl %eax,%eax | |
call newCAF | |
addq $8,%rsp | |
testq %rax,%rax | |
je .Lc1l9 | |
.Lc1l8: | |
movq $stg_bh_upd_frame_info,-16(%rbp) | |
movq %rax,-8(%rbp) | |
movl $s1ky_closure,%esi | |
movl $s1kx_closure,%r14d | |
movl $base_SystemziIO_print_closure,%ebx | |
addq $-16,%rbp | |
jmp stg_ap_pp_fast | |
.Lc1l9: | |
jmp *(%rbx) | |
.Lc1lb: | |
jmp *-16(%r13) | |
.size Main_main_info, .-Main_main_info | |
.section .data | |
.align 8 | |
.align 1 | |
.globl ZCMain_main_closure | |
.type ZCMain_main_closure, @object | |
ZCMain_main_closure: | |
.quad ZCMain_main_info | |
.quad 0 | |
.quad 0 | |
.quad 0 | |
.section .text | |
.align 8 | |
.align 8 | |
.long S1kJ_srt-(ZCMain_main_info)+48 | |
.long 0 | |
.quad 0 | |
.quad 12884901909 | |
.globl ZCMain_main_info | |
.type ZCMain_main_info, @object | |
ZCMain_main_info: | |
.Lc1lo: | |
leaq -16(%rbp),%rax | |
cmpq %r15,%rax | |
jb .Lc1lp | |
.Lc1lq: | |
subq $8,%rsp | |
movq %r13,%rax | |
movq %rbx,%rsi | |
movq %rax,%rdi | |
xorl %eax,%eax | |
call newCAF | |
addq $8,%rsp | |
testq %rax,%rax | |
je .Lc1ln | |
.Lc1lm: | |
movq $stg_bh_upd_frame_info,-16(%rbp) | |
movq %rax,-8(%rbp) | |
movl $Main_main_closure,%r14d | |
movl $base_GHCziTopHandler_runMainIO_closure,%ebx | |
addq $-16,%rbp | |
jmp stg_ap_p_fast | |
.Lc1ln: | |
jmp *(%rbx) | |
.Lc1lp: | |
jmp *-16(%r13) | |
.size ZCMain_main_info, .-ZCMain_main_info | |
.section .rodata.str,"aMS",@progbits,1 | |
.align 1 | |
.align 1 | |
r1ab_bytes: | |
.asciz "main" | |
.section .data | |
.align 8 | |
.align 1 | |
r1at_closure: | |
.quad ghczmprim_GHCziTypes_TrNameS_con_info | |
.quad r1ab_bytes | |
.section .rodata.str,"aMS",@progbits,1 | |
.align 1 | |
.align 1 | |
r1au_bytes: | |
.asciz "Main" | |
.section .data | |
.align 8 | |
.align 1 | |
r1av_closure: | |
.quad ghczmprim_GHCziTypes_TrNameS_con_info | |
.quad r1au_bytes | |
.section .data | |
.align 8 | |
.align 1 | |
.globl Main_zdtrModule_closure | |
.type Main_zdtrModule_closure, @object | |
Main_zdtrModule_closure: | |
.quad ghczmprim_GHCziTypes_Module_con_info | |
.quad r1at_closure+1 | |
.quad r1av_closure+1 | |
.quad 3 | |
.section .data.rel.ro | |
.align 8 | |
.align 1 | |
S1kJ_srt: | |
.quad ghczmprim_GHCziCString_unpackCStringzh_closure | |
.quad base_GHCziShow_zdfShowZMZN_closure | |
.quad base_GHCziShow_zdfShowChar_closure | |
.quad base_SystemziIO_print_closure | |
.quad s1kx_closure | |
.quad s1ky_closure | |
.quad base_GHCziTopHandler_runMainIO_closure | |
.quad Main_main_closure | |
.section .note.GNU-stack,"",@progbits | |
.ident "GHC 8.2.1" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment