Skip to content

Instantly share code, notes, and snippets.

@Tarrasch
Created February 12, 2014 22:45
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 Tarrasch/8966086 to your computer and use it in GitHub Desktop.
Save Tarrasch/8966086 to your computer and use it in GitHub Desktop.

Aw dammit they are still the same, why :(

0000000000000b00 <explicit_inline2>:
b00: 41 56 push %r14
b02: 41 55 push %r13
b04: 49 89 f5 mov %rsi,%r13
b07: 41 54 push %r12
b09: 55 push %rbp
b0a: 53 push %rbx
b0b: 8b 47 18 mov 0x18(%rdi),%eax
b0e: 85 c0 test %eax,%eax
b10: 0f 84 9a 00 00 00 je bb0 <scavenge_large_bitmap+0xbb0>
b16: 83 f8 01 cmp $0x1,%eax
b19: 74 65 je b80 <scavenge_large_bitmap+0xb80>
b1b: 4c 8b 34 c5 00 00 00 mov 0x0(,%rax,8),%r14
b22: 00
b23: 4c 89 f3 mov %r14,%rbx
b26: 41 83 e6 3f and $0x3f,%r14d
b2a: 48 c1 eb 06 shr $0x6,%rbx
b2e: 45 85 f6 test %r14d,%r14d
b31: 74 6a je b9d <scavenge_large_bitmap+0xb9d>
b33: 44 89 f5 mov %r14d,%ebp
b36: 4d 89 ec mov %r13,%r12
b39: eb 11 jmp b4c <scavenge_large_bitmap+0xb4c>
b3b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
b40: 49 83 c4 08 add $0x8,%r12
b44: 48 d1 eb shr %rbx
b47: 83 ed 01 sub $0x1,%ebp
b4a: 74 19 je b65 <scavenge_large_bitmap+0xb65>
b4c: f6 c3 01 test $0x1,%bl
b4f: 75 ef jne b40 <scavenge_large_bitmap+0xb40>
b51: 4c 89 e7 mov %r12,%rdi
b54: 48 d1 eb shr %rbx
b57: 49 83 c4 08 add $0x8,%r12
b5b: e8 00 00 00 00 callq b60 <scavenge_large_bitmap+0xb60>
b60: 83 ed 01 sub $0x1,%ebp
b63: 75 e7 jne b4c <scavenge_large_bitmap+0xb4c>
b65: 5b pop %rbx
b66: 41 83 ee 01 sub $0x1,%r14d
b6a: 4f 8d 6c f5 08 lea 0x8(%r13,%r14,8),%r13
b6f: 5d pop %rbp
b70: 41 5c pop %r12
b72: 4c 89 e8 mov %r13,%rax
b75: 41 5d pop %r13
b77: 41 5e pop %r14
b79: c3 retq
b7a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
b80: 48 63 47 08 movslq 0x8(%rdi),%rax
b84: 48 8d 74 07 30 lea 0x30(%rdi,%rax,1),%rsi
b89: 4c 89 ef mov %r13,%rdi
b8c: 48 8b 1e mov (%rsi),%rbx
b8f: 89 da mov %ebx,%edx
b91: 89 db mov %ebx,%ebx
b93: 4d 8d 6c dd 00 lea 0x0(%r13,%rbx,8),%r13
b98: e8 63 f4 ff ff callq 0 <scavenge_large_bitmap>
b9d: 5b pop %rbx
b9e: 5d pop %rbp
b9f: 41 5c pop %r12
ba1: 4c 89 e8 mov %r13,%rax
ba4: 41 5d pop %r13
ba6: 41 5e pop %r14
ba8: c3 retq
ba9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
bb0: 4c 8b 77 08 mov 0x8(%rdi),%r14
bb4: 4c 89 f3 mov %r14,%rbx
bb7: 41 83 e6 3f and $0x3f,%r14d
bbb: 48 c1 eb 06 shr $0x6,%rbx
bbf: e9 6a ff ff ff jmpq b2e <scavenge_large_bitmap+0xb2e>
bc4: 66 66 66 2e 0f 1f 84 data32 data32 nopw %cs:0x0(%rax,%rax,1)
bcb: 00 00 00 00 00
StgPtr
use_function2 (StgFunInfoTable *fun_info, StgClosure **args);
StgPtr
use_function2 (StgFunInfoTable *fun_info, StgClosure **args)
{
StgPtr p;
StgWord bitmap;
nat size;
p = (StgPtr)args;
switch (fun_info->f.fun_type) {
case ARG_GEN:
bitmap = BITMAP_BITS(fun_info->f.b.bitmap);
size = BITMAP_SIZE(fun_info->f.b.bitmap);
goto small_bitmap;
case ARG_GEN_BIG:
size = GET_FUN_LARGE_BITMAP(fun_info)->size;
scavenge_large_bitmap(p, GET_FUN_LARGE_BITMAP(fun_info), size);
p += size;
break;
default:
bitmap = BITMAP_BITS(stg_arg_bitmaps[fun_info->f.fun_type]);
size = BITMAP_SIZE(stg_arg_bitmaps[fun_info->f.fun_type]);
small_bitmap:
p = scavenge_small_bitmap(p, size, bitmap);
break;
}
return p;
}
StgPtr
explicit_inline2 (StgFunInfoTable *fun_info, StgClosure **args);
StgPtr
explicit_inline2 (StgFunInfoTable *fun_info, StgClosure **args)
{
StgPtr p;
StgWord bitmap;
nat size;
p = (StgPtr)args;
switch (fun_info->f.fun_type) {
case ARG_GEN:
bitmap = BITMAP_BITS(fun_info->f.b.bitmap);
size = BITMAP_SIZE(fun_info->f.b.bitmap);
goto small_bitmap;
case ARG_GEN_BIG:
size = GET_FUN_LARGE_BITMAP(fun_info)->size;
scavenge_large_bitmap(p, GET_FUN_LARGE_BITMAP(fun_info), size);
p += size;
break;
default:
bitmap = BITMAP_BITS(stg_arg_bitmaps[fun_info->f.fun_type]);
size = BITMAP_SIZE(stg_arg_bitmaps[fun_info->f.fun_type]);
small_bitmap:
while (size > 0) {
if ((bitmap & 1) == 0) {
evacuate((StgClosure **)p);
}
p++;
bitmap = bitmap >> 1;
size--;
}
break;
}
return p;
}
0000000000000a30 <use_function2>:
a30: 41 56 push %r14
a32: 41 55 push %r13
a34: 49 89 f5 mov %rsi,%r13
a37: 41 54 push %r12
a39: 55 push %rbp
a3a: 53 push %rbx
a3b: 8b 47 18 mov 0x18(%rdi),%eax
a3e: 85 c0 test %eax,%eax
a40: 0f 84 9a 00 00 00 je ae0 <scavenge_large_bitmap+0xae0>
a46: 83 f8 01 cmp $0x1,%eax
a49: 74 65 je ab0 <scavenge_large_bitmap+0xab0>
a4b: 4c 8b 34 c5 00 00 00 mov 0x0(,%rax,8),%r14
a52: 00
a53: 4c 89 f3 mov %r14,%rbx
a56: 41 83 e6 3f and $0x3f,%r14d
a5a: 48 c1 eb 06 shr $0x6,%rbx
a5e: 45 85 f6 test %r14d,%r14d
a61: 74 6a je acd <scavenge_large_bitmap+0xacd>
a63: 44 89 f5 mov %r14d,%ebp
a66: 4d 89 ec mov %r13,%r12
a69: eb 11 jmp a7c <scavenge_large_bitmap+0xa7c>
a6b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
a70: 49 83 c4 08 add $0x8,%r12
a74: 48 d1 eb shr %rbx
a77: 83 ed 01 sub $0x1,%ebp
a7a: 74 19 je a95 <scavenge_large_bitmap+0xa95>
a7c: f6 c3 01 test $0x1,%bl
a7f: 75 ef jne a70 <scavenge_large_bitmap+0xa70>
a81: 4c 89 e7 mov %r12,%rdi
a84: 48 d1 eb shr %rbx
a87: 49 83 c4 08 add $0x8,%r12
a8b: e8 00 00 00 00 callq a90 <scavenge_large_bitmap+0xa90>
a90: 83 ed 01 sub $0x1,%ebp
a93: 75 e7 jne a7c <scavenge_large_bitmap+0xa7c>
a95: 5b pop %rbx
a96: 41 83 ee 01 sub $0x1,%r14d
a9a: 4f 8d 6c f5 08 lea 0x8(%r13,%r14,8),%r13
a9f: 5d pop %rbp
aa0: 41 5c pop %r12
aa2: 4c 89 e8 mov %r13,%rax
aa5: 41 5d pop %r13
aa7: 41 5e pop %r14
aa9: c3 retq
aaa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
ab0: 48 63 47 08 movslq 0x8(%rdi),%rax
ab4: 48 8d 74 07 30 lea 0x30(%rdi,%rax,1),%rsi
ab9: 4c 89 ef mov %r13,%rdi
abc: 48 8b 1e mov (%rsi),%rbx
abf: 89 da mov %ebx,%edx
ac1: 89 db mov %ebx,%ebx
ac3: 4d 8d 6c dd 00 lea 0x0(%r13,%rbx,8),%r13
ac8: e8 33 f5 ff ff callq 0 <scavenge_large_bitmap>
acd: 5b pop %rbx
ace: 5d pop %rbp
acf: 41 5c pop %r12
ad1: 4c 89 e8 mov %r13,%rax
ad4: 41 5d pop %r13
ad6: 41 5e pop %r14
ad8: c3 retq
ad9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
ae0: 4c 8b 77 08 mov 0x8(%rdi),%r14
ae4: 4c 89 f3 mov %r14,%rbx
ae7: 41 83 e6 3f and $0x3f,%r14d
aeb: 48 c1 eb 06 shr $0x6,%rbx
aef: e9 6a ff ff ff jmpq a5e <scavenge_large_bitmap+0xa5e>
af4: 66 66 66 2e 0f 1f 84 data32 data32 nopw %cs:0x0(%rax,%rax,1)
afb: 00 00 00 00 00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment