000000000040067c
<_ZL7set_bitjPVm>: //set_bit
40067c:
55
push %rbp
40067d:
48 89 e5
mov
%rsp,%rbp
400680:
89 7d fc
mov %
edi,-0x4(%rbp)
400683:
48 89 75 f0
mov
%rsi,-0x10(%rbp)
400687:
48 8b 45 f0
mov
-0x10(%rbp),%rax
40068b:
8b 55 fc
mov
-0x4(%rbp),% edx
40068e:
0f ab 10
bts %
edx,(%rax)
400691:
c9
leaveq
400692:
c3
retq
0000000000400693
<_ZL8test_bitiPVKm>://test_bit
400693:
55
push %rbp
400694:
48 89 e5
mov
%rsp,%rbp
400697:
89 7d ec
mov %
edi,-0x14(%rbp)
40069a:
48 89 75 e0
mov
%rsi,-0x20(%rbp)
40069e:
48 8b 45 e0
mov
-0x20(%rbp),%rax
4006a2:
8b 55 ec
mov
-0x14(%rbp),% edx
4006a5:
0f a3 10
bt %
edx,(%rax)
4006a8:
19 c0
sbb
% eax,% eax
4006aa:
89 45 fc
mov %
eax,-0x4(%rbp)
4006ad:
83 7d fc 00
cmpl
$0x0,-0x4(%rbp)
4006b1:
0f 95 c0
setne %al
4006b4:
c9
leaveq
4006b5:
c3
retq
00000000004006b6
<_ZL8_set_bitiPm>://_set_bit
4006b6:
55
push %rbp
4006b7:
48 89 e5
mov
%rsp,%rbp
4006ba:
53
push %rbx
4006bb:
89 7d f4
mov %
edi,-0xc(%rbp)
4006be:
48 89 75 e8
mov
%rsi,-0x18(%rbp)
4006c2:
48 8b 45 e8
mov
-0x18(%rbp),%rax
4006c6:
48 8b 10
mov
(%rax),%rdx
4006c9:
8b 45 f4
mov
-0xc(%rbp),% eax
4006cc:
bb 01 00 00 00
mov
$0x1,% ebx
4006d1:
48 89 de
mov
%rbx,%rsi
4006d4:
89 c1
mov
% eax,% ecx
4006d6:
48 d3 e6
shl
%cl,%rsi
4006d9:
48 89 f0
mov
%rsi,%rax
4006dc:
48 09 c2
or
%rax,%rdx
4006df:
48 8b 45 e8
mov
-0x18(%rbp),%rax
4006e3:
48 89 10
mov
%rdx,(%rax)
4006e6:
5b
pop
%rbx
4006e7:
c9
leaveq
4006e8:
c3
retq
00000000004006e9
<_ZL9_test_bitiPm>://_test_bit
4006e9:
55
push %rbp
4006ea:
48 89 e5
mov
%rsp,%rbp
4006ed:
53
push %rbx
4006ee:
89 7d f4
mov %
edi,-0xc(%rbp)
4006f1:
48 89 75 e8
mov
%rsi,-0x18(%rbp)
4006f5:
48 8b 45 e8
mov
-0x18(%rbp),%rax
4006f9:
48 8b 10
mov
(%rax),%rdx
4006fc:
8b 45 f4
mov
-0xc(%rbp),% eax
4006ff:
48 89 d3
mov
%rdx,%rbx
400702:
89 c1
mov
% eax,% ecx
400704:
48 d3 eb
shr
%cl,%rbx
400707:
48 89 d8
mov
%rbx,%rax
40070a:
83 e0 01
and $0x1,%
eax
40070d:
5b
pop
%rbx
40070e:
c9
leaveq
40070f:
c3
retq
用-O2编译,反编译,全部内联进main函数了。
T2
0000000000400680 <main>:
400680:
48 8d 4c 24 f8
lea
-0x8(%rsp),%rcx
400685:
48 c7 44 24 f8 00 00
movq
$0x0,-0x8(%rsp)
40068c:
00 00
40068e:
31 c0
xor
�x,�x
400690:
89 c2
mov
�x,�x
400692:
83 e2 3f
and
$0x3f,�x
400695:
0f ab 11
bts
�x,(%rcx)
400698:
83 c0 01
add
$0x1,�x
40069b:
3d 40 42 0f 00
cmp
$0xf4240,�x
4006a0:
75 ee
jne
400690
<main+0x10>
4006a2:
31 c0
xor
�x,�x
4006a4:
c3
retq
4006a5:
66 66 2e 0f 1f 84 00
nopw
%cs:0x0(%rax,%rax,1)
4006ac:
00 00 00 00
T4
0000000000400680 <main>:
400680:
48 8d 4c 24 f8
lea
-0x8(%rsp),%rcx
400685:
48 c7 44 24 f8 00 00
movq
$0x0,-0x8(%rsp)
40068c:
00 00
40068e:
31 c0
xor
�x,�x
400690:
89 c2
mov
�x,�x
400692:
83 e2 3f
and
$0x3f,�x
400695:
0f a3 11
bt
�x,(%rcx)
400698:
19 d2
sbb
�x,�x
40069a:
83 c0 01
add
$0x1,�x
40069d:
3d 40 42 0f 00
cmp
$0xf4240,�x
4006a2:
75 ec
jne
400690
<main+0x10>
4006a4:
31 c0
xor
�x,�x
4006a6:
c3
retq
4006a7:
66 0f 1f 84 00 00 00
nopw
0x0(%rax,%rax,1)
4006ae:
00 00