Lines 19-24
Link Here
|
19 |
.file "longlong2str.s" |
19 |
.file "longlong2str.s" |
20 |
.version "1.01" |
20 |
.version "1.01" |
21 |
|
21 |
|
|
|
22 |
.section rodata |
23 |
.align 32 |
24 |
.type _dig_vec, @object |
25 |
.size _dig_vec, 37 |
26 |
_dig_vec: |
27 |
.string "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
28 |
|
22 |
.text |
29 |
.text |
23 |
.align 4 |
30 |
.align 4 |
24 |
|
31 |
|
Lines 31-41
longlong2str:
Link Here
|
31 |
pushl %esi |
38 |
pushl %esi |
32 |
pushl %edi |
39 |
pushl %edi |
33 |
pushl %ebx |
40 |
pushl %ebx |
|
|
41 |
|
42 |
call __i686.get_pc_thunk.bx |
43 |
addl $_GLOBAL_OFFSET_TABLE_,%ebx |
44 |
|
34 |
movl 100(%esp),%esi # Lower part of val |
45 |
movl 100(%esp),%esi # Lower part of val |
35 |
movl 104(%esp),%ebp # Higher part of val |
46 |
movl 104(%esp),%ebp # Higher part of val |
36 |
movl 108(%esp),%edi # get dst |
47 |
movl 108(%esp),%edi # get dst |
37 |
movl 112(%esp),%ebx # Radix |
48 |
movl 112(%esp),%eax # Radix |
38 |
movl %ebx,%eax |
|
|
39 |
testl %eax,%eax |
49 |
testl %eax,%eax |
40 |
jge .L144 |
50 |
jge .L144 |
41 |
|
51 |
|
Lines 50-56
longlong2str:
Link Here
|
50 |
adcl $0,%ebp |
60 |
adcl $0,%ebp |
51 |
negl %ebp |
61 |
negl %ebp |
52 |
.L146: |
62 |
.L146: |
53 |
negl %ebx # Change radix to positive |
63 |
negl 112(%esp) # Change radix to positive |
54 |
jmp .L148 |
64 |
jmp .L148 |
55 |
.align 4 |
65 |
.align 4 |
56 |
.L144: |
66 |
.L144: |
Lines 77-88
longlong2str:
Link Here
|
77 |
|
87 |
|
78 |
movl %ebp,%eax # High part of value |
88 |
movl %ebp,%eax # High part of value |
79 |
xorl %edx,%edx |
89 |
xorl %edx,%edx |
80 |
divl %ebx |
90 |
divl 112(%esp) |
81 |
movl %eax,%ebp |
91 |
movl %eax,%ebp |
82 |
movl %esi,%eax |
92 |
movl %esi,%eax |
83 |
divl %ebx |
93 |
divl 112(%esp) |
84 |
movl %eax,%esi # quotent in ebp:esi |
94 |
movl %eax,%esi # quotent in ebp:esi |
85 |
movb _dig_vec(%edx),%al # al is faster than dl |
95 |
movb _dig_vec@GOTOFF(%ebx,%edx),%al # al is faster than dl |
86 |
decl %ecx |
96 |
decl %ecx |
87 |
movb %al,(%ecx) # store value in buff |
97 |
movb %al,(%ecx) # store value in buff |
88 |
.align 4 |
98 |
.align 4 |
Lines 93-106
longlong2str:
Link Here
|
93 |
jl .L153 |
103 |
jl .L153 |
94 |
je .L160 # Ready |
104 |
je .L160 # Ready |
95 |
movl %esi,%eax |
105 |
movl %esi,%eax |
96 |
movl $_dig_vec,%ebp |
|
|
97 |
.align 4 |
106 |
.align 4 |
98 |
|
107 |
|
99 |
.L154: # Do rest with integer precision |
108 |
.L154: # Do rest with integer precision |
100 |
cltd |
109 |
cltd |
101 |
divl %ebx |
110 |
divl 112(%esp) |
102 |
decl %ecx |
111 |
decl %ecx |
103 |
movb (%edx,%ebp),%dl # bh is always zero as ebx=radix < 36 |
112 |
movb _dig_vec@GOTOFF(%ebx,%edx),%dl |
104 |
testl %eax,%eax |
113 |
testl %eax,%eax |
105 |
movb %dl,(%ecx) |
114 |
movb %dl,(%ecx) |
106 |
jne .L154 |
115 |
jne .L154 |
Lines 138-140
longlong10_to_str:
Link Here
|
138 |
|
147 |
|
139 |
.L10end: |
148 |
.L10end: |
140 |
.size longlong10_to_str,.L10end-longlong10_to_str |
149 |
.size longlong10_to_str,.L10end-longlong10_to_str |
|
|
150 |
|
151 |
.section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits |
152 |
.globl __i686.get_pc_thunk.bx |
153 |
.hidden __i686.get_pc_thunk.bx |
154 |
.type __i686.get_pc_thunk.bx, @function |
155 |
__i686.get_pc_thunk.bx: |
156 |
movl (%esp), %ebx |
157 |
ret |
158 |
|
159 |
.section .note.GNU-stack,"",@progbits |