Skip to content

Instantly share code, notes, and snippets.

@yurydelendik
Created July 30, 2020 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurydelendik/1dc5f78bb5edc67041100d7b3b837835 to your computer and use it in GitHub Desktop.
Save yurydelendik/1dc5f78bb5edc67041100d7b3b837835 to your computer and use it in GitHub Desktop.
fib.wat with cranelift
.debug_frame contents:
00000000 00000014 ffffffff CIE
Version: 1
Augmentation: ""
Code alignment factor: 1
Data alignment factor: -8
Return address column: 16
DW_CFA_def_cfa: reg7 +8
DW_CFA_offset: reg16 -8
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
00000018 00000034 00000000 FDE cie=00000000 pc=00000000...000000cf
DW_CFA_advance_loc: 19
DW_CFA_def_cfa_offset: +16
DW_CFA_offset: reg6 -16
DW_CFA_advance_loc: 3
DW_CFA_def_cfa_register: reg6
DW_CFA_advance_loc: 2
DW_CFA_offset: reg12 -24
DW_CFA_advance_loc: 2
DW_CFA_offset: reg13 -32
DW_CFA_advance_loc: 2
DW_CFA_offset: reg14 -40
DW_CFA_advance_loc: 2
DW_CFA_offset: reg15 -48
DW_CFA_advance_loc1: 176
DW_CFA_def_cfa: reg7 +8
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
DW_CFA_nop:
fib0.o: file format mach-o-x86-64
Disassembly of section __TEXT..text:
0000000000000000 <__wasm_function_0>:
0: 48 8b 07 mov (%rdi),%rax
3: 48 8b 00 mov (%rax),%rax
6: 48 83 c0 20 add $0x20,%rax
a: 48 39 e0 cmp %rsp,%rax
d: 72 02 jb 11 <__wasm_function_0+0x11>
f: 0f 0b ud2
11: 40 55 rex push %rbp
13: 48 89 e5 mov %rsp,%rbp
16: 41 54 push %r12
18: 41 55 push %r13
1a: 41 56 push %r14
1c: 41 57 push %r15
1e: 48 83 ec 20 sub $0x20,%rsp
22: 48 89 bc 24 10 00 00 mov %rdi,0x10(%rsp)
29: 00
2a: 40 89 94 24 1c 00 00 rex mov %edx,0x1c(%rsp)
31: 00
32: 40 b8 01 00 00 00 rex mov $0x1,%eax
38: 40 89 84 24 18 00 00 rex mov %eax,0x18(%rsp)
3f: 00
40: 41 89 d7 mov %edx,%r15d
43: 41 83 ff 02 cmp $0x2,%r15d
47: 40 72 6b rex jb b5 <__wasm_function_0+0xb5>
4a: 48 b8 00 00 00 00 00 movabs $0x0,%rax
51: 00 00 00
54: 48 89 84 24 08 00 00 mov %rax,0x8(%rsp)
5b: 00
5c: 44 8b bc 24 1c 00 00 mov 0x1c(%rsp),%r15d
63: 00
64: 41 83 c7 ff add $0xffffffff,%r15d
68: 4c 8b b4 24 10 00 00 mov 0x10(%rsp),%r14
6f: 00
70: 4c 8b ac 24 08 00 00 mov 0x8(%rsp),%r13
77: 00
78: 4d 89 f4 mov %r14,%r12
7b: 4c 89 e7 mov %r12,%rdi
7e: 4c 89 f6 mov %r14,%rsi
81: 44 89 fa mov %r15d,%edx
84: 41 ff d5 callq *%r13
87: 44 8b bc 24 18 00 00 mov 0x18(%rsp),%r15d
8e: 00
8f: 44 01 f8 add %r15d,%eax
92: 40 89 84 24 18 00 00 rex mov %eax,0x18(%rsp)
99: 00
9a: 44 8b bc 24 1c 00 00 mov 0x1c(%rsp),%r15d
a1: 00
a2: 41 83 c7 fe add $0xfffffffe,%r15d
a6: 44 89 bc 24 1c 00 00 mov %r15d,0x1c(%rsp)
ad: 00
ae: 41 83 ff 01 cmp $0x1,%r15d
b2: 40 77 a7 rex ja 5c <__wasm_function_0+0x5c>
b5: 44 8b bc 24 18 00 00 mov 0x18(%rsp),%r15d
bc: 00
bd: 44 89 f8 mov %r15d,%eax
c0: 48 83 c4 20 add $0x20,%rsp
c4: 41 5f pop %r15
c6: 41 5e pop %r14
c8: 41 5d pop %r13
ca: 41 5c pop %r12
cc: 40 5d rex pop %rbp
ce: c3 retq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment