2 obj
/kernel: file format elf32
-i386
5 Disassembly of
section .
text:
8 .long MULTIBOOT_HEADER_FLAGS
13 movw
$0x1234
,0x472 # warm boot
14 f0100000: 02 b0 ad
1b 03 00 add 0x31bad(%eax),%dh
15 f0100006: 00 00 add %al,(%eax)
18 f010000a: 52 push %edx
19 f010000b: e4
66 in $0x66
,%al
22 f010000c: 66 c7
05 72 04 00 00 movw
$0x1234
,0x472
25 # Establish our own GDT
in place of the boot loader
's temporary GDT.
26 lgdt RELOC(mygdtdesc) # load descriptor table
27 f0100015: 0f 01 15 18 10 11 00 lgdtl 0x111018
29 # Immediately reload all segment registers (including CS!)
30 # with segment selectors from the new GDT.
31 movl $DATA_SEL, %eax # Data segment selector
32 f010001c: b8 10 00 00 00 mov $0x10,%eax
33 movw %ax,%ds # -> DS: Data Segment
34 f0100021: 8e d8 mov %eax,%ds
35 movw %ax,%es # -> ES: Extra Segment
36 f0100023: 8e c0 mov %eax,%es
37 movw %ax,%ss # -> SS: Stack Segment
38 f0100025: 8e d0 mov %eax,%ss
39 ljmp $CODE_SEL,$relocated # reload CS by jumping
40 f0100027: ea 2e 00 10 f0 08 00 ljmp $0x8,$0xf010002e
45 # Clear the frame pointer register (EBP)
46 # so that once we get into debugging C code,
47 # stack backtraces will be terminated properly.
48 movl $0x0,%ebp # nuke frame pointer
49 f010002e: bd 00 00 00 00 mov $0x0,%ebp
51 # Set the stack pointer
52 movl $(bootstacktop),%esp
53 f0100033: bc 00 10 11 f0 mov $0xf0111000,%esp
57 f0100038: e8 5d 00 00 00 call f010009a <i386_init>
61 # Should never get here, but in case we do, just spin.
63 f010003d: eb fe jmp f010003d <spin>
66 f0100040 <_Z14test_backtracei>:
67 #include <kern/console.h>
69 // Test the stack backtrace function (lab 1 only)
73 f0100040: 53 push %ebx
74 f0100041: 83 ec 18 sub $0x18,%esp
75 f0100044: 8b 5c 24 20 mov 0x20(%esp),%ebx
76 cprintf("entering test_backtrace %d\n", x);
77 f0100048: 89 5c 24 04 mov %ebx,0x4(%esp)
78 f010004c: c7 04 24 c0 1b 10 f0 movl $0xf0101bc0,(%esp)
79 f0100053: e8 ee 0a 00 00 call f0100b46 <_Z7cprintfPKcz>
81 f0100058: 85 db test %ebx,%ebx
82 f010005a: 7e 0d jle f0100069 <_Z14test_backtracei+0x29>
84 f010005c: 8d 43 ff lea -0x1(%ebx),%eax
85 f010005f: 89 04 24 mov %eax,(%esp)
86 f0100062: e8 d9 ff ff ff call f0100040 <_Z14test_backtracei>
87 f0100067: eb 1c jmp f0100085 <_Z14test_backtracei+0x45>
89 mon_backtrace(0, 0, 0);
90 f0100069: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
92 f0100071: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
94 f0100079: c7 04 24 00 00 00 00 movl $0x0,(%esp)
95 f0100080: e8 1e 09 00 00 call f01009a3 <_Z13mon_backtraceiPPcP9Trapframe>
96 cprintf("leaving test_backtrace %d\n", x);
97 f0100085: 89 5c 24 04 mov %ebx,0x4(%esp)
98 f0100089: c7 04 24 dc 1b 10 f0 movl $0xf0101bdc,(%esp)
99 f0100090: e8 b1 0a 00 00 call f0100b46 <_Z7cprintfPKcz>
101 f0100095: 83 c4 18 add $0x18,%esp
102 f0100098: 5b pop %ebx
105 f010009a <i386_init>:
110 f010009a: 53 push %ebx
111 f010009b: 83 ec 18 sub $0x18,%esp
112 extern const uintptr_t sctors[], ectors[];
113 const uintptr_t *ctorva;
115 // Initialize the console.
116 // Can't
call cprintf until after we do
this!
118 f010009e: e8 f0
06 00 00 call f0100793
<_Z9cons_initv
>
120 // Then
call any
global constructors
(e.g.
, defined by C
++).
121 // This relies on linker script magic to define the
'sctors' and
122 // 'ectors' symbols
; see kern/kernel.ld.
123 // Call after cons_init
() so we can cprintf
() if necessary.
124 for
(ctorva
= ectors
; ctorva > sctors; )
125 f01000a3: b8 f4
8b 10 f0
mov $0xf0108bf4
,%eax
126 f01000a8: 3d f4
8b 10 f0
cmp $0xf0108bf4
,%eax
127 f01000ad: 76 0f
jbe f01000be
<i386_init
+0x24>
128 f01000af: 89 c3
mov %eax,%ebx
129 ((void
(*)()) *--ctorva
)();
130 f01000b1: 83 eb
04 sub $0x4
,%ebx
131 f01000b4: ff
13 call *(%ebx)
133 // Then
call any
global constructors
(e.g.
, defined by C
++).
134 // This relies on linker script magic to define the
'sctors' and
135 // 'ectors' symbols
; see kern/kernel.ld.
136 // Call after cons_init
() so we can cprintf
() if necessary.
137 for
(ctorva
= ectors
; ctorva > sctors; )
138 f01000b6: 81 fb f4
8b 10 f0
cmp $0xf0108bf4
,%ebx
139 f01000bc: 77 f3
ja f01000b1
<i386_init
+0x17>
140 ((void
(*)()) *--ctorva
)();
142 cprintf
("6828 decimal is %o octal!\n", 6828);
143 f01000be: c7
44 24 04 ac
1a
00 movl
$0x1aac
,0x4(%esp)
145 f01000c6: c7
04 24 f7
1b 10 f0 movl
$0xf0101bf7
,(%esp)
146 f01000cd: e8
74 0a
00 00 call f0100b46
<_Z7cprintfPKcz
>
151 // Test the stack backtrace function
(lab
1 only
)
153 f01000d2: c7
04 24 05 00 00 00 movl
$0x5
,(%esp)
154 f01000d9: e8
62 ff ff ff
call f0100040
<_Z14test_backtracei
>
156 // Drop
into the kernel monitor.
159 f01000de: c7
04 24 00 00 00 00 movl
$0x0
,(%esp)
160 f01000e5: e8 bf
08 00 00 call f01009a9
<_Z7monitorP9Trapframe
>
161 f01000ea: eb f2
jmp f01000de
<i386_init
+0x44>
163 f01000ec
<_Z6_panicPKciS0_z
>:
164 * Panic is called on unresolvable fatal errors.
165 * It prints
"panic: mesg", and then enters the kernel monitor.
168 _panic
(const char
*file
, int line
, const char
*fmt
, ...
)
170 f01000ec: 56 push %esi
171 f01000ed: 53 push %ebx
172 f01000ee: 83 ec 14 sub $0x14,%esp
173 f01000f1: 8b 74 24 28 mov 0x28(%esp),%esi
177 f01000f5: 83 3d 20 10 11 f0 00 cmpl $0x0,0xf0111020
178 f01000fc: 75 40 jne f010013e <_Z6_panicPKciS0_z+0x52>
181 f01000fe: 89 35 20 10 11 f0 mov %esi,0xf0111020
183 // Be extra sure that the machine is in as reasonable state
184 __asm __volatile("cli; cld");
189 f0100106: 8d 5c 24 2c lea 0x2c(%esp),%ebx
190 cprintf("kernel panic at %s:%d: ", file, line);
191 f010010a: 8b 44 24 24 mov 0x24(%esp),%eax
192 f010010e: 89 44 24 08 mov %eax,0x8(%esp)
193 f0100112: 8b 44 24 20 mov 0x20(%esp),%eax
194 f0100116: 89 44 24 04 mov %eax,0x4(%esp)
195 f010011a: c7 04 24 12 1c 10 f0 movl $0xf0101c12,(%esp)
196 f0100121: e8 20 0a 00 00 call f0100b46 <_Z7cprintfPKcz>
198 f0100126: 89 5c 24 04 mov %ebx,0x4(%esp)
199 f010012a: 89 34 24 mov %esi,(%esp)
200 f010012d: e8 dd 09 00 00 call f0100b0f <_Z8vcprintfPKcPc>
202 f0100132: c7 04 24 4e 1c 10 f0 movl $0xf0101c4e,(%esp)
203 f0100139: e8 08 0a 00 00 call f0100b46 <_Z7cprintfPKcz>
207 /* break into the kernel monitor */
210 f010013e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
211 f0100145: e8 5f 08 00 00 call f01009a9 <_Z7monitorP9Trapframe>
212 f010014a: eb f2 jmp f010013e <_Z6_panicPKciS0_z+0x52>
214 f010014c <_Z5_warnPKciS0_z>:
217 /* like panic
, but don
't */
219 _warn(const char *file, int line, const char *fmt, ...)
221 f010014c: 53 push %ebx
222 f010014d: 83 ec 18 sub $0x18,%esp
226 f0100150: 8d 5c 24 2c lea 0x2c(%esp),%ebx
227 cprintf("kernel warning at %s:%d: ", file, line);
228 f0100154: 8b 44 24 24 mov 0x24(%esp),%eax
229 f0100158: 89 44 24 08 mov %eax,0x8(%esp)
230 f010015c: 8b 44 24 20 mov 0x20(%esp),%eax
231 f0100160: 89 44 24 04 mov %eax,0x4(%esp)
232 f0100164: c7 04 24 2a 1c 10 f0 movl $0xf0101c2a,(%esp)
233 f010016b: e8 d6 09 00 00 call f0100b46 <_Z7cprintfPKcz>
235 f0100170: 89 5c 24 04 mov %ebx,0x4(%esp)
236 f0100174: 8b 44 24 28 mov 0x28(%esp),%eax
237 f0100178: 89 04 24 mov %eax,(%esp)
238 f010017b: e8 8f 09 00 00 call f0100b0f <_Z8vcprintfPKcPc>
240 f0100180: c7 04 24 4e 1c 10 f0 movl $0xf0101c4e,(%esp)
241 f0100187: e8 ba 09 00 00 call f0100b46 <_Z7cprintfPKcz>
244 f010018c: 83 c4 18 add $0x18,%esp
245 f010018f: 5b pop %ebx
249 f01001a0 <_ZL5delayv>:
251 static __inline uint8_t
255 __asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port));
256 f01001a0: ba 84 00 00 00 mov $0x84,%edx
257 f01001a5: ec in (%dx),%al
258 f01001a6: ec in (%dx),%al
259 f01001a7: ec in (%dx),%al
260 f01001a8: ec in (%dx),%al
269 f01001aa <_ZL16serial_proc_datav>:
270 f01001aa: ba fd 03 00 00 mov $0x3fd,%edx
271 f01001af: ec in (%dx),%al
274 serial_proc_data(void)
276 if (!(inb(COM1+COM_LSR) & COM_LSR_DATA))
278 f01001b0: b9 ff ff ff ff mov $0xffffffff,%ecx
279 static bool serial_exists;
282 serial_proc_data(void)
284 if (!(inb(COM1+COM_LSR) & COM_LSR_DATA))
285 f01001b5: a8 01 test $0x1,%al
286 f01001b7: 74 06 je f01001bf <_ZL16serial_proc_datav+0x15>
287 f01001b9: b2 f8 mov $0xf8,%dl
288 f01001bb: ec in (%dx),%al
290 return inb(COM1+COM_RX);
291 f01001bc: 0f b6 c8 movzbl %al,%ecx
293 f01001bf: 89 c8 mov %ecx,%eax
296 f01001c2 <_ZL9cons_intrPFivE>:
298 // called by device interrupt routines to feed input characters
299 // into the circular console input buffer.
301 cons_intr(int (*proc)(void))
303 f01001c2: 53 push %ebx
304 f01001c3: 83 ec 08 sub $0x8,%esp
305 f01001c6: 89 c3 mov %eax,%ebx
308 while ((c = (*proc)()) != -1) {
309 f01001c8: eb 28 jmp f01001f2 <_ZL9cons_intrPFivE+0x30>
311 f01001ca: 85 c0 test %eax,%eax
312 f01001cc: 74 24 je f01001f2 <_ZL9cons_intrPFivE+0x30>
314 cons.buf[cons.wpos++] = c;
315 f01001ce: 8b 15 64 12 11 f0 mov 0xf0111264,%edx
316 f01001d4: 88 82 60 10 11 f0 mov %al,-0xfeeefa0(%edx)
317 f01001da: 8d 42 01 lea 0x1(%edx),%eax
318 if (cons.wpos == CONSBUFSIZE)
319 f01001dd: 3d 00 02 00 00 cmp $0x200,%eax
321 f01001e2: 0f 94 c2 sete %dl
322 f01001e5: 0f b6 d2 movzbl %dl,%edx
323 f01001e8: 83 ea 01 sub $0x1,%edx
324 f01001eb: 21 d0 and %edx,%eax
325 f01001ed: a3 64 12 11 f0 mov %eax,0xf0111264
327 cons_intr(int (*proc)(void))
331 while ((c = (*proc)()) != -1) {
332 f01001f2: ff d3 call *%ebx
333 f01001f4: 83 f8 ff cmp $0xffffffff,%eax
334 f01001f7: 75 d1 jne f01001ca <_ZL9cons_intrPFivE+0x8>
336 cons.buf[cons.wpos++] = c;
337 if (cons.wpos == CONSBUFSIZE)
341 f01001f9: 83 c4 08 add $0x8,%esp
342 f01001fc: 5b pop %ebx
345 f01001fe <_ZL16cga_savebuf_copyib>:
347 // Copy one screen's worth of data to
or from the save buffer
,
348 // starting at line
'first_line'.
350 cga_savebuf_copy
(int first_line
, bool to_screen
)
352 f01001fe: 83 ec 2c sub $0x2c,%esp
353 f0100201: 89 5c 24 1c mov %ebx,0x1c(%esp)
354 f0100205: 89 74 24 20 mov %esi,0x20(%esp)
355 f0100209: 89 7c 24 24 mov %edi,0x24(%esp)
356 f010020d: 89 6c 24 28 mov %ebp,0x28(%esp)
357 f0100211: 89 d5 mov %edx,%ebp
362 // Calculate the beginning & end of the save buffer area.
363 pos = crtsave_buf + (first_line % CRT_SAVEROWS) * CRT_COLS;
364 f0100213: 89 c2 mov %eax,%edx
365 f0100215: c1 fa 1f sar $0x1f,%edx
366 f0100218: c1 ea 19 shr $0x19,%edx
367 f010021b: 01 d0 add %edx,%eax
368 f010021d: 83 e0 7f and $0x7f,%eax
369 f0100220: 29 d0 sub %edx,%eax
370 f0100222: 8d 34 80 lea (%eax,%eax,4),%esi
371 f0100225: c1 e6 05 shl $0x5,%esi
372 f0100228: 81 c6 80 12 11 f0 add $0xf0111280,%esi
373 end = pos + CRT_ROWS * CRT_COLS;
374 f010022e: 8d be a0 0f 00 00 lea 0xfa0(%esi),%edi
375 f0100234: 89 fb mov %edi,%ebx
376 f0100236: 81 ff 80 62 11 f0 cmp $0xf0116280,%edi
377 f010023c: 76 05 jbe f0100243 <_ZL16cga_savebuf_copyib+0x45>
378 f010023e: bb 80 62 11 f0 mov $0xf0116280,%ebx
379 // Check for wraparound.
380 trueend = MIN(end, crtsave_buf + CRT_SAVEROWS * CRT_COLS);
382 // Copy the initial portion.
384 f0100243: 89 e8 mov %ebp,%eax
385 f0100245: 84 c0 test %al,%al
386 f0100247: 74 1e je f0100267 <_ZL16cga_savebuf_copyib+0x69>
387 memmove(crt_buf, pos, (trueend - pos) * sizeof(uint16_t));
388 f0100249: 89 d8 mov %ebx,%eax
389 f010024b: 29 f0 sub %esi,%eax
390 f010024d: 83 e0 fe and $0xfffffffe,%eax
391 f0100250: 89 44 24 08 mov %eax,0x8(%esp)
392 f0100254: 89 74 24 04 mov %esi,0x4(%esp)
393 f0100258: a1 80 62 11 f0 mov 0xf0116280,%eax
394 f010025d: 89 04 24 mov %eax,(%esp)
395 f0100260: e8 87 14 00 00 call f01016ec <memmove>
396 f0100265: eb 1c jmp f0100283 <_ZL16cga_savebuf_copyib+0x85>
398 memmove(pos, crt_buf, (trueend - pos) * sizeof(uint16_t));
399 f0100267: 89 d8 mov %ebx,%eax
400 f0100269: 29 f0 sub %esi,%eax
401 f010026b: 83 e0 fe and $0xfffffffe,%eax
402 f010026e: 89 44 24 08 mov %eax,0x8(%esp)
403 f0100272: a1 80 62 11 f0 mov 0xf0116280,%eax
404 f0100277: 89 44 24 04 mov %eax,0x4(%esp)
405 f010027b: 89 34 24 mov %esi,(%esp)
406 f010027e: e8 69 14 00 00 call f01016ec <memmove>
408 // If there was wraparound, copy the second part of the screen.
410 f0100283: 39 df cmp %ebx,%edi
411 f0100285: 74 50 je f01002d7 <_ZL16cga_savebuf_copyib+0xd9>
414 f0100287: 89 e8 mov %ebp,%eax
415 f0100289: 84 c0 test %al,%al
416 f010028b: 74 26 je f01002b3 <_ZL16cga_savebuf_copyib+0xb5>
417 memmove(crt_buf + (trueend - pos), crtsave_buf, (end - trueend) * sizeof(uint16_t));
418 f010028d: 29 df sub %ebx,%edi
419 f010028f: 83 e7 fe and $0xfffffffe,%edi
420 f0100292: 89 7c 24 08 mov %edi,0x8(%esp)
421 f0100296: c7 44 24 04 80 12 11 movl $0xf0111280,0x4(%esp)
423 f010029e: 29 f3 sub %esi,%ebx
424 f01002a0: 83 e3 fe and $0xfffffffe,%ebx
425 f01002a3: 03 1d 80 62 11 f0 add 0xf0116280,%ebx
426 f01002a9: 89 1c 24 mov %ebx,(%esp)
427 f01002ac: e8 3b 14 00 00 call f01016ec <memmove>
428 f01002b1: eb 24 jmp f01002d7 <_ZL16cga_savebuf_copyib+0xd9>
430 memmove(crtsave_buf, crt_buf + (trueend - pos), (end - trueend) * sizeof(uint16_t));
431 f01002b3: 29 df sub %ebx,%edi
432 f01002b5: 83 e7 fe and $0xfffffffe,%edi
433 f01002b8: 89 7c 24 08 mov %edi,0x8(%esp)
434 f01002bc: 29 f3 sub %esi,%ebx
435 f01002be: 83 e3 fe and $0xfffffffe,%ebx
436 f01002c1: 03 1d 80 62 11 f0 add 0xf0116280,%ebx
437 f01002c7: 89 5c 24 04 mov %ebx,0x4(%esp)
438 f01002cb: c7 04 24 80 12 11 f0 movl $0xf0111280,(%esp)
439 f01002d2: e8 15 14 00 00 call f01016ec <memmove>
441 f01002d7: 8b 5c
24 1c
mov 0x1c(%esp),%ebx
442 f01002db: 8b 74 24 20 mov 0x20(%esp),%esi
443 f01002df: 8b 7c
24 24 mov 0x24(%esp),%edi
444 f01002e3: 8b 6c
24 28 mov 0x28(%esp),%ebp
445 f01002e7: 83 c4
2c
add $0x2c
,%esp
448 f01002eb
<_ZL9cons_putci
>:
451 // output a character to the console
455 f01002eb: 55 push %ebp
456 f01002ec: 57 push %edi
457 f01002ed: 56 push %esi
458 f01002ee: 53 push %ebx
459 f01002ef: 83 ec 1c sub $0x1c,%esp
460 f01002f2: 89 c5 mov %eax,%ebp
461 f01002f4: bb 01 32 00 00 mov $0x3201,%ebx
462 f01002f9: be fd 03 00 00 mov $0x3fd,%esi
463 f01002fe: 89 f2 mov %esi,%edx
464 f0100300: ec in (%dx),%al
471 f0100301: a8 20 test $0x20,%al
472 f0100303: 0f 85 2a 02 00 00 jne f0100533 <_ZL9cons_putci+0x248>
473 f0100309: 83 eb 01 sub $0x1,%ebx
474 f010030c: 0f 84 21 02 00 00 je f0100533 <_ZL9cons_putci+0x248>
475 !(inb(COM1 + COM_LSR) & COM_LSR_TXRDY) && i < 12800;
478 f0100312: e8 89 fe ff ff call f01001a0 <_ZL5delayv>
479 f0100317: eb e5 jmp f01002fe <_ZL9cons_putci+0x13>
480 f0100319: 89 fa mov %edi,%edx
481 f010031b: ec in (%dx),%al
487 for (i = 0; !(inb(0x378+1) & 0x80) && i < 12800; i++)
488 f010031c: 84 c0 test %al,%al
489 f010031e: 66 90 xchg %ax,%ax
490 f0100320: 0f 88 26 02 00 00 js f010054c <_ZL9cons_putci+0x261>
491 f0100326: 83 eb 01 sub $0x1,%ebx
492 f0100329: 0f 84 1d 02 00 00 je f010054c <_ZL9cons_putci+0x261>
494 f010032f: e8 6c fe ff ff call f01001a0 <_ZL5delayv>
495 f0100334: eb e3 jmp f0100319 <_ZL9cons_putci+0x2e>
499 // unscroll if necessary
500 if (crtsave_backscroll > 0) {
501 cga_savebuf_copy(crtsave_pos + crtsave_size, 1);
502 f0100336: 0f b7 15 70 12 11 f0 movzwl 0xf0111270,%edx
503 f010033d: 0f b7 05 6e 12 11 f0 movzwl 0xf011126e,%eax
504 f0100344: 01 d0 add %edx,%eax
505 f0100346: ba 01 00 00 00 mov $0x1,%edx
506 f010034b: e8 ae fe ff ff call f01001fe <_ZL16cga_savebuf_copyib>
507 crtsave_backscroll = 0;
508 f0100350: 66 c7 05 6c 12 11 f0 movw $0x0,0xf011126c
513 // if no attribute given
, then use black on white
515 f0100359: f7 c5
00 ff ff ff
test $0xffffff00
,%ebp
516 f010035f: 75 06 jne f0100367
<_ZL9cons_putci
+0x7c>
518 f0100361: 81 cd
00 07 00 00 or $0x700
,%ebp
521 f0100367: 89 e8 mov %ebp,%eax
522 f0100369: 25 ff 00 00 00 and $0xff,%eax
523 f010036e: 83 f8 09 cmp $0x9,%eax
524 f0100371: 74 7b je f01003ee <_ZL9cons_putci+0x103>
525 f0100373: 83 f8 09 cmp $0x9,%eax
526 f0100376: 7f 0b jg f0100383 <_ZL9cons_putci+0x98>
527 f0100378: 83 f8 08 cmp $0x8,%eax
528 f010037b: 0f 85 a1 00 00 00 jne f0100422 <_ZL9cons_putci+0x137>
529 f0100381: eb 15 jmp f0100398 <_ZL9cons_putci+0xad>
530 f0100383: 83 f8 0a cmp $0xa,%eax
531 f0100386: 74 40 je f01003c8 <_ZL9cons_putci+0xdd>
532 f0100388: 83 f8 0d cmp $0xd,%eax
534 f010038c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
535 f0100390: 0f 85 8c 00 00 00 jne f0100422 <_ZL9cons_putci+0x137>
536 f0100396: eb 38 jmp f01003d0 <_ZL9cons_putci+0xe5>
539 f0100398: 0f b7 05 88 62 11 f0 movzwl 0xf0116288,%eax
540 f010039f: 66 85 c0 test %ax,%ax
541 f01003a2: 0f 84 58 01 00 00 je f0100500 <_ZL9cons_putci+0x215>
543 f01003a8: 83 e8 01 sub $0x1,%eax
544 f01003ab: 66 a3 88 62 11 f0 mov %ax,0xf0116288
545 crt_buf[crt_pos] = (c & ~0xff) | ' ';
546 f01003b1: 0f b7 c0 movzwl %ax,%eax
547 f01003b4: 66 81 e5 00 ff and $0xff00,%bp
548 f01003b9: 83 cd 20 or $0x20,%ebp
549 f01003bc: 8b 15 80 62 11 f0 mov 0xf0116280,%edx
550 f01003c2: 66 89 2c 42 mov %bp,(%edx,%eax,2)
551 f01003c6: eb 77 jmp f010043f <_ZL9cons_putci+0x154>
556 f01003c8: 66 83 05 88 62 11 f0 addw
$0x50
,0xf0116288
560 crt_pos
-= (crt_pos
% CRT_COLS
);
561 f01003d0: 0f b7
05 88 62 11 f0 movzwl
0xf0116288,%eax
562 f01003d7: 69 c0 cd cc
00 00 imul
$0xcccd
,%eax,%eax
563 f01003dd: c1 e8
16 shr $0x16
,%eax
564 f01003e0: 8d
04 80 lea (%eax,%eax,4),%eax
565 f01003e3: c1 e0
04 shl $0x4
,%eax
566 f01003e6: 66 a3
88 62 11 f0
mov %ax,0xf0116288
567 f01003ec: eb
51 jmp f010043f
<_ZL9cons_putci
+0x154>
571 f01003ee: b8
20 00 00 00 mov $0x20
,%eax
572 f01003f3: e8 f3 fe ff ff
call f01002eb
<_ZL9cons_putci
>
574 f01003f8: b8
20 00 00 00 mov $0x20
,%eax
575 f01003fd: e8 e9 fe ff ff
call f01002eb
<_ZL9cons_putci
>
577 f0100402: b8
20 00 00 00 mov $0x20
,%eax
578 f0100407: e8 df fe ff ff
call f01002eb
<_ZL9cons_putci
>
580 f010040c: b8
20 00 00 00 mov $0x20
,%eax
581 f0100411: e8 d5 fe ff ff
call f01002eb
<_ZL9cons_putci
>
583 f0100416: b8
20 00 00 00 mov $0x20
,%eax
584 f010041b: e8 cb fe ff ff
call f01002eb
<_ZL9cons_putci
>
585 f0100420: eb
1d
jmp f010043f
<_ZL9cons_putci
+0x154>
588 crt_buf
[crt_pos
++] = c
; /* write the character */
589 f0100422: 0f b7
05 88 62 11 f0 movzwl
0xf0116288,%eax
590 f0100429: 0f b7 c8 movzwl
%ax,%ecx
591 f010042c: 8b 15 80 62 11 f0
mov 0xf0116280,%edx
592 f0100432: 66 89 2c
4a
mov %bp,(%edx,%ecx,2)
593 f0100436: 83 c0
01 add $0x1
,%eax
594 f0100439: 66 a3
88 62 11 f0
mov %ax,0xf0116288
598 // What is the purpose of
this?
599 if
(crt_pos
>= CRT_SIZE
) {
600 f010043f: 66 81 3d 88 62 11 f0 cmpw $0x7cf,0xf0116288
602 f0100448: 0f 86 b2 00 00 00 jbe f0100500 <_ZL9cons_putci+0x215>
606 // Save the scrolled-back row
607 if (crtsave_size == CRT_SAVEROWS - CRT_ROWS)
608 f010044e: 0f b7 05 6e 12 11 f0 movzwl 0xf011126e,%eax
609 f0100455: 66 83 f8 67 cmp $0x67,%ax
610 f0100459: 75 15 jne f0100470 <_ZL9cons_putci+0x185>
611 crtsave_pos = (crtsave_pos + 1) % CRT_SAVEROWS;
612 f010045b: 0f b7 05 70 12 11 f0 movzwl 0xf0111270,%eax
613 f0100462: 83 c0 01 add $0x1,%eax
614 f0100465: 83 e0 7f and $0x7f,%eax
615 f0100468: 66 a3 70 12 11 f0 mov %ax,0xf0111270
616 f010046e: eb 09 jmp f0100479 <_ZL9cons_putci+0x18e>
619 f0100470: 83 c0 01 add $0x1,%eax
620 f0100473: 66 a3 6e 12 11 f0 mov %ax,0xf011126e
621 memmove(crtsave_buf + ((crtsave_pos + crtsave_size - 1) % CRT_SAVEROWS) * CRT_COLS, crt_buf, CRT_COLS * sizeof(uint16_t));
622 f0100479: c7 44 24 08 a0 00 00 movl $0xa0,0x8(%esp)
624 f0100481: a1 80 62 11 f0 mov 0xf0116280,%eax
625 f0100486: 89 44 24 04 mov %eax,0x4(%esp)
626 f010048a: 0f b7 15 70 12 11 f0 movzwl 0xf0111270,%edx
627 f0100491: 0f b7 05 6e 12 11 f0 movzwl 0xf011126e,%eax
628 f0100498: 8d 44 02 ff lea -0x1(%edx,%eax,1),%eax
629 f010049c: 89 c2 mov %eax,%edx
630 f010049e: c1 fa 1f sar $0x1f,%edx
631 f01004a1: c1 ea 19 shr $0x19,%edx
632 f01004a4: 01 d0 add %edx,%eax
633 f01004a6: 83 e0 7f and $0x7f,%eax
634 f01004a9: 29 d0 sub %edx,%eax
635 f01004ab: 8d 04 80 lea (%eax,%eax,4),%eax
636 f01004ae: c1 e0 05 shl $0x5,%eax
637 f01004b1: 05 80 12 11 f0 add $0xf0111280,%eax
638 f01004b6: 89 04 24 mov %eax,(%esp)
639 f01004b9: e8 2e 12 00 00 call f01016ec <memmove>
642 memmove(crt_buf, crt_buf + CRT_COLS, (CRT_SIZE - CRT_COLS) * sizeof(uint16_t));
643 f01004be: a1 80 62 11 f0 mov 0xf0116280,%eax
644 f01004c3: c7 44 24 08 00 0f 00 movl $0xf00,0x8(%esp)
646 f01004cb: 8d 90 a0 00 00 00 lea 0xa0(%eax),%edx
647 f01004d1: 89 54 24 04 mov %edx,0x4(%esp)
648 f01004d5: 89 04 24 mov %eax,(%esp)
649 f01004d8: e8 0f 12 00 00 call f01016ec <memmove>
650 for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i++)
651 crt_buf[i] = 0x0700 | ' ';
652 f01004dd: 8b 15 80 62 11 f0 mov 0xf0116280,%edx
654 memmove(crtsave_buf + ((crtsave_pos + crtsave_size - 1) % CRT_SAVEROWS) * CRT_COLS, crt_buf, CRT_COLS * sizeof(uint16_t));
657 memmove(crt_buf, crt_buf + CRT_COLS, (CRT_SIZE - CRT_COLS) * sizeof(uint16_t));
658 for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i++)
659 f01004e3: b8 80 07 00 00 mov $0x780,%eax
660 crt_buf[i] = 0x0700 | ' ';
661 f01004e8: 66 c7 04 42 20 07 movw $0x720,(%edx,%eax,2)
663 memmove(crtsave_buf + ((crtsave_pos + crtsave_size - 1) % CRT_SAVEROWS) * CRT_COLS, crt_buf, CRT_COLS * sizeof(uint16_t));
666 memmove(crt_buf, crt_buf + CRT_COLS, (CRT_SIZE - CRT_COLS) * sizeof(uint16_t));
667 for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i++)
668 f01004ee: 83 c0 01 add $0x1,%eax
669 f01004f1: 3d d0 07 00 00 cmp $0x7d0,%eax
670 f01004f6: 75 f0 jne f01004e8 <_ZL9cons_putci+0x1fd>
671 crt_buf[i] = 0x0700 | ' ';
673 f01004f8: 66 83 2d 88 62 11 f0 subw $0x50,0xf0116288
677 /* move that little blinky thing
*/
679 f0100500: 8b 0d
84 62 11 f0
mov 0xf0116284,%ecx
683 outb
(int port
, uint8_t data
)
685 __asm __volatile("outb %0,%w1" : : "a" (data), "d" (port));
686 f0100506: b8 0e 00 00 00 mov $0xe,%eax
687 f010050b: 89 ca mov %ecx,%edx
688 f010050d: ee out %al,(%dx)
689 outb(addr_6845 + 1, crt_pos >> 8);
690 f010050e: 0f b7 1d 88 62 11 f0 movzwl 0xf0116288,%ebx
691 f0100515: 8d 71 01 lea 0x1(%ecx),%esi
692 f0100518: 0f b6 c7 movzbl %bh,%eax
693 f010051b: 89 f2 mov %esi,%edx
694 f010051d: ee out %al,(%dx)
695 f010051e: b8 0f 00 00 00 mov $0xf,%eax
696 f0100523: 89 ca mov %ecx,%edx
697 f0100525: ee out %al,(%dx)
698 f0100526: 89 d8 mov %ebx,%eax
699 f0100528: 89 f2 mov %esi,%edx
700 f010052a: ee out %al,(%dx)
707 f010052b: 83 c4
1c
add $0x1c
,%esp
708 f010052e: 5b pop %ebx
709 f010052f: 5e
pop %esi
710 f0100530: 5f
pop %edi
711 f0100531: 5d
pop %ebp
714 !(inb
(COM1
+ COM_LSR
) & COM_LSR_TXRDY
) && i
< 12800;
718 outb
(COM1
+ COM_TX
, c
);
719 f0100533: 89 ee
mov %ebp,%esi
720 f0100535: ba f8
03 00 00 mov $0x3f8
,%edx
721 f010053a: 89 e8
mov %ebp,%eax
722 f010053c: ee
out %al,(%dx)
723 f010053d: bb
01 32 00 00 mov $0x3201
,%ebx
725 static __inline uint8_t
729 __asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port));
730 f0100542: bf 79 03 00 00 mov $0x379,%edi
731 f0100547: e9 cd fd ff ff jmp f0100319 <_ZL9cons_putci+0x2e>
735 outb
(int port
, uint8_t data
)
737 __asm __volatile("outb %0,%w1" : : "a" (data), "d" (port));
738 f010054c: ba 78 03 00 00 mov $0x378,%edx
739 f0100551: 89 f0 mov %esi,%eax
740 f0100553: ee out %al,(%dx)
741 f0100554: b2 7a mov $0x7a,%dl
742 f0100556: b8 0d 00 00 00 mov $0xd,%eax
743 f010055b: ee out %al,(%dx)
744 f010055c: b8 08 00 00 00 mov $0x8,%eax
745 f0100561: ee out %al,(%dx)
750 // unscroll if necessary
751 if (crtsave_backscroll > 0) {
752 f0100562: 66 83 3d 6c 12 11 f0 cmpw $0x0,0xf011126c
754 f010056a: 0f 8f c6 fd ff ff jg f0100336 <_ZL9cons_putci+0x4b>
755 f0100570: e9 e4 fd ff ff jmp f0100359 <_ZL9cons_putci+0x6e>
757 f0100575 <_ZL13kbd_proc_datav>:
758 * Get data from the keyboard. If we finish a character, return it. Else 0.
759 * Return -1 if no data.
764 f0100575: 83 ec 1c sub $0x1c,%esp
765 f0100578: 89 5c 24 10 mov %ebx,0x10(%esp)
766 f010057c: 89 74 24 14 mov %esi,0x14(%esp)
767 f0100580: 89 7c 24 18 mov %edi,0x18(%esp)
769 static __inline uint8_t
773 __asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port));
774 f0100584: ba 64 00 00 00 mov $0x64,%edx
775 f0100589: ec in (%dx),%al
778 static uint32_t shift;
780 if ((inb(KBSTATP) & KBS_DIB) == 0)
782 f010058a: bb ff ff ff ff mov $0xffffffff,%ebx
786 static uint32_t shift;
788 if ((inb(KBSTATP) & KBS_DIB) == 0)
789 f010058f: a8 01 test $0x1,%al
790 f0100591: 0f 84 7a 01 00 00 je f0100711 <_ZL13kbd_proc_datav+0x19c>
791 f0100597: b2 60 mov $0x60,%dl
792 f0100599: ec in (%dx),%al
793 f010059a: 89 c2 mov %eax,%edx
799 f010059c: 3c e0 cmp $0xe0,%al
800 f010059e: 75 11 jne f01005b1 <_ZL13kbd_proc_datav+0x3c>
801 // E0 escape character
803 f01005a0: 83 0d 68 12 11 f0 40 orl $0x40,0xf0111268
805 f01005a7: bb 00 00 00 00 mov $0x0,%ebx
806 f01005ac: e9 60 01 00 00 jmp f0100711 <_ZL13kbd_proc_datav+0x19c>
807 } else if
(data
& 0x80) {
808 f01005b1: 84 c0 test %al,%al
809 f01005b3: 79 34 jns f01005e9 <_ZL13kbd_proc_datav+0x74>
811 data = (shift & E0ESC ? data : data & 0x7F);
812 f01005b5: 8b 0d 68 12 11 f0 mov 0xf0111268,%ecx
813 f01005bb: f6 c1 40 test $0x40,%cl
814 f01005be: 75 05 jne f01005c5 <_ZL13kbd_proc_datav+0x50>
815 f01005c0: 89 c2 mov %eax,%edx
816 f01005c2: 83 e2 7f and $0x7f,%edx
817 shift &= ~(shiftcode[data] | E0ESC);
818 f01005c5: 0f b6 d2 movzbl %dl,%edx
819 f01005c8: 0f b6 82 80 1c 10 f0 movzbl -0xfefe380(%edx),%eax
820 f01005cf: 83 c8 40 or $0x40,%eax
821 f01005d2: 0f b6 c0 movzbl %al,%eax
822 f01005d5: f7 d0 not %eax
823 f01005d7: 21 c1 and %eax,%ecx
824 f01005d9: 89 0d 68 12 11 f0 mov %ecx,0xf0111268
826 f01005df: bb 00 00 00 00 mov $0x0,%ebx
827 f01005e4: e9 28 01 00 00 jmp f0100711 <_ZL13kbd_proc_datav+0x19c>
828 } else if
(shift
& E0ESC
) {
829 f01005e9: 8b 0d 68 12 11 f0 mov 0xf0111268,%ecx
830 f01005ef: f6 c1 40 test $0x40,%cl
831 f01005f2: 74 0e je f0100602 <_ZL13kbd_proc_datav+0x8d>
832 // Last character was an E0 escape; or with 0x80
834 f01005f4: 89 c2 mov %eax,%edx
835 f01005f6: 83 ca 80 or $0xffffff80,%edx
837 f01005f9: 83 e1 bf and $0xffffffbf,%ecx
838 f01005fc: 89 0d 68 12 11 f0 mov %ecx,0xf0111268
841 shift |
= shiftcode
[data
];
842 f0100602: 0f b6 d2 movzbl
%dl,%edx
843 f0100605: 0f b6
82 80 1c
10 f0 movzbl
-0xfefe380(%edx),%eax
844 f010060c: 0b 05 68 12 11 f0
or 0xf0111268,%eax
845 shift ^
= togglecode
[data
];
846 f0100612: 0f b6
8a
80 1d
10 f0 movzbl
-0xfefe280(%edx),%ecx
847 f0100619: 31 c8
xor %ecx,%eax
848 f010061b: a3
68 12 11 f0
mov %eax,0xf0111268
850 c
= charcode
[shift
& (CTL | SHIFT
)][data
];
851 f0100620: 89 c1
mov %eax,%ecx
852 f0100622: 83 e1
03 and $0x3
,%ecx
853 f0100625: 8b 1c
8d
80 1e
10 f0
mov -0xfefe180(,%ecx,4),%ebx
854 f010062c: 0f b6
1c
13 movzbl
(%ebx,%edx,1),%ebx
855 if
(shift
& CAPSLOCK
) {
856 f0100630: a8 08 test $0x8,%al
857 f0100632: 74 18 je f010064c <_ZL13kbd_proc_datav+0xd7>
858 if ('a' <= c && c <= 'z')
859 f0100634: 8d 53 9f lea -0x61(%ebx),%edx
860 f0100637: 83 fa 19 cmp $0x19,%edx
861 f010063a: 77 05 ja f0100641 <_ZL13kbd_proc_datav+0xcc>
863 f010063c: 83 eb 20 sub $0x20,%ebx
864 f010063f: eb 0b jmp f010064c <_ZL13kbd_proc_datav+0xd7>
865 else if ('A' <= c && c <= 'Z')
866 f0100641: 8d 53 bf lea -0x41(%ebx),%edx
867 f0100644: 83 fa 19 cmp $0x19,%edx
868 f0100647: 77 03 ja f010064c <_ZL13kbd_proc_datav+0xd7>
870 f0100649: 83 c3 20 add $0x20,%ebx
873 // Process special keys
875 // Shift
-PageUp
and Shift
-PageDown: scroll console
876 if
((shift
& (CTL | SHIFT
)) && (c
== KEY_PGUP || c
== KEY_PGDN
)) {
877 f010064c: 85 c9 test %ecx,%ecx
878 f010064e: 0f 84 98 00 00 00 je f01006ec <_ZL13kbd_proc_datav+0x177>
879 f0100654: 8d 93 1a ff ff ff lea -0xe6(%ebx),%edx
880 f010065a: 83 fa 01 cmp $0x1,%edx
881 f010065d: 0f 87 89 00 00 00 ja f01006ec <_ZL13kbd_proc_datav+0x177>
882 cga_scroll(c == KEY_PGUP ? -CRT_ROWS : CRT_ROWS);
883 f0100663: 81 fb e6 00 00 00 cmp $0xe6,%ebx
884 f0100669: 0f 95 c2 setne %dl
885 f010066c: 0f b6 d2 movzbl %dl,%edx
886 f010066f: 83 ea 01 sub $0x1,%edx
887 f0100672: 83 e2 ce and $0xffffffce,%edx
888 f0100675: 83 c2 19 add $0x19,%edx
892 cga_scroll(int delta)
894 int new_backscroll = MAX(MIN(crtsave_backscroll - delta, crtsave_size), 0);
895 f0100678: 0f b7 05 6c 12 11 f0 movzwl 0xf011126c,%eax
896 f010067f: 0f bf c8 movswl %ax,%ecx
897 f0100682: 0f b7 3d 6e 12 11 f0 movzwl 0xf011126e,%edi
898 f0100689: 89 cb mov %ecx,%ebx
899 f010068b: 29 d3 sub %edx,%ebx
900 f010068d: 89 de mov %ebx,%esi
901 f010068f: 39 fb cmp %edi,%ebx
902 f0100691: 7e 02 jle f0100695 <_ZL13kbd_proc_datav+0x120>
903 f0100693: 89 fe mov %edi,%esi
904 f0100695: 89 f2 mov %esi,%edx
905 f0100697: c1 fa 1f sar $0x1f,%edx
906 f010069a: f7 d2 not %edx
907 f010069c: 21 d6 and %edx,%esi
908 // Process special keys
910 // Shift-PageUp and Shift-PageDown: scroll console
911 if ((shift & (CTL | SHIFT)) && (c == KEY_PGUP || c == KEY_PGDN)) {
912 cga_scroll(c == KEY_PGUP ? -CRT_ROWS : CRT_ROWS);
914 f010069e: bb 00 00 00 00 mov $0x0,%ebx
916 cga_scroll(int delta)
918 int new_backscroll = MAX(MIN(crtsave_backscroll - delta, crtsave_size), 0);
920 if (new_backscroll == crtsave_backscroll)
921 f01006a3: 39 ce cmp %ecx,%esi
922 f01006a5: 74 6a je f0100711 <_ZL13kbd_proc_datav+0x19c>
924 if (crtsave_backscroll == 0)
925 f01006a7: 66 85 c0 test %ax,%ax
926 f01006aa: 75 13 jne f01006bf <_ZL13kbd_proc_datav+0x14a>
927 // save current screen
928 cga_savebuf_copy(crtsave_pos + crtsave_size, 0);
929 f01006ac: 0f b7 05 70 12 11 f0 movzwl 0xf0111270,%eax
930 f01006b3: 01 f8 add %edi,%eax
931 f01006b5: ba 00 00 00 00 mov $0x0,%edx
932 f01006ba: e8 3f fb ff ff call f01001fe <_ZL16cga_savebuf_copyib>
934 crtsave_backscroll = new_backscroll;
935 f01006bf: 66 89 35 6c 12 11 f0 mov %si,0xf011126c
936 cga_savebuf_copy(crtsave_pos + crtsave_size - crtsave_backscroll, 1);
937 f01006c6: 0f b7 15 70 12 11 f0 movzwl 0xf0111270,%edx
938 f01006cd: 0f b7 05 6e 12 11 f0 movzwl 0xf011126e,%eax
939 f01006d4: 01 d0 add %edx,%eax
940 f01006d6: 0f bf f6 movswl %si,%esi
941 f01006d9: 29 f0 sub %esi,%eax
942 f01006db: ba 01 00 00 00 mov $0x1,%edx
943 f01006e0: e8 19 fb ff ff call f01001fe <_ZL16cga_savebuf_copyib>
944 // Process special keys
946 // Shift-PageUp and Shift-PageDown: scroll console
947 if ((shift & (CTL | SHIFT)) && (c == KEY_PGUP || c == KEY_PGDN)) {
948 cga_scroll(c == KEY_PGUP ? -CRT_ROWS : CRT_ROWS);
950 f01006e5: bb 00 00 00 00 mov $0x0,%ebx
951 f01006ea: eb 25 jmp f0100711 <_ZL13kbd_proc_datav+0x19c>
954 // Ctrl
-Alt
-Del: reboot
955 if
(!(~shift
& (CTL | ALT
)) && c
== KEY_DEL
) {
956 f01006ec: f7 d0 not %eax
957 f01006ee: a8 06 test $0x6,%al
958 f01006f0: 75 1f jne f0100711 <_ZL13kbd_proc_datav+0x19c>
959 f01006f2: 81 fb e9 00 00 00 cmp $0xe9,%ebx
960 f01006f8: 75 17 jne f0100711 <_ZL13kbd_proc_datav+0x19c>
961 cprintf("Rebooting!\n");
962 f01006fa: c7 04 24 44 1c 10 f0 movl $0xf0101c44,(%esp)
963 f0100701: e8 40 04 00 00 call f0100b46 <_Z7cprintfPKcz>
967 outb
(int port
, uint8_t data
)
969 __asm __volatile("outb %0,%w1" : : "a" (data), "d" (port));
970 f0100706: ba 92 00 00 00 mov $0x92,%edx
971 f010070b: b8 03 00 00 00 mov $0x3,%eax
972 f0100710: ee out %al,(%dx)
973 outb(0x92, 0x3); // courtesy of Chris Frost
978 f0100711: 89 d8
mov %ebx,%eax
979 f0100713: 8b 5c
24 10 mov 0x10(%esp),%ebx
980 f0100717: 8b 74 24 14 mov 0x14(%esp),%esi
981 f010071b: 8b 7c
24 18 mov 0x18(%esp),%edi
982 f010071f: 83 c4
1c
add $0x1c
,%esp
985 f0100723
<_Z11serial_intrv
>:
986 return inb
(COM1
+COM_RX
);
992 f0100723: 83 ec 0c sub $0xc,%esp
994 f0100726: 80 3d 40 10 11 f0 00 cmpb $0x0,0xf0111040
995 f010072d: 74 0a je f0100739 <_Z11serial_intrv+0x16>
996 cons_intr(serial_proc_data);
997 f010072f: b8 aa 01 10 f0 mov $0xf01001aa,%eax
998 f0100734: e8 89 fa ff ff call f01001c2 <_ZL9cons_intrPFivE>
1000 f0100739: 83 c4
0c
add $0xc
,%esp
1003 f010073d
<_Z8kbd_intrv
>:
1010 f010073d: 83 ec 0c sub $0xc,%esp
1011 cons_intr(kbd_proc_data);
1012 f0100740: b8 75 05 10 f0 mov $0xf0100575,%eax
1013 f0100745: e8 78 fa ff ff call f01001c2 <_ZL9cons_intrPFivE>
1015 f010074a: 83 c4
0c
add $0xc
,%esp
1018 f010074e
<_Z9cons_getcv
>:
1021 // return the next input character from the console
, or 0 if none waiting
1025 f010074e: 83 ec 0c sub $0xc,%esp
1028 // poll for any pending input characters,
1029 // so that this function works even when interrupts are disabled
1030 // (e.g., when called from the kernel monitor).
1032 f0100751: e8 cd ff ff ff call f0100723 <_Z11serial_intrv>
1034 f0100756: e8 e2 ff ff ff call f010073d <_Z8kbd_intrv>
1036 // grab the next character from the input buffer.
1037 if (cons.rpos != cons.wpos) {
1038 f010075b: 8b 15 60 12 11 f0 mov 0xf0111260,%edx
1039 c = cons.buf[cons.rpos++];
1040 if (cons.rpos == CONSBUFSIZE)
1045 f0100761: b8
00 00 00 00 mov $0x0
,%eax
1046 // (e.g.
, when called from the kernel monitor
).
1050 // grab the next character from the input buffer.
1051 if
(cons.rpos
!= cons.wpos
) {
1052 f0100766: 3b 15 64 12 11 f0 cmp 0xf0111264,%edx
1053 f010076c: 74 21 je f010078f <_Z9cons_getcv+0x41>
1054 c = cons.buf[cons.rpos++];
1055 f010076e: 0f b6 82 60 10 11 f0 movzbl -0xfeeefa0(%edx),%eax
1056 f0100775: 83 c2 01 add $0x1,%edx
1057 if (cons.rpos == CONSBUFSIZE)
1059 f0100778: 81 fa 00 02 00 00 cmp $0x200,%edx
1060 f010077e: 0f 94 c1 sete %cl
1061 f0100781: 0f b6 c9 movzbl %cl,%ecx
1062 f0100784: 83 e9 01 sub $0x1,%ecx
1063 f0100787: 21 ca and %ecx,%edx
1064 f0100789: 89 15 60 12 11 f0 mov %edx,0xf0111260
1069 f010078f: 83 c4
0c
add $0xc
,%esp
1072 f0100793
<_Z9cons_initv
>:
1075 // initialize the console devices
1079 f0100793: 57 push %edi
1080 f0100794: 56 push %esi
1081 f0100795: 53 push %ebx
1082 f0100796: 83 ec 10 sub $0x10,%esp
1083 volatile uint16_t *cp;
1087 cp = (uint16_t*) (KERNBASE + CGA_BUF);
1089 f0100799: 0f b7 15 00 80 0b f0 movzwl 0xf00b8000,%edx
1090 *cp = (uint16_t) 0xA55A;
1091 f01007a0: 66 c7 05 00 80 0b f0 movw $0xa55a,0xf00b8000
1093 if (*cp != 0xA55A) {
1094 f01007a9: 0f b7 05 00 80 0b f0 movzwl 0xf00b8000,%eax
1095 f01007b0: 66 3d 5a a5 cmp $0xa55a,%ax
1096 f01007b4: 74 11 je f01007c7 <_Z9cons_initv+0x34>
1097 cp = (uint16_t*) (KERNBASE + MONO_BUF);
1098 addr_6845 = MONO_BASE;
1099 f01007b6: c7 05 84 62 11 f0 b4 movl $0x3b4,0xf0116284
1102 cp = (uint16_t*) (KERNBASE + CGA_BUF);
1104 *cp = (uint16_t) 0xA55A;
1105 if (*cp != 0xA55A) {
1106 cp = (uint16_t*) (KERNBASE + MONO_BUF);
1107 f01007c0: be 00 00 0b f0 mov $0xf00b0000,%esi
1108 f01007c5: eb 16 jmp f01007dd <_Z9cons_initv+0x4a>
1109 addr_6845 = MONO_BASE;
1112 f01007c7: 66 89 15 00 80 0b f0 mov %dx,0xf00b8000
1113 addr_6845 = CGA_BASE;
1114 f01007ce: c7 05 84 62 11 f0 d4 movl $0x3d4,0xf0116284
1117 volatile uint16_t *cp;
1121 cp = (uint16_t*) (KERNBASE + CGA_BUF);
1122 f01007d8: be 00 80 0b f0 mov $0xf00b8000,%esi
1124 addr_6845 = CGA_BASE;
1127 /* Extract cursor location
*/
1128 outb
(addr_6845
, 14);
1129 f01007dd: 8b 0d
84 62 11 f0
mov 0xf0116284,%ecx
1130 f01007e3: b8
0e
00 00 00 mov $0xe
,%eax
1131 f01007e8: 89 ca
mov %ecx,%edx
1132 f01007ea: ee
out %al,(%dx)
1133 pos
= inb
(addr_6845
+ 1) << 8;
1134 f01007eb: 8d
59 01 lea 0x1(%ecx),%ebx
1136 static __inline uint8_t
1140 __asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port));
1141 f01007ee: 89 da mov %ebx,%edx
1142 f01007f0: ec in (%dx),%al
1143 f01007f1: 0f b6 f8 movzbl %al,%edi
1144 f01007f4: c1 e7 08 shl $0x8,%edi
1147 static __inline void
1148 outb
(int port
, uint8_t data
)
1150 __asm __volatile("outb %0,%w1" : : "a" (data), "d" (port));
1151 f01007f7: b8 0f 00 00 00 mov $0xf,%eax
1152 f01007fc: 89 ca mov %ecx,%edx
1153 f01007fe: ee out %al,(%dx)
1155 static __inline uint8_t
1159 __asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port));
1160 f01007ff: 89 da mov %ebx,%edx
1161 f0100801: ec in (%dx),%al
1162 outb(addr_6845, 15);
1163 pos |= inb(addr_6845 + 1);
1165 crt_buf = (uint16_t*) cp;
1166 f0100802: 89 35 80 62 11 f0 mov %esi,0xf0116280
1168 /* Extract cursor location */
1169 outb(addr_6845, 14);
1170 pos = inb(addr_6845 + 1) << 8;
1171 outb(addr_6845, 15);
1172 pos |= inb(addr_6845 + 1);
1173 f0100808: 0f b6 d8 movzbl %al,%ebx
1174 f010080b: 09 df or %ebx,%edi
1176 crt_buf = (uint16_t*) cp;
1178 f010080d: 66 89 3d 88 62 11 f0 mov %di,0xf0116288
1181 static __inline void
1182 outb
(int port
, uint8_t data
)
1184 __asm __volatile("outb %0,%w1" : : "a" (data), "d" (port));
1185 f0100814: be fa 03 00 00 mov $0x3fa,%esi
1186 f0100819: b8 00 00 00 00 mov $0x0,%eax
1187 f010081e: 89 f2 mov %esi,%edx
1188 f0100820: ee out %al,(%dx)
1189 f0100821: b2 fb mov $0xfb,%dl
1190 f0100823: b8 80 ff ff ff mov $0xffffff80,%eax
1191 f0100828: ee out %al,(%dx)
1192 f0100829: bb f8 03 00 00 mov $0x3f8,%ebx
1193 f010082e: b8 0c 00 00 00 mov $0xc,%eax
1194 f0100833: 89 da mov %ebx,%edx
1195 f0100835: ee out %al,(%dx)
1196 f0100836: b2 f9 mov $0xf9,%dl
1197 f0100838: b8 00 00 00 00 mov $0x0,%eax
1198 f010083d: ee out %al,(%dx)
1199 f010083e: b2 fb mov $0xfb,%dl
1200 f0100840: b8 03 00 00 00 mov $0x3,%eax
1201 f0100845: ee out %al,(%dx)
1202 f0100846: b2 fc mov $0xfc,%dl
1203 f0100848: b8 00 00 00 00 mov $0x0,%eax
1204 f010084d: ee out %al,(%dx)
1205 f010084e: b2 f9 mov $0xf9,%dl
1206 f0100850: b8 01 00 00 00 mov $0x1,%eax
1207 f0100855: ee out %al,(%dx)
1209 static __inline uint8_t
1213 __asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port));
1214 f0100856: b2 fd mov $0xfd,%dl
1215 f0100858: ec in (%dx),%al
1216 // Enable rcv interrupts
1217 outb(COM1+COM_IER, COM_IER_RDI);
1219 // Clear any preexisting overrun indications and interrupts
1220 // Serial port doesn't exist if COM_LSR returns 0xFF
1221 serial_exists = (inb(COM1+COM_LSR) != 0xFF);
1222 f0100859: 3c ff cmp $0xff,%al
1223 f010085b: 0f 95 c1 setne %cl
1224 f010085e: 88 0d 40 10 11 f0 mov %cl,0xf0111040
1225 f0100864: 89 f2 mov %esi,%edx
1226 f0100866: ec in (%dx),%al
1227 f0100867: 89 da mov %ebx,%edx
1228 f0100869: ec in (%dx),%al
1235 f010086a: 84 c9 test %cl,%cl
1236 f010086c: 75 0c jne f010087a <_Z9cons_initv+0xe7>
1237 cprintf("Serial port does not exist!\n");
1238 f010086e: c7 04 24 50 1c 10 f0 movl $0xf0101c50,(%esp)
1239 f0100875: e8 cc 02 00 00 call f0100b46 <_Z7cprintfPKcz>
1241 f010087a: 83 c4
10 add $0x10
,%esp
1242 f010087d: 5b pop %ebx
1243 f010087e: 5e
pop %esi
1244 f010087f: 5f
pop %edi
1247 f0100881
<_Z8cputchari
>:
1249 // `
High'-level console I/O. Used by readline and cprintf.
1254 f0100881: 83 ec 0c sub $0xc,%esp
1256 f0100884: 8b 44 24 10 mov 0x10(%esp),%eax
1257 f0100888: e8 5e fa ff ff call f01002eb <_ZL9cons_putci>
1259 f010088d: 83 c4 0c add $0xc,%esp
1262 f0100891 <_Z7getcharv>:
1267 f0100891: 83 ec 0c sub $0xc,%esp
1270 while ((c = cons_getc()) == 0)
1271 f0100894: e8 b5 fe ff ff call f010074e <_Z9cons_getcv>
1272 f0100899: 85 c0 test %eax,%eax
1273 f010089b: 74 f7 je f0100894 <_Z7getcharv+0x3>
1277 f010089d: 83 c4 0c add $0xc,%esp
1280 f01008a1 <_Z6isconsi>:
1287 f01008a1: b8 01 00 00 00 mov $0x1,%eax
1291 f01008b0 <_Z12mon_kerninfoiPPcP9Trapframe>:
1296 mon_kerninfo(int argc, char **argv, struct Trapframe *tf)
1298 f01008b0: 83 ec 1c sub $0x1c,%esp
1299 extern char _start[], etext[], edata[], end[];
1301 cprintf("Special kernel symbols:\n");
1302 f01008b3: c7 04 24 a0 21 10 f0 movl $0xf01021a0,(%esp)
1303 f01008ba: e8 87 02 00 00 call f0100b46 <_Z7cprintfPKcz>
1304 cprintf(" _start %08x (virt) %08x (phys)\n", _start, _start - KERNBASE);
1305 f01008bf: c7 44 24 08 0c 00 10 movl $0x10000c,0x8(%esp)
1307 f01008c7: c7 44 24 04 0c 00 10 movl $0xf010000c,0x4(%esp)
1309 f01008cf: c7 04 24 2c 22 10 f0 movl $0xf010222c,(%esp)
1310 f01008d6: e8 6b 02 00 00 call f0100b46 <_Z7cprintfPKcz>
1311 cprintf(" etext %08x (virt) %08x (phys)\n", etext, etext - KERNBASE);
1312 f01008db: c7 44 24 08 a5 1b 10 movl $0x101ba5,0x8(%esp)
1314 f01008e3: c7 44 24 04 a5 1b 10 movl $0xf0101ba5,0x4(%esp)
1316 f01008eb: c7 04 24 50 22 10 f0 movl $0xf0102250,(%esp)
1317 f01008f2: e8 4f 02 00 00 call f0100b46 <_Z7cprintfPKcz>
1318 cprintf(" edata %08x (virt) %08x (phys)\n", edata, edata - KERNBASE);
1319 f01008f7: c7 44 24 08 20 10 11 movl $0x111020,0x8(%esp)
1321 f01008ff: c7 44 24 04 20 10 11 movl $0xf0111020,0x4(%esp)
1323 f0100907: c7 04 24 74 22 10 f0 movl $0xf0102274,(%esp)
1324 f010090e: e8 33 02 00 00 call f0100b46 <_Z7cprintfPKcz>
1325 cprintf(" end %08x (virt) %08x (phys)\n", end, end - KERNBASE);
1326 f0100913: c7 44 24 08 a0 66 11 movl $0x1166a0,0x8(%esp)
1328 f010091b: c7 44 24 04 a0 66 11 movl $0xf01166a0,0x4(%esp)
1330 f0100923: c7 04 24 98 22 10 f0 movl $0xf0102298,(%esp)
1331 f010092a: e8 17 02 00 00 call f0100b46 <_Z7cprintfPKcz>
1332 cprintf("Kernel executable memory footprint: %dKB\n",
1333 (end-_start+1023)/1024);
1334 f010092f: b8 9f 6a 11 f0 mov $0xf0116a9f,%eax
1335 f0100934: 2d 0c 00 10 f0 sub $0xf010000c,%eax
1336 f0100939: 89 c2 mov %eax,%edx
1337 f010093b: c1 fa 1f sar $0x1f,%edx
1338 f010093e: c1 ea 16 shr $0x16,%edx
1339 f0100941: 01 d0 add %edx,%eax
1340 f0100943: c1 f8 0a sar $0xa,%eax
1341 f0100946: 89 44 24 04 mov %eax,0x4(%esp)
1342 f010094a: c7 04 24 bc 22 10 f0 movl $0xf01022bc,(%esp)
1343 f0100951: e8 f0 01 00 00 call f0100b46 <_Z7cprintfPKcz>
1346 f0100956: b8 00 00 00 00 mov $0x0,%eax
1347 f010095b: 83 c4 1c add $0x1c,%esp
1350 f010095f <_Z8mon_helpiPPcP9Trapframe>:
1352 /***** Implementations of basic kernel monitor commands *****/
1355 mon_help(int argc, char **argv, struct Trapframe *tf)
1357 f010095f: 83 ec 1c sub $0x1c,%esp
1360 for (i = 0; i < NCOMMANDS; i++)
1361 cprintf("%s - %s\n", commands[i].name, commands[i].desc);
1362 f0100962: c7 44 24 08 b9 21 10 movl $0xf01021b9,0x8(%esp)
1364 f010096a: c7 44 24 04 d7 21 10 movl $0xf01021d7,0x4(%esp)
1366 f0100972: c7 04 24 dc 21 10 f0 movl $0xf01021dc,(%esp)
1367 f0100979: e8 c8 01 00 00 call f0100b46 <_Z7cprintfPKcz>
1368 f010097e: c7 44 24 08 e8 22 10 movl $0xf01022e8,0x8(%esp)
1370 f0100986: c7 44 24 04 e5 21 10 movl $0xf01021e5,0x4(%esp)
1372 f010098e: c7 04 24 dc 21 10 f0 movl $0xf01021dc,(%esp)
1373 f0100995: e8 ac 01 00 00 call f0100b46 <_Z7cprintfPKcz>
1376 f010099a: b8 00 00 00 00 mov $0x0,%eax
1377 f010099f: 83 c4 1c add $0x1c,%esp
1380 f01009a3 <_Z13mon_backtraceiPPcP9Trapframe>:
1382 mon_backtrace(int argc, char **argv, struct Trapframe *tf)
1387 f01009a3: b8 00 00 00 00 mov $0x0,%eax
1390 f01009a9 <_Z7monitorP9Trapframe>:
1395 monitor(struct Trapframe *tf)
1397 f01009a9: 57 push %edi
1398 f01009aa: 56 push %esi
1399 f01009ab: 53 push %ebx
1400 f01009ac: 83 ec 50 sub $0x50,%esp
1403 cprintf("Welcome to the JOS kernel monitor!\n");
1404 f01009af: c7 04 24 10 23 10 f0 movl $0xf0102310,(%esp)
1405 f01009b6: e8 8b 01 00 00 call f0100b46 <_Z7cprintfPKcz>
1406 cprintf("Type 'help
' for a list of commands.\n");
1407 f01009bb: c7 04 24 34 23 10 f0 movl $0xf0102334,(%esp)
1408 f01009c2: e8 7f 01 00 00 call f0100b46 <_Z7cprintfPKcz>
1409 // Lookup and invoke the command
1412 for (i = 0; i < NCOMMANDS; i++) {
1413 if (strcmp(argv[0], commands[i].name) == 0)
1414 return commands[i].func(argc, argv, tf);
1415 f01009c7: 8d 7c 24 10 lea 0x10(%esp),%edi
1416 cprintf("Welcome to the JOS kernel monitor!\n");
1417 cprintf("Type 'help
' for a list of commands.\n");
1421 buf = readline("K> ");
1422 f01009cb: c7 04 24 ee 21 10 f0 movl $0xf01021ee,(%esp)
1423 f01009d2: e8 69 0a 00 00 call f0101440 <_Z8readlinePKc>
1424 f01009d7: 89 c3 mov %eax,%ebx
1426 f01009d9: 85 c0 test %eax,%eax
1427 f01009db: 74 ee je f01009cb <_Z7monitorP9Trapframe+0x22>
1428 char *argv[MAXARGS];
1431 // Parse the command buffer into whitespace-separated arguments
1434 f01009dd: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
1437 char *argv[MAXARGS];
1440 // Parse the command buffer into whitespace-separated arguments
1442 f01009e5: be 00 00 00 00 mov $0x0,%esi
1445 // gobble whitespace
1446 while (*buf && strchr(WHITESPACE, *buf))
1447 f01009ea: 0f b6 03 movzbl (%ebx),%eax
1448 f01009ed: 84 c0 test %al,%al
1449 f01009ef: 74 65 je f0100a56 <_Z7monitorP9Trapframe+0xad>
1450 f01009f1: 0f be c0 movsbl %al,%eax
1451 f01009f4: 89 44 24 04 mov %eax,0x4(%esp)
1452 f01009f8: c7 04 24 f2 21 10 f0 movl $0xf01021f2,(%esp)
1453 f01009ff: e8 35 0c 00 00 call f0101639 <_Z6strchrPKcc>
1454 f0100a04: 85 c0 test %eax,%eax
1455 f0100a06: 0f 85 d1 00 00 00 jne f0100add <_Z7monitorP9Trapframe+0x134>
1458 f0100a0c: 80 3b 00 cmpb $0x0,(%ebx)
1459 f0100a0f: 74 45 je f0100a56 <_Z7monitorP9Trapframe+0xad>
1462 // save and scan past next arg
1463 if (argc == MAXARGS-1) {
1464 f0100a11: 83 fe 0f cmp $0xf,%esi
1465 f0100a14: 75 16 jne f0100a2c <_Z7monitorP9Trapframe+0x83>
1466 cprintf("Too many arguments (max %d)\n", MAXARGS);
1467 f0100a16: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp)
1469 f0100a1e: c7 04 24 f7 21 10 f0 movl $0xf01021f7,(%esp)
1470 f0100a25: e8 1c 01 00 00 call f0100b46 <_Z7cprintfPKcz>
1471 f0100a2a: eb 9f jmp f01009cb <_Z7monitorP9Trapframe+0x22>
1475 f0100a2c: 89 5c b4 10 mov %ebx,0x10(%esp,%esi,4)
1476 f0100a30: 83 c6 01 add $0x1,%esi
1477 while (*buf && !strchr(WHITESPACE, *buf))
1478 f0100a33: 0f b6 03 movzbl (%ebx),%eax
1479 f0100a36: 84 c0 test %al,%al
1480 f0100a38: 74 b0 je f01009ea <_Z7monitorP9Trapframe+0x41>
1481 f0100a3a: 0f be c0 movsbl %al,%eax
1482 f0100a3d: 89 44 24 04 mov %eax,0x4(%esp)
1483 f0100a41: c7 04 24 f2 21 10 f0 movl $0xf01021f2,(%esp)
1484 f0100a48: e8 ec 0b 00 00 call f0101639 <_Z6strchrPKcc>
1485 f0100a4d: 85 c0 test %eax,%eax
1486 f0100a4f: 75 99 jne f01009ea <_Z7monitorP9Trapframe+0x41>
1487 f0100a51: e9 92 00 00 00 jmp f0100ae8 <_Z7monitorP9Trapframe+0x13f>
1491 f0100a56: c7 44 b4 10 00 00 00 movl $0x0,0x10(%esp,%esi,4)
1494 // Lookup and invoke the command
1496 f0100a5e: 85 f6 test %esi,%esi
1497 f0100a60: 0f 84 65 ff ff ff je f01009cb <_Z7monitorP9Trapframe+0x22>
1499 for (i = 0; i < NCOMMANDS; i++) {
1500 if (strcmp(argv[0], commands[i].name) == 0)
1501 f0100a66: c7 44 24 04 d7 21 10 movl $0xf01021d7,0x4(%esp)
1503 f0100a6e: 8b 44 24 10 mov 0x10(%esp),%eax
1504 f0100a72: 89 04 24 mov %eax,(%esp)
1505 f0100a75: e8 63 0b 00 00 call f01015dd <_Z6strcmpPKcS0_>
1506 f0100a7a: ba 00 00 00 00 mov $0x0,%edx
1507 f0100a7f: 85 c0 test %eax,%eax
1508 f0100a81: 74 1d je f0100aa0 <_Z7monitorP9Trapframe+0xf7>
1509 f0100a83: c7 44 24 04 e5 21 10 movl $0xf01021e5,0x4(%esp)
1511 f0100a8b: 8b 44 24 10 mov 0x10(%esp),%eax
1512 f0100a8f: 89 04 24 mov %eax,(%esp)
1513 f0100a92: e8 46 0b 00 00 call f01015dd <_Z6strcmpPKcS0_>
1514 f0100a97: 85 c0 test %eax,%eax
1515 f0100a99: 75 29 jne f0100ac4 <_Z7monitorP9Trapframe+0x11b>
1516 f0100a9b: ba 01 00 00 00 mov $0x1,%edx
1517 return commands[i].func(argc, argv, tf);
1518 f0100aa0: 8d 04 12 lea (%edx,%edx,1),%eax
1519 f0100aa3: 01 c2 add %eax,%edx
1520 f0100aa5: 8b 44 24 60 mov 0x60(%esp),%eax
1521 f0100aa9: 89 44 24 08 mov %eax,0x8(%esp)
1522 f0100aad: 89 7c 24 04 mov %edi,0x4(%esp)
1523 f0100ab1: 89 34 24 mov %esi,(%esp)
1524 f0100ab4: ff 14 95 64 23 10 f0 call *-0xfefdc9c(,%edx,4)
1528 buf = readline("K> ");
1530 if (runcmd(buf, tf) < 0)
1531 f0100abb: 85 c0 test %eax,%eax
1532 f0100abd: 78 31 js f0100af0 <_Z7monitorP9Trapframe+0x147>
1533 f0100abf: e9 07 ff ff ff jmp f01009cb <_Z7monitorP9Trapframe+0x22>
1535 for (i = 0; i < NCOMMANDS; i++) {
1536 if (strcmp(argv[0], commands[i].name) == 0)
1537 return commands[i].func(argc, argv, tf);
1539 cprintf("Unknown command '%s
'\n", argv[0]);
1540 f0100ac4: 8b 44 24 10 mov 0x10(%esp),%eax
1541 f0100ac8: 89 44 24 04 mov %eax,0x4(%esp)
1542 f0100acc: c7 04 24 14 22 10 f0 movl $0xf0102214,(%esp)
1543 f0100ad3: e8 6e 00 00 00 call f0100b46 <_Z7cprintfPKcz>
1544 f0100ad8: e9 ee fe ff ff jmp f01009cb <_Z7monitorP9Trapframe+0x22>
1548 // gobble whitespace
1549 while (*buf && strchr(WHITESPACE, *buf))
1551 f0100add: c6 03 00 movb $0x0,(%ebx)
1552 f0100ae0: 83 c3 01 add $0x1,%ebx
1553 f0100ae3: e9 02 ff ff ff jmp f01009ea <_Z7monitorP9Trapframe+0x41>
1554 cprintf("Too many arguments (max %d)\n", MAXARGS);
1558 while (*buf && !strchr(WHITESPACE, *buf))
1560 f0100ae8: 83 c3 01 add $0x1,%ebx
1561 f0100aeb: e9 43 ff ff ff jmp f0100a33 <_Z7monitorP9Trapframe+0x8a>
1562 buf = readline("K> ");
1564 if (runcmd(buf, tf) < 0)
1568 f0100af0: 83 c4 50 add $0x50,%esp
1569 f0100af3: 5b pop %ebx
1570 f0100af4: 5e pop %esi
1571 f0100af5: 5f pop %edi
1574 f0100af7 <_Z8read_eipv>:
1575 // Return EIP of caller. Does not work if inlined.
1580 __asm __volatile("movl 4(%%ebp), %0" : "=r" (callerpc));
1581 f0100af7: 8b 45 04 mov 0x4(%ebp),%eax
1587 f0100afc <_ZL5putchiPv>:
1588 #include <inc/stdarg.h>
1592 putch(int ch, void *ptr)
1594 f0100afc: 83 ec 1c sub $0x1c,%esp
1595 int *cnt = (int *) ptr;
1597 f0100aff: 8b 44 24 20 mov 0x20(%esp),%eax
1598 f0100b03: 89 04 24 mov %eax,(%esp)
1599 f0100b06: e8 76 fd ff ff call f0100881 <_Z8cputchari>
1602 f0100b0b: 83 c4 1c add $0x1c,%esp
1605 f0100b0f <_Z8vcprintfPKcPc>:
1608 vcprintf(const char *fmt, va_list ap)
1610 f0100b0f: 83 ec 2c sub $0x2c,%esp
1612 f0100b12: c7 44 24 1c 00 00 00 movl $0x0,0x1c(%esp)
1615 vprintfmt(&putch, &cnt, fmt, ap);
1616 f0100b1a: 8b 44 24 34 mov 0x34(%esp),%eax
1617 f0100b1e: 89 44 24 0c mov %eax,0xc(%esp)
1618 f0100b22: 8b 44 24 30 mov 0x30(%esp),%eax
1619 f0100b26: 89 44 24 08 mov %eax,0x8(%esp)
1620 f0100b2a: 8d 44 24 1c lea 0x1c(%esp),%eax
1621 f0100b2e: 89 44 24 04 mov %eax,0x4(%esp)
1622 f0100b32: c7 04 24 fc 0a 10 f0 movl $0xf0100afc,(%esp)
1623 f0100b39: e8 31 04 00 00 call f0100f6f <_Z9vprintfmtPFviPvES_PKcPc>
1626 f0100b3e: 8b 44 24 1c mov 0x1c(%esp),%eax
1627 f0100b42: 83 c4 2c add $0x2c,%esp
1630 f0100b46 <_Z7cprintfPKcz>:
1633 cprintf(const char *fmt, ...)
1635 f0100b46: 83 ec 1c sub $0x1c,%esp
1640 f0100b49: 8d 44 24 24 lea 0x24(%esp),%eax
1641 cnt = vcprintf(fmt, ap);
1642 f0100b4d: 89 44 24 04 mov %eax,0x4(%esp)
1643 f0100b51: 8b 44 24 20 mov 0x20(%esp),%eax
1644 f0100b55: 89 04 24 mov %eax,(%esp)
1645 f0100b58: e8 b2 ff ff ff call f0100b0f <_Z8vcprintfPKcPc>
1650 f0100b5d: 83 c4 1c add $0x1c,%esp
1652 f0100b61: 00 00 add %al,(%eax)
1655 f0100b64 <_ZL14stab_binsearchPK4StabPiS2_ij>:
1656 // will exit setting left = 118, right = 554.
1659 stab_binsearch(const struct Stab *stabs, int *region_left, int *region_right,
1660 int type, uintptr_t addr)
1662 f0100b64: 55 push %ebp
1663 f0100b65: 57 push %edi
1664 f0100b66: 56 push %esi
1665 f0100b67: 53 push %ebx
1666 f0100b68: 83 ec 0c sub $0xc,%esp
1667 f0100b6b: 89 c3 mov %eax,%ebx
1668 f0100b6d: 89 54 24 04 mov %edx,0x4(%esp)
1669 f0100b71: 89 4c 24 08 mov %ecx,0x8(%esp)
1670 f0100b75: 8b 74 24 20 mov 0x20(%esp),%esi
1671 int l = *region_left, r = *region_right, any_matches = 0;
1672 f0100b79: 8b 0a mov (%edx),%ecx
1673 f0100b7b: 8b 44 24 08 mov 0x8(%esp),%eax
1674 f0100b7f: 8b 00 mov (%eax),%eax
1675 f0100b81: 89 04 24 mov %eax,(%esp)
1676 f0100b84: bd 00 00 00 00 mov $0x0,%ebp
1679 f0100b89: eb 5e jmp f0100be9 <_ZL14stab_binsearchPK4StabPiS2_ij+0x85>
1680 int true_m = (l + r) / 2, m = true_m;
1681 f0100b8b: 8b 04 24 mov (%esp),%eax
1682 f0100b8e: 01 c8 add %ecx,%eax
1683 f0100b90: bf 02 00 00 00 mov $0x2,%edi
1685 f0100b96: f7 ff idiv %edi
1686 f0100b98: 89 c2 mov %eax,%edx
1688 // search for earliest stab with right type
1689 while (m >= l && stabs[m].n_type != type)
1690 f0100b9a: 39 ca cmp %ecx,%edx
1691 f0100b9c: 0f 8c 97 00 00 00 jl f0100c39 <_ZL14stab_binsearchPK4StabPiS2_ij+0xd5>
1692 // left = 0, right = 657;
1693 // stab_binsearch(stabs, &left, &right, N_SO, 0xf0100184);
1694 // will exit setting left = 118, right = 554.
1697 stab_binsearch(const struct Stab *stabs, int *region_left, int *region_right,
1698 f0100ba2: 6b fa 0c imul $0xc,%edx,%edi
1701 int true_m = (l + r) / 2, m = true_m;
1703 // search for earliest stab with right type
1704 while (m >= l && stabs[m].n_type != type)
1705 f0100ba5: 0f b6 7c 3b 04 movzbl 0x4(%ebx,%edi,1),%edi
1706 f0100baa: 39 f7 cmp %esi,%edi
1707 f0100bac: 74 72 je f0100c20 <_ZL14stab_binsearchPK4StabPiS2_ij+0xbc>
1709 f0100bae: 4a dec %edx
1710 f0100baf: eb e9 jmp f0100b9a <_ZL14stab_binsearchPK4StabPiS2_ij+0x36>
1713 // actual binary search
1715 if (stabs[m].n_value < addr) {
1717 f0100bb1: 8b 4c 24 04 mov 0x4(%esp),%ecx
1718 f0100bb5: 89 11 mov %edx,(%ecx)
1720 f0100bb7: 8d 48 01 lea 0x1(%eax),%ecx
1725 // actual binary search
1727 f0100bba: bd 01 00 00 00 mov $0x1,%ebp
1728 f0100bbf: eb 28 jmp f0100be9 <_ZL14stab_binsearchPK4StabPiS2_ij+0x85>
1729 if (stabs[m].n_value < addr) {
1732 } else if (stabs[m].n_value > addr) {
1733 f0100bc1: 3b 7c 24 24 cmp 0x24(%esp),%edi
1734 f0100bc5: 76 11 jbe f0100bd8 <_ZL14stab_binsearchPK4StabPiS2_ij+0x74>
1735 *region_right = m - 1;
1736 f0100bc7: 4d dec %ebp
1737 f0100bc8: 89 2c 24 mov %ebp,(%esp)
1738 f0100bcb: 8b 7c 24 08 mov 0x8(%esp),%edi
1739 f0100bcf: 89 2f mov %ebp,(%edi)
1744 // actual binary search
1746 f0100bd1: bd 01 00 00 00 mov $0x1,%ebp
1747 f0100bd6: eb 11 jmp f0100be9 <_ZL14stab_binsearchPK4StabPiS2_ij+0x85>
1748 *region_right = m - 1;
1751 // exact match for 'addr
', but continue loop to find
1754 f0100bd8: 8b 44 24 04 mov 0x4(%esp),%eax
1755 f0100bdc: 89 28 mov %ebp,(%eax)
1758 f0100bde: ff 44 24 24 incl 0x24(%esp)
1759 f0100be2: 89 d1 mov %edx,%ecx
1764 // actual binary search
1766 f0100be4: bd 01 00 00 00 mov $0x1,%ebp
1767 stab_binsearch(const struct Stab *stabs, int *region_left, int *region_right,
1768 int type, uintptr_t addr)
1770 int l = *region_left, r = *region_right, any_matches = 0;
1773 f0100be9: 3b 0c 24 cmp (%esp),%ecx
1774 f0100bec: 7e 9d jle f0100b8b <_ZL14stab_binsearchPK4StabPiS2_ij+0x27>
1781 f0100bee: 85 ed test %ebp,%ebp
1782 f0100bf0: 75 0f jne f0100c01 <_ZL14stab_binsearchPK4StabPiS2_ij+0x9d>
1783 *region_right = *region_left - 1;
1784 f0100bf2: 8b 54 24 04 mov 0x4(%esp),%edx
1785 f0100bf6: 8b 02 mov (%edx),%eax
1786 f0100bf8: 48 dec %eax
1787 f0100bf9: 8b 4c 24 08 mov 0x8(%esp),%ecx
1788 f0100bfd: 89 01 mov %eax,(%ecx)
1789 f0100bff: eb 3d jmp f0100c3e <_ZL14stab_binsearchPK4StabPiS2_ij+0xda>
1791 // find rightmost region containing 'addr
'
1792 for (l = *region_right;
1793 f0100c01: 8b 4c 24 08 mov 0x8(%esp),%ecx
1794 f0100c05: 8b 01 mov (%ecx),%eax
1795 f0100c07: 8b 7c 24 04 mov 0x4(%esp),%edi
1796 f0100c0b: 8b 17 mov (%edi),%edx
1797 f0100c0d: 39 c2 cmp %eax,%edx
1798 f0100c0f: 7d 20 jge f0100c31 <_ZL14stab_binsearchPK4StabPiS2_ij+0xcd>
1799 // left = 0, right = 657;
1800 // stab_binsearch(stabs, &left, &right, N_SO, 0xf0100184);
1801 // will exit setting left = 118, right = 554.
1804 stab_binsearch(const struct Stab *stabs, int *region_left, int *region_right,
1805 f0100c11: 6b c8 0c imul $0xc,%eax,%ecx
1808 *region_right = *region_left - 1;
1810 // find rightmost region containing 'addr
'
1811 for (l = *region_right;
1812 f0100c14: 0f b6 4c 0b 04 movzbl 0x4(%ebx,%ecx,1),%ecx
1813 f0100c19: 39 f1 cmp %esi,%ecx
1814 f0100c1b: 74 14 je f0100c31 <_ZL14stab_binsearchPK4StabPiS2_ij+0xcd>
1815 f0100c1d: 48 dec %eax
1816 f0100c1e: eb ed jmp f0100c0d <_ZL14stab_binsearchPK4StabPiS2_ij+0xa9>
1819 int true_m = (l + r) / 2, m = true_m;
1821 // search for earliest stab with right type
1822 while (m >= l && stabs[m].n_type != type)
1823 f0100c20: 89 d5 mov %edx,%ebp
1827 // actual binary search
1829 if (stabs[m].n_value < addr) {
1830 f0100c22: 6b fa 0c imul $0xc,%edx,%edi
1831 f0100c25: 8b 7c 3b 08 mov 0x8(%ebx,%edi,1),%edi
1832 f0100c29: 3b 7c 24 24 cmp 0x24(%esp),%edi
1833 f0100c2d: 72 82 jb f0100bb1 <_ZL14stab_binsearchPK4StabPiS2_ij+0x4d>
1834 f0100c2f: eb 90 jmp f0100bc1 <_ZL14stab_binsearchPK4StabPiS2_ij+0x5d>
1835 // find rightmost region containing 'addr
'
1836 for (l = *region_right;
1837 l > *region_left && stabs[l].n_type != type;
1841 f0100c31: 8b 54 24 04 mov 0x4(%esp),%edx
1842 f0100c35: 89 02 mov %eax,(%edx)
1843 f0100c37: eb 05 jmp f0100c3e <_ZL14stab_binsearchPK4StabPiS2_ij+0xda>
1845 // search for earliest stab with right type
1846 while (m >= l && stabs[m].n_type != type)
1848 if (m < l) { // no match in [l, m]
1850 f0100c39: 8d 48 01 lea 0x1(%eax),%ecx
1852 f0100c3c: eb ab jmp f0100be9 <_ZL14stab_binsearchPK4StabPiS2_ij+0x85>
1853 l > *region_left && stabs[l].n_type != type;
1859 f0100c3e: 83 c4 0c add $0xc,%esp
1860 f0100c41: 5b pop %ebx
1861 f0100c42: 5e pop %esi
1862 f0100c43: 5f pop %edi
1863 f0100c44: 5d pop %ebp
1866 f0100c46 <_Z13debuginfo_eipjP12Eipdebuginfo>:
1867 // negative if not. But even if it returns negative it has stored some
1868 // information into '*info
'.
1871 debuginfo_eip(uintptr_t addr, struct Eipdebuginfo *info)
1873 f0100c46: 83 ec 2c sub $0x2c,%esp
1874 f0100c49: 89 5c 24 20 mov %ebx,0x20(%esp)
1875 f0100c4d: 89 74 24 24 mov %esi,0x24(%esp)
1876 f0100c51: 89 7c 24 28 mov %edi,0x28(%esp)
1877 f0100c55: 8b 74 24 30 mov 0x30(%esp),%esi
1878 f0100c59: 8b 5c 24 34 mov 0x34(%esp),%ebx
1879 const struct Stab *stabs, *stab_end;
1880 const char *stabstr, *stabstr_end;
1881 int lfile, rfile, lfun, rfun, lline, rline;
1884 info->eip_file = "<unknown>";
1885 f0100c5d: c7 03 74 23 10 f0 movl $0xf0102374,(%ebx)
1887 f0100c63: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
1888 info->eip_fn_name = "<unknown>";
1889 f0100c6a: c7 43 08 74 23 10 f0 movl $0xf0102374,0x8(%ebx)
1890 info->eip_fn_namelen = 9;
1891 f0100c71: c7 43 0c 09 00 00 00 movl $0x9,0xc(%ebx)
1892 info->eip_fn_addr = addr;
1893 f0100c78: 89 73 10 mov %esi,0x10(%ebx)
1894 info->eip_fn_narg = 0;
1895 f0100c7b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
1897 // Find the relevant set of stabs
1899 f0100c82: 81 fe ff ff bf ef cmp $0xefbfffff,%esi
1900 f0100c88: 76 12 jbe f0100c9c <_Z13debuginfo_eipjP12Eipdebuginfo+0x56>
1901 // Can't search for user
-level addresses yet
!
1902 panic
("User address");
1905 // String table validity checks
1906 if
(stabstr_end
<= stabstr || stabstr_end
[-1] != 0)
1907 f0100c8a: b8 f3
8b 10 f0
mov $0xf0108bf3
,%eax
1908 f0100c8f: 3d c1
68 10 f0
cmp $0xf01068c1
,%eax
1909 f0100c94: 0f
86 3a
01 00 00 jbe f0100dd4
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x18e>
1910 f0100c9a: eb
1c
jmp f0100cb8
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x72>
1911 stab_end
= __STAB_END__
;
1912 stabstr
= __STABSTR_BEGIN__
;
1913 stabstr_end
= __STABSTR_END__
;
1915 // Can't search for user-level addresses yet!
1916 panic("User address");
1917 f0100c9c: c7 44 24 08 7e 23 10 movl $0xf010237e,0x8(%esp)
1919 f0100ca4: c7 44 24 04 7f 00 00 movl $0x7f,0x4(%esp)
1921 f0100cac: c7 04 24 8b 23 10 f0 movl $0xf010238b,(%esp)
1922 f0100cb3: e8 34 f4 ff ff call f01000ec <_Z6_panicPKciS0_z>
1925 // String table validity checks
1926 if
(stabstr_end
<= stabstr || stabstr_end
[-1] != 0)
1928 f0100cb8: b8 ff ff ff ff
mov $0xffffffff
,%eax
1929 // Can
't search for user-level addresses yet!
1930 panic("User address");
1933 // String table validity checks
1934 if (stabstr_end <= stabstr || stabstr_end[-1] != 0)
1935 f0100cbd: 80 3d f2 8b 10 f0 00 cmpb $0x0,0xf0108bf2
1936 f0100cc4: 0f 85 16 01 00 00 jne f0100de0 <_Z13debuginfo_eipjP12Eipdebuginfo+0x19a>
1937 // 'eip'. First, we find the basic source file containing 'eip'.
1938 // Then, we look in that source file for the function. Then we look
1939 // for the line number.
1941 // Search the entire set of stabs for the source file (type N_SO).
1943 f0100cca: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
1945 rfile = (stab_end - stabs) - 1;
1946 f0100cd2: b8 c0 68 10 f0 mov $0xf01068c0,%eax
1947 f0100cd7: 2d ac 25 10 f0 sub $0xf01025ac,%eax
1948 f0100cdc: c1 f8 02 sar $0x2,%eax
1949 f0100cdf: 69 c0 ab aa aa aa imul $0xaaaaaaab,%eax,%eax
1950 f0100ce5: 83 e8 01 sub $0x1,%eax
1951 f0100ce8: 89 44 24 14 mov %eax,0x14(%esp)
1952 stab_binsearch(stabs, &lfile, &rfile, N_SO, addr);
1953 f0100cec: 89 74 24 04 mov %esi,0x4(%esp)
1954 f0100cf0: c7 04 24 64 00 00 00 movl $0x64,(%esp)
1955 f0100cf7: 8d 4c 24 14 lea 0x14(%esp),%ecx
1956 f0100cfb: 8d 54 24 10 lea 0x10(%esp),%edx
1957 f0100cff: b8 ac 25 10 f0 mov $0xf01025ac,%eax
1958 f0100d04: e8 5b fe ff ff call f0100b64 <_ZL14stab_binsearchPK4StabPiS2_ij>
1960 f0100d09: 8b 54 24 10 mov 0x10(%esp),%edx
1962 f0100d0d: b8 ff ff ff ff mov $0xffffffff,%eax
1964 // Search the entire set of stabs for the source file (type N_SO).
1966 rfile = (stab_end - stabs) - 1;
1967 stab_binsearch(stabs, &lfile, &rfile, N_SO, addr);
1969 f0100d12: 85 d2 test %edx,%edx
1970 f0100d14: 0f 84 c6 00 00 00 je f0100de0 <_Z13debuginfo_eipjP12Eipdebuginfo+0x19a>
1973 // Search within that file's stabs for the function definition
1976 f0100d1a: 89 54 24 18 mov %edx,0x18(%esp)
1978 f0100d1e: 8b 44 24 14 mov 0x14(%esp),%eax
1979 f0100d22: 89 44 24 1c
mov %eax,0x1c(%esp)
1980 stab_binsearch
(stabs
, &lfun
, &rfun
, N_FUN
, addr
);
1981 f0100d26: 89 74 24 04 mov %esi,0x4(%esp)
1982 f0100d2a: c7
04 24 24 00 00 00 movl
$0x24
,(%esp)
1983 f0100d31: 8d
4c
24 1c
lea 0x1c(%esp),%ecx
1984 f0100d35: 8d
54 24 18 lea 0x18(%esp),%edx
1985 f0100d39: b8 ac
25 10 f0
mov $0xf01025ac
,%eax
1986 f0100d3e: e8
21 fe ff ff
call f0100b64
<_ZL14stab_binsearchPK4StabPiS2_ij
>
1989 f0100d43: 8b 7c 24 18 mov 0x18(%esp),%edi
1990 f0100d47: 3b 7c 24 1c cmp 0x1c(%esp),%edi
1991 f0100d4b: 7f 2e jg f0100d7b <_Z13debuginfo_eipjP12Eipdebuginfo+0x135>
1992 // stabs[lfun] points to the function name
1993 // in the string table, but check bounds just in case.
1994 if (stabs[lfun].n_strx < (uint32_t) (stabstr_end - stabstr))
1995 f0100d4d: 6b c7 0c imul $0xc,%edi,%eax
1996 f0100d50: 8d 90 ac 25 10 f0 lea -0xfefda54(%eax),%edx
1997 f0100d56: 8b 80 ac 25 10 f0 mov -0xfefda54(%eax),%eax
1998 f0100d5c: b9 f3 8b 10 f0 mov $0xf0108bf3,%ecx
1999 f0100d61: 81 e9 c1 68 10 f0 sub $0xf01068c1,%ecx
2000 f0100d67: 39 c8 cmp %ecx,%eax
2001 f0100d69: 73 08 jae f0100d73 <_Z13debuginfo_eipjP12Eipdebuginfo+0x12d>
2002 info->eip_fn_name = stabstr + stabs[lfun].n_strx;
2003 f0100d6b: 05 c1 68 10 f0 add $0xf01068c1,%eax
2004 f0100d70: 89 43 08 mov %eax,0x8(%ebx)
2005 info->eip_fn_addr = stabs[lfun].n_value;
2006 f0100d73: 8b 42 08 mov 0x8(%edx),%eax
2007 f0100d76: 89 43 10 mov %eax,0x10(%ebx)
2008 f0100d79: eb 07 jmp f0100d82 <_Z13debuginfo_eipjP12Eipdebuginfo+0x13c>
2012 // Couldn't find function stab! Maybe we're in an assembly
2013 // file. Search the whole file for the line number.
2014 info->eip_fn_addr = addr;
2015 f0100d7b: 89 73 10 mov %esi,0x10(%ebx)
2017 f0100d7e: 8b 7c 24 10 mov 0x10(%esp),%edi
2020 // Ignore stuff after the colon.
2021 info
->eip_fn_namelen
= strfind
(info
->eip_fn_name
, ':') - info
->eip_fn_name
;
2022 f0100d82: c7
44 24 04 3a
00 00 movl
$0x3a
,0x4(%esp)
2024 f0100d8a: 8b 43 08 mov 0x8(%ebx),%eax
2025 f0100d8d: 89 04 24 mov %eax,(%esp)
2026 f0100d90: e8 d6
08 00 00 call f010166b
<_Z7strfindPKcc
>
2027 f0100d95: 2b 43 08 sub 0x8(%ebx),%eax
2028 f0100d98: 89 43 0c
mov %eax,0xc(%ebx)
2029 // Search backwards from the line number for the relevant filename
2031 // We can
't just use the "lfile" stab because inlined functions
2032 // can interpolate code from a different file!
2033 // Such included source files use the N_SOL stab type.
2034 while (lline >= lfile
2035 f0100d9b: 8b 44 24 10 mov 0x10(%esp),%eax
2036 f0100d9f: 39 c7 cmp %eax,%edi
2037 f0100da1: 7c 38 jl f0100ddb <_Z13debuginfo_eipjP12Eipdebuginfo+0x195>
2038 && stabs[lline].n_type != N_SOL
2039 f0100da3: 8d 14 7f lea (%edi,%edi,2),%edx
2040 f0100da6: 8d 14 95 ac 25 10 f0 lea -0xfefda54(,%edx,4),%edx
2041 // Search backwards from the line number for the relevant filename
2043 // We can't just use the
"lfile" stab because inlined functions
2044 // can interpolate code from a different file
!
2045 // Such included source files use the N_SOL stab
type.
2046 while
(lline
>= lfile
2047 f0100dad: 0f b6
4a
04 movzbl
0x4(%edx),%ecx
2048 f0100db1: 80 f9
84 cmp $0x84
,%cl
2049 f0100db4: 74 3a
je f0100df0
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x1aa>
2050 f0100db6: 80 f9
64 cmp $0x64
,%cl
2051 f0100db9: 75 06 jne f0100dc1
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x17b>
2052 f0100dbb: 83 7a
08 00 cmpl
$0x0
,0x8(%edx)
2053 f0100dbf: 75 2f
jne f0100df0
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x1aa>
2054 && stabs
[lline
].n_type
!= N_SOL
2055 && (stabs
[lline
].n_type
!= N_SO ||
!stabs
[lline
].n_value
))
2057 f0100dc1: 83 ef
01 sub $0x1
,%edi
2058 f0100dc4: eb d9
jmp f0100d9f
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x159>
2060 && stabs
[lline
].n_strx
< (uint32_t
) (stabstr_end
- stabstr
))
2061 info
->eip_file
= stabstr
+ stabs
[lline
].n_strx
;
2062 f0100dc6: 05 c1
68 10 f0
add $0xf01068c1
,%eax
2063 f0100dcb: 89 03 mov %eax,(%ebx)
2064 // Set eip_fn_narg to the number of arguments taken by the function
,
2065 // or 0 if there was no containing function.
2070 f0100dcd: b8
00 00 00 00 mov $0x0
,%eax
2071 f0100dd2: eb
0c
jmp f0100de0
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x19a>
2072 panic
("User address");
2075 // String table validity checks
2076 if
(stabstr_end
<= stabstr || stabstr_end
[-1] != 0)
2078 f0100dd4: b8 ff ff ff ff
mov $0xffffffff
,%eax
2079 f0100dd9: eb
05 jmp f0100de0
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x19a>
2080 // Set eip_fn_narg to the number of arguments taken by the function
,
2081 // or 0 if there was no containing function.
2086 f0100ddb: b8
00 00 00 00 mov $0x0
,%eax
2088 f0100de0: 8b 5c
24 20 mov 0x20(%esp),%ebx
2089 f0100de4: 8b 74 24 24 mov 0x24(%esp),%esi
2090 f0100de8: 8b 7c
24 28 mov 0x28(%esp),%edi
2091 f0100dec: 83 c4
2c
add $0x2c
,%esp
2093 while
(lline
>= lfile
2094 && stabs
[lline
].n_type
!= N_SOL
2095 && (stabs
[lline
].n_type
!= N_SO ||
!stabs
[lline
].n_value
))
2098 && stabs
[lline
].n_strx
< (uint32_t
) (stabstr_end
- stabstr
))
2099 f0100df0: 6b ff
0c imul
$0xc
,%edi,%edi
2100 // Such included source files use the N_SOL stab
type.
2101 while
(lline
>= lfile
2102 && stabs
[lline
].n_type
!= N_SOL
2103 && (stabs
[lline
].n_type
!= N_SO ||
!stabs
[lline
].n_value
))
2106 f0100df3: 8b 87 ac
25 10 f0
mov -0xfefda54(%edi),%eax
2107 f0100df9: ba f3
8b 10 f0
mov $0xf0108bf3
,%edx
2108 f0100dfe: 81 ea c1
68 10 f0
sub $0xf01068c1
,%edx
2109 f0100e04: 39 d0
cmp %edx,%eax
2110 f0100e06: 72 be
jb f0100dc6
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x180>
2111 // Set eip_fn_narg to the number of arguments taken by the function
,
2112 // or 0 if there was no containing function.
2117 f0100e08: b8
00 00 00 00 mov $0x0
,%eax
2118 f0100e0d: eb d1
jmp f0100de0
<_Z13debuginfo_eipjP12Eipdebuginfo
+0x19a>
2121 f0100e10
<_ZL8printnumPFviPvES_yjii
>:
2122 * using specified putch function
and associated pointer putdat.
2125 printnum
(void
(*putch
)(int, void
*), void
*putdat
,
2126 unsigned long long num
, unsigned base
, int width, int padc
)
2128 f0100e10: 55 push %ebp
2129 f0100e11: 57 push %edi
2130 f0100e12: 56 push %esi
2131 f0100e13: 53 push %ebx
2132 f0100e14: 83 ec 3c sub $0x3c,%esp
2133 f0100e17: 89 c5 mov %eax,%ebp
2134 f0100e19: 89 d7 mov %edx,%edi
2135 f0100e1b: 8b 44 24 50 mov 0x50(%esp),%eax
2136 f0100e1f: 89 44 24 2c mov %eax,0x2c(%esp)
2137 f0100e23: 8b 44 24 54 mov 0x54(%esp),%eax
2138 f0100e27: 89 44 24 28 mov %eax,0x28(%esp)
2139 f0100e2b: 8b 5c 24 5c mov 0x5c(%esp),%ebx
2140 f0100e2f: 8b 74 24 60 mov 0x60(%esp),%esi
2141 // first recursively print all preceding (more significant) digits
2143 f0100e33: b8 00 00 00 00 mov $0x0,%eax
2144 f0100e38: 3b 44 24 28 cmp 0x28(%esp),%eax
2145 f0100e3c: 72 13 jb f0100e51 <_ZL8printnumPFviPvES_yjii+0x41>
2146 f0100e3e: 8b 44 24 2c mov 0x2c(%esp),%eax
2147 f0100e42: 39 44 24 58 cmp %eax,0x58(%esp)
2148 f0100e46: 76 09 jbe f0100e51 <_ZL8printnumPFviPvES_yjii+0x41>
2149 printnum(putch, putdat, num / base, base, width - 1, padc);
2151 // print any needed pad characters before first digit
2153 f0100e48: 83 eb 01 sub $0x1,%ebx
2154 f0100e4b: 85 db test %ebx,%ebx
2155 f0100e4d: 7f 53 jg f0100ea2 <_ZL8printnumPFviPvES_yjii+0x92>
2156 f0100e4f: eb 5f jmp f0100eb0 <_ZL8printnumPFviPvES_yjii+0xa0>
2157 printnum(void (*putch)(int, void*), void *putdat,
2158 unsigned long long num, unsigned base, int width, int padc)
2160 // first recursively print all preceding (more significant) digits
2162 printnum(putch, putdat, num / base, base, width - 1, padc);
2163 f0100e51: 89 74 24 10 mov %esi,0x10(%esp)
2164 f0100e55: 83 eb 01 sub $0x1,%ebx
2165 f0100e58: 89 5c 24 0c mov %ebx,0xc(%esp)
2166 f0100e5c: 8b 44 24 58 mov 0x58(%esp),%eax
2167 f0100e60: 89 44 24 08 mov %eax,0x8(%esp)
2168 f0100e64: 8b 5c 24 08 mov 0x8(%esp),%ebx
2169 f0100e68: 8b 74 24 0c mov 0xc(%esp),%esi
2170 f0100e6c: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
2172 f0100e74: 8b 44 24 2c mov 0x2c(%esp),%eax
2173 f0100e78: 89 04 24 mov %eax,(%esp)
2174 f0100e7b: 8b 44 24 28 mov 0x28(%esp),%eax
2175 f0100e7f: 89 44 24 04 mov %eax,0x4(%esp)
2176 f0100e83: e8 98 0a 00 00 call f0101920 <__udivdi3>
2177 f0100e88: 89 5c 24 08 mov %ebx,0x8(%esp)
2178 f0100e8c: 89 74 24 0c mov %esi,0xc(%esp)
2179 f0100e90: 89 04 24 mov %eax,(%esp)
2180 f0100e93: 89 54 24 04 mov %edx,0x4(%esp)
2181 f0100e97: 89 fa mov %edi,%edx
2182 f0100e99: 89 e8 mov %ebp,%eax
2183 f0100e9b: e8 70 ff ff ff call f0100e10 <_ZL8printnumPFviPvES_yjii>
2184 f0100ea0: eb 0e jmp f0100eb0 <_ZL8printnumPFviPvES_yjii+0xa0>
2186 // print any needed pad characters before first digit
2188 putch(padc, putdat);
2189 f0100ea2: 89 7c 24 04 mov %edi,0x4(%esp)
2190 f0100ea6: 89 34 24 mov %esi,(%esp)
2191 f0100ea9: ff d5 call *%ebp
2192 // first recursively print all preceding (more significant) digits
2194 printnum(putch, putdat, num / base, base, width - 1, padc);
2196 // print any needed pad characters before first digit
2198 f0100eab: 83 eb 01 sub $0x1,%ebx
2199 f0100eae: 75 f2 jne f0100ea2 <_ZL8printnumPFviPvES_yjii+0x92>
2200 putch(padc, putdat);
2203 // then print
this (the least significant
) digit
2204 putch
("0123456789abcdef"[num
% base
], putdat
);
2205 f0100eb0: 89 7c
24 04 mov %edi,0x4(%esp)
2206 f0100eb4: 8b 7c
24 04 mov 0x4(%esp),%edi
2207 f0100eb8: 8b 44 24 58 mov 0x58(%esp),%eax
2208 f0100ebc: 89 44 24 08 mov %eax,0x8(%esp)
2209 f0100ec0: c7
44 24 0c
00 00 00 movl
$0x0
,0xc(%esp)
2211 f0100ec8: 8b 44 24 2c
mov 0x2c(%esp),%eax
2212 f0100ecc: 89 04 24 mov %eax,(%esp)
2213 f0100ecf: 8b 44 24 28 mov 0x28(%esp),%eax
2214 f0100ed3: 89 44 24 04 mov %eax,0x4(%esp)
2215 f0100ed7: e8
54 0b 00 00 call f0101a30
<__umoddi3
>
2216 f0100edc: 89 7c
24 04 mov %edi,0x4(%esp)
2217 f0100ee0: 0f be
80 99 23 10 f0 movsbl
-0xfefdc67(%eax),%eax
2218 f0100ee7: 89 04 24 mov %eax,(%esp)
2219 f0100eea: ff d5
call *%ebp
2221 f0100eec: 83 c4
3c
add $0x3c
,%esp
2222 f0100eef: 5b pop %ebx
2223 f0100ef0: 5e
pop %esi
2224 f0100ef1: 5f
pop %edi
2225 f0100ef2: 5d
pop %ebp
2228 f0100ef4
<_ZL7getuintPPci
>:
2229 // Get an unsigned
int of various possible sizes from a varargs list
,
2230 // depending on the lflag parameter.
2231 static unsigned long long
2232 getuint
(va_list
*ap
, int lflag
)
2235 f0100ef4: 83 fa 01 cmp $0x1,%edx
2236 f0100ef7: 7e 0d jle f0100f06 <_ZL7getuintPPci+0x12>
2237 return va_arg(*ap, unsigned long long);
2238 f0100ef9: 8b 10 mov (%eax),%edx
2239 f0100efb: 8d 4a 08 lea 0x8(%edx),%ecx
2240 f0100efe: 89 08 mov %ecx,(%eax)
2241 f0100f00: 8b 02 mov (%edx),%eax
2242 f0100f02: 8b 52 04 mov 0x4(%edx),%edx
2245 f0100f06: 85 d2 test %edx,%edx
2246 f0100f08: 74 0f je f0100f19 <_ZL7getuintPPci+0x25>
2247 return va_arg(*ap, unsigned long);
2248 f0100f0a: 8b 10 mov (%eax),%edx
2249 f0100f0c: 8d 4a 04 lea 0x4(%edx),%ecx
2250 f0100f0f: 89 08 mov %ecx,(%eax)
2251 f0100f11: 8b 02 mov (%edx),%eax
2252 f0100f13: ba 00 00 00 00 mov $0x0,%edx
2255 return va_arg(*ap, unsigned int);
2256 f0100f19: 8b 10 mov (%eax),%edx
2257 f0100f1b: 8d 4a 04 lea 0x4(%edx),%ecx
2258 f0100f1e: 89 08 mov %ecx,(%eax)
2259 f0100f20: 8b 02 mov (%edx),%eax
2260 f0100f22: ba 00 00 00 00 mov $0x0,%edx
2264 f0100f28
<_ZL11sprintputchiPv
>:
2269 sprintputch
(int ch, void
*ptr)
2271 f0100f28: 8b 44 24 08 mov 0x8(%esp),%eax
2272 struct sprintbuf *b = (struct sprintbuf *) ptr;
2274 f0100f2c: 83 40 08 01 addl $0x1,0x8(%eax)
2275 if (b->buf < b->ebuf)
2276 f0100f30: 8b 10 mov (%eax),%edx
2277 f0100f32: 3b 50 04 cmp 0x4(%eax),%edx
2278 f0100f35: 73 0b jae f0100f42 <_ZL11sprintputchiPv+0x1a>
2280 f0100f37: 8b 4c 24 04 mov 0x4(%esp),%ecx
2281 f0100f3b: 88 0a mov %cl,(%edx)
2282 f0100f3d: 83 c2 01 add $0x1,%edx
2283 f0100f40: 89 10 mov %edx,(%eax)
2284 f0100f42: f3 c3 repz ret
2286 f0100f44 <_Z8printfmtPFviPvES_PKcz>:
2291 printfmt
(void
(*putch
)(int, void
*), void
*putdat
, const char
*fmt
, ...
)
2293 f0100f44: 83 ec 1c sub $0x1c,%esp
2297 f0100f47: 8d 44 24 2c lea 0x2c(%esp),%eax
2298 vprintfmt(putch, putdat, fmt, ap);
2299 f0100f4b: 89 44 24 0c mov %eax,0xc(%esp)
2300 f0100f4f: 8b 44 24 28 mov 0x28(%esp),%eax
2301 f0100f53: 89 44 24 08 mov %eax,0x8(%esp)
2302 f0100f57: 8b 44 24 24 mov 0x24(%esp),%eax
2303 f0100f5b: 89 44 24 04 mov %eax,0x4(%esp)
2304 f0100f5f: 8b 44 24 20 mov 0x20(%esp),%eax
2305 f0100f63: 89 04 24 mov %eax,(%esp)
2306 f0100f66: e8 04 00 00 00 call f0100f6f <_Z9vprintfmtPFviPvES_PKcPc>
2309 f0100f6b: 83 c4
1c
add $0x1c
,%esp
2312 f0100f6f
<_Z9vprintfmtPFviPvES_PKcPc
>:
2313 // Main function to format
and print a string.
2314 void printfmt
(void
(*putch
)(int, void
*), void
*putdat
, const char
*fmt
, ...
);
2317 vprintfmt
(void
(*putch
)(int, void
*), void
*putdat
, const char
*fmt
, va_list ap
)
2319 f0100f6f: 55 push %ebp
2320 f0100f70: 57 push %edi
2321 f0100f71: 56 push %esi
2322 f0100f72: 53 push %ebx
2323 f0100f73: 83 ec 4c sub $0x4c,%esp
2324 f0100f76: 8b 6c 24 60 mov 0x60(%esp),%ebp
2325 f0100f7a: 8b 5c 24 64 mov 0x64(%esp),%ebx
2329 // (unsigned) hexadecimal
2331 num = getuint(&ap, lflag);
2332 f0100f7e: 89 6c 24 28 mov %ebp,0x28(%esp)
2333 f0100f82: 89 dd mov %ebx,%ebp
2334 unsigned long long num;
2335 int base, lflag, width, precision, altflag;
2339 while ((ch = *(unsigned char *) fmt++) != '%') {
2340 f0100f84: 8b 7c 24 68 mov 0x68(%esp),%edi
2341 f0100f88: 0f b6 07 movzbl (%edi),%eax
2342 f0100f8b: 89 fb mov %edi,%ebx
2343 f0100f8d: 83 c3 01 add $0x1,%ebx
2344 f0100f90: 83 f8 25 cmp $0x25,%eax
2345 f0100f93: 74 2a je f0100fbf <_Z9vprintfmtPFviPvES_PKcPc+0x50>
2347 f0100f95: 85 c0 test %eax,%eax
2348 f0100f97: 75 0e jne f0100fa7 <_Z9vprintfmtPFviPvES_PKcPc+0x38>
2349 f0100f99: e9 08 04 00 00 jmp f01013a6 <_Z9vprintfmtPFviPvES_PKcPc+0x437>
2350 f0100f9e: 85 c0 test %eax,%eax
2351 f0100fa0: 75 09 jne f0100fab <_Z9vprintfmtPFviPvES_PKcPc+0x3c>
2352 f0100fa2: e9 ff 03 00 00 jmp f01013a6 <_Z9vprintfmtPFviPvES_PKcPc+0x437>
2353 f0100fa7: 8b 74 24 28 mov 0x28(%esp),%esi
2356 f0100fab: 89 6c 24 04 mov %ebp,0x4(%esp)
2357 f0100faf: 89 04 24 mov %eax,(%esp)
2358 f0100fb2: ff d6 call *%esi
2359 unsigned long long num;
2360 int base, lflag, width, precision, altflag;
2364 while ((ch = *(unsigned char *) fmt++) != '%') {
2365 f0100fb4: 0f b6 03 movzbl (%ebx),%eax
2366 f0100fb7: 83 c3 01 add $0x1,%ebx
2367 f0100fba: 83 f8 25 cmp $0x25,%eax
2368 f0100fbd: 75 df jne f0100f9e <_Z9vprintfmtPFviPvES_PKcPc+0x2f>
2369 precision = va_arg(ap, int);
2370 goto process_precision;
2375 f0100fbf: c6 44 24 30 20 movb $0x20,0x30(%esp)
2376 f0100fc4: bf 00 00 00 00 mov $0x0,%edi
2377 f0100fc9: be ff ff ff ff mov $0xffffffff,%esi
2378 f0100fce: c7 44 24 2c ff ff ff movl $0xffffffff,0x2c(%esp)
2380 f0100fd6: b9 00 00 00 00 mov $0x0,%ecx
2381 f0100fdb: 89 7c 24 34 mov %edi,0x34(%esp)
2382 f0100fdf: eb 2d jmp f010100e <_Z9vprintfmtPFviPvES_PKcPc+0x9f>
2388 switch (ch = *(unsigned char *) fmt++) {
2389 f0100fe1: 8b 5c 24 68 mov 0x68(%esp),%ebx
2391 // flag to pad on the right
2394 f0100fe5: c6 44 24 30 2d movb $0x2d,0x30(%esp)
2395 f0100fea: eb 22 jmp f010100e <_Z9vprintfmtPFviPvES_PKcPc+0x9f>
2401 switch (ch = *(unsigned char *) fmt++) {
2402 f0100fec: 8b 5c 24 68 mov 0x68(%esp),%ebx
2406 // flag to pad with 0's instead of spaces
2409 f0100ff0: c6 44 24 30 30 movb $0x30,0x30(%esp)
2410 f0100ff5: eb 17 jmp f010100e <_Z9vprintfmtPFviPvES_PKcPc+0x9f>
2416 switch (ch = *(unsigned char *) fmt++) {
2417 f0100ff7: 8b 5c 24 68 mov 0x68(%esp),%ebx
2418 precision = va_arg(ap, int);
2419 goto process_precision;
2424 f0100ffb: c7 44 24 2c 00 00 00 movl $0x0,0x2c(%esp)
2426 f0101003: eb 09 jmp f010100e <_Z9vprintfmtPFviPvES_PKcPc+0x9f>
2432 width = precision, precision = -1;
2433 f0101005: 89 74 24 2c mov %esi,0x2c(%esp)
2434 f0101009: be ff ff ff ff mov $0xffffffff,%esi
2440 switch (ch = *(unsigned char *) fmt++) {
2441 f010100e: 0f b6 03 movzbl (%ebx),%eax
2442 f0101011: 0f b6 d0 movzbl %al,%edx
2443 f0101014: 8d 7b 01 lea 0x1(%ebx),%edi
2444 f0101017: 89 7c 24 68 mov %edi,0x68(%esp)
2445 f010101b: 83 e8 23 sub $0x23,%eax
2446 f010101e: 3c 55 cmp $0x55,%al
2447 f0101020: 0f 87 30 03 00 00 ja f0101356 <_Z9vprintfmtPFviPvES_PKcPc+0x3e7>
2448 f0101026: 0f b6 c0 movzbl %al,%eax
2449 f0101029: ff 24 85 28 24 10 f0 jmp *-0xfefdbd8(,%eax,4)
2454 for (precision = 0; ; ++fmt) {
2455 precision = precision * 10 + ch - '0';
2456 f0101030: 8d 72 d0 lea -0x30(%edx),%esi
2458 f0101033: 0f be 43 01 movsbl 0x1(%ebx),%eax
2459 if (ch < '0' || ch > '9')
2460 f0101037: 8d 50 d0 lea -0x30(%eax),%edx
2466 switch (ch = *(unsigned char *) fmt++) {
2467 f010103a: 8b 5c 24 68 mov 0x68(%esp),%ebx
2470 for (precision = 0; ; ++fmt) {
2471 precision = precision * 10 + ch - '0';
2473 if (ch < '0' || ch > '9')
2474 f010103e: 83 fa 09 cmp $0x9,%edx
2475 f0101041: 77 53 ja f0101096 <_Z9vprintfmtPFviPvES_PKcPc+0x127>
2481 switch (ch = *(unsigned char *) fmt++) {
2482 f0101043: 8b 7c 24 34 mov 0x34(%esp),%edi
2488 for (precision = 0; ; ++fmt) {
2489 f0101047: 83 c3 01 add $0x1,%ebx
2490 precision = precision * 10 + ch - '0';
2491 f010104a: 8d 14 b6 lea (%esi,%esi,4),%edx
2492 f010104d: 8d 74 50 d0 lea -0x30(%eax,%edx,2),%esi
2494 f0101051: 0f be 03 movsbl (%ebx),%eax
2495 if (ch < '0' || ch > '9')
2496 f0101054: 8d 50 d0 lea -0x30(%eax),%edx
2497 f0101057: 83 fa 09 cmp $0x9,%edx
2498 f010105a: 76 eb jbe f0101047 <_Z9vprintfmtPFviPvES_PKcPc+0xd8>
2499 f010105c: 89 7c 24 34 mov %edi,0x34(%esp)
2500 f0101060: eb 34 jmp f0101096 <_Z9vprintfmtPFviPvES_PKcPc+0x127>
2503 goto process_precision
;
2506 precision
= va_arg
(ap
, int);
2507 f0101062: 8b 44 24 6c
mov 0x6c(%esp),%eax
2508 f0101066: 8d
50 04 lea 0x4(%eax),%edx
2509 f0101069: 89 54 24 6c
mov %edx,0x6c(%esp)
2510 f010106d: 8b 30 mov (%eax),%esi
2516 switch
(ch = *(unsigned char
*) fmt
++) {
2517 f010106f: 8b 5c 24 68 mov 0x68(%esp),%ebx
2519 goto process_precision
;
2522 precision
= va_arg
(ap
, int);
2523 goto process_precision
;
2524 f0101073: eb
21 jmp f0101096
<_Z9vprintfmtPFviPvES_PKcPc
+0x127>
2530 switch
(ch = *(unsigned char
*) fmt
++) {
2531 f0101075: 8b 5c 24 68 mov 0x68(%esp),%ebx
2533 precision = va_arg(ap, int);
2534 goto process_precision;
2538 f0101079: 83 7c 24 2c 00 cmpl $0x0,0x2c(%esp)
2539 f010107e: 79 8e jns f010100e <_Z9vprintfmtPFviPvES_PKcPc+0x9f>
2540 f0101080: e9 72 ff ff ff jmp f0100ff7 <_Z9vprintfmtPFviPvES_PKcPc+0x88>
2546 switch (ch = *(unsigned char *) fmt++) {
2547 f0101085: 8b 5c 24 68 mov 0x68(%esp),%ebx
2554 f0101089: c7 44 24 34 01 00 00 movl $0x1,0x34(%esp)
2557 f0101091: e9 78 ff ff ff jmp f010100e <_Z9vprintfmtPFviPvES_PKcPc+0x9f>
2561 f0101096: 83 7c 24 2c 00 cmpl $0x0,0x2c(%esp)
2562 f010109b: 0f 89 6d ff ff ff jns f010100e <_Z9vprintfmtPFviPvES_PKcPc+0x9f>
2563 f01010a1: e9 5f ff ff ff jmp f0101005 <_Z9vprintfmtPFviPvES_PKcPc+0x96>
2564 width = precision, precision = -1;
2567 // long flag (doubled for long long)
2570 f01010a6: 83 c1 01 add $0x1,%ecx
2576 switch (ch = *(unsigned char *) fmt++) {
2577 f01010a9: 8b 5c 24 68 mov 0x68(%esp),%ebx
2580 // long flag (doubled for long long)
2584 f01010ad: e9 5c ff ff ff jmp f010100e <_Z9vprintfmtPFviPvES_PKcPc+0x9f>
2588 putch(va_arg(ap, int), putdat);
2589 f01010b2: 8b 44 24 6c mov 0x6c(%esp),%eax
2590 f01010b6: 8d 50 04 lea 0x4(%eax),%edx
2591 f01010b9: 89 54 24 6c mov %edx,0x6c(%esp)
2592 f01010bd: 89 6c 24 04 mov %ebp,0x4(%esp)
2593 f01010c1: 8b 00 mov (%eax),%eax
2594 f01010c3: 89 04 24 mov %eax,(%esp)
2595 f01010c6: ff 54 24 28 call *0x28(%esp)
2597 f01010ca: e9 b5 fe ff ff jmp f0100f84 <_Z9vprintfmtPFviPvES_PKcPc+0x15>
2601 err = va_arg(ap, int);
2602 f01010cf: 8b 44 24 6c mov 0x6c(%esp),%eax
2603 f01010d3: 8d 50 04 lea 0x4(%eax),%edx
2604 f01010d6: 89 54 24 6c mov %edx,0x6c(%esp)
2605 f01010da: 8b 00 mov (%eax),%eax
2606 f01010dc: 89 c2 mov %eax,%edx
2607 f01010de: c1 fa 1f sar $0x1f,%edx
2608 f01010e1: 31 d0 xor %edx,%eax
2609 f01010e3: 29 d0 sub %edx,%eax
2612 if (err > MAXERROR || (p = error_string[err]) == NULL)
2613 f01010e5: 83 f8 06 cmp $0x6,%eax
2614 f01010e8: 7f 0f jg f01010f9 <_Z9vprintfmtPFviPvES_PKcPc+0x18a>
2615 f01010ea: 8b 14 85 80 25 10 f0 mov -0xfefda80(,%eax,4),%edx
2616 f01010f1: 85 d2 test %edx,%edx
2617 f01010f3: 0f 85 8c 02 00 00 jne f0101385 <_Z9vprintfmtPFviPvES_PKcPc+0x416>
2618 printfmt(putch, putdat, "error %d", err);
2619 f01010f9: 89 44 24 0c mov %eax,0xc(%esp)
2620 f01010fd: c7 44 24 08 b1 23 10 movl $0xf01023b1,0x8(%esp)
2622 f0101105: 89 6c 24 04 mov %ebp,0x4(%esp)
2623 f0101109: 8b 7c 24 28 mov 0x28(%esp),%edi
2624 f010110d: 89 3c 24 mov %edi,(%esp)
2625 f0101110: e8 2f fe ff ff call f0100f44 <_Z8printfmtPFviPvES_PKcz>
2626 f0101115: e9 6a fe ff ff jmp f0100f84 <_Z9vprintfmtPFviPvES_PKcPc+0x15>
2627 f010111a: 8b 7c 24 34 mov 0x34(%esp),%edi
2633 switch (ch = *(unsigned char *) fmt++) {
2634 f010111e: 89 f1 mov %esi,%ecx
2635 f0101120: 8b 44 24 2c mov 0x2c(%esp),%eax
2636 f0101124: 89 44 24 34 mov %eax,0x34(%esp)
2637 printfmt(putch, putdat, "%s", p);
2642 if ((p = va_arg(ap, char *)) == NULL)
2643 f0101128: 8b 44 24 6c mov 0x6c(%esp),%eax
2644 f010112c: 8d 50 04 lea 0x4(%eax),%edx
2645 f010112f: 89 54 24 6c mov %edx,0x6c(%esp)
2646 f0101133: 8b 18 mov (%eax),%ebx
2647 f0101135: 85 db test %ebx,%ebx
2648 f0101137: 75 05 jne f010113e <_Z9vprintfmtPFviPvES_PKcPc+0x1cf>
2650 f0101139: bb aa 23 10 f0 mov $0xf01023aa,%ebx
2651 if (width > 0 && padc != '-')
2652 f010113e: 83 7c 24 34 00 cmpl $0x0,0x34(%esp)
2653 f0101143: 0f 8e 83 00 00 00 jle f01011cc <_Z9vprintfmtPFviPvES_PKcPc+0x25d>
2654 f0101149: 80 7c 24 30 2d cmpb $0x2d,0x30(%esp)
2655 f010114e: 74 7c je f01011cc <_Z9vprintfmtPFviPvES_PKcPc+0x25d>
2656 for (width -= strnlen(p, precision); width > 0; width--)
2657 f0101150: 89 4c 24 04 mov %ecx,0x4(%esp)
2658 f0101154: 89 1c 24 mov %ebx,(%esp)
2659 f0101157: e8 dd 03 00 00 call f0101539 <_Z7strnlenPKcj>
2660 f010115c: 8b 54 24 34 mov 0x34(%esp),%edx
2661 f0101160: 29 c2 sub %eax,%edx
2662 f0101162: 89 54 24 2c mov %edx,0x2c(%esp)
2663 f0101166: 85 d2 test %edx,%edx
2664 f0101168: 7e 62 jle f01011cc <_Z9vprintfmtPFviPvES_PKcPc+0x25d>
2665 putch(padc, putdat);
2666 f010116a: 0f be 4c 24 30 movsbl 0x30(%esp),%ecx
2667 f010116f: 89 5c 24 34 mov %ebx,0x34(%esp)
2668 f0101173: 89 d3 mov %edx,%ebx
2669 f0101175: 89 7c 24 38 mov %edi,0x38(%esp)
2670 f0101179: 89 74 24 3c mov %esi,0x3c(%esp)
2671 f010117d: 8b 7c 24 28 mov 0x28(%esp),%edi
2672 f0101181: 89 ce mov %ecx,%esi
2673 f0101183: 89 6c 24 04 mov %ebp,0x4(%esp)
2674 f0101187: 89 34 24 mov %esi,(%esp)
2675 f010118a: ff d7 call *%edi
2678 if ((p = va_arg(ap, char *)) == NULL)
2680 if (width > 0 && padc != '-')
2681 for (width -= strnlen(p, precision); width > 0; width--)
2682 f010118c: 83 eb 01 sub $0x1,%ebx
2683 f010118f: 75 f2 jne f0101183 <_Z9vprintfmtPFviPvES_PKcPc+0x214>
2684 f0101191: 89 5c 24 2c mov %ebx,0x2c(%esp)
2685 f0101195: 8b 5c 24 34 mov 0x34(%esp),%ebx
2686 f0101199: 8b 7c 24 38 mov 0x38(%esp),%edi
2687 f010119d: 8b 74 24 3c mov 0x3c(%esp),%esi
2688 f01011a1: eb 29 jmp f01011cc <_Z9vprintfmtPFviPvES_PKcPc+0x25d>
2689 putch(padc, putdat);
2690 for (; (ch = *p++) != '\0' && (precision < 0 || --precision >= 0); width--)
2691 if (altflag && (ch < ' ' || ch > '~'))
2692 f01011a3: 8d 50 e0 lea -0x20(%eax),%edx
2693 f01011a6: 83 fa 5e cmp $0x5e,%edx
2694 f01011a9: 76 11 jbe f01011bc <_Z9vprintfmtPFviPvES_PKcPc+0x24d>
2696 f01011ab: 89 6c 24 04 mov %ebp,0x4(%esp)
2697 f01011af: c7 04 24 3f 00 00 00 movl $0x3f,(%esp)
2698 f01011b6: ff 54 24 28 call *0x28(%esp)
2699 f01011ba: eb 0b jmp f01011c7 <_Z9vprintfmtPFviPvES_PKcPc+0x258>
2702 f01011bc: 89 6c 24 04 mov %ebp,0x4(%esp)
2703 f01011c0: 89 04 24 mov %eax,(%esp)
2704 f01011c3: ff 54 24 28 call *0x28(%esp)
2705 if ((p = va_arg(ap, char *)) == NULL)
2707 if (width > 0 && padc != '-')
2708 for (width -= strnlen(p, precision); width > 0; width--)
2709 putch(padc, putdat);
2710 for (; (ch = *p++) != '\0' && (precision < 0 || --precision >= 0); width--)
2711 f01011c7: 83 6c 24 2c 01 subl $0x1,0x2c(%esp)
2712 f01011cc: 0f be 03 movsbl (%ebx),%eax
2713 f01011cf: 83 c3 01 add $0x1,%ebx
2714 f01011d2: 85 c0 test %eax,%eax
2715 f01011d4: 74 0f je f01011e5 <_Z9vprintfmtPFviPvES_PKcPc+0x276>
2716 f01011d6: 85 f6 test %esi,%esi
2717 f01011d8: 78 05 js f01011df <_Z9vprintfmtPFviPvES_PKcPc+0x270>
2718 f01011da: 83 ee 01 sub $0x1,%esi
2719 f01011dd: 78 0c js f01011eb <_Z9vprintfmtPFviPvES_PKcPc+0x27c>
2720 if (altflag && (ch < ' ' || ch > '~'))
2721 f01011df: 85 ff test %edi,%edi
2722 f01011e1: 75 c0 jne f01011a3 <_Z9vprintfmtPFviPvES_PKcPc+0x234>
2723 f01011e3: eb d7 jmp f01011bc <_Z9vprintfmtPFviPvES_PKcPc+0x24d>
2724 if ((p = va_arg(ap, char *)) == NULL)
2726 if (width > 0 && padc != '-')
2727 for (width -= strnlen(p, precision); width > 0; width--)
2728 putch(padc, putdat);
2729 for (; (ch = *p++) != '\0' && (precision < 0 || --precision >= 0); width--)
2730 f01011e5: 8b 44 24 2c mov 0x2c(%esp),%eax
2731 f01011e9: eb 04 jmp f01011ef <_Z9vprintfmtPFviPvES_PKcPc+0x280>
2732 f01011eb: 8b 44 24 2c mov 0x2c(%esp),%eax
2733 if (altflag && (ch < ' ' || ch > '~'))
2737 for (; width > 0; width--)
2738 f01011ef: 85 c0 test %eax,%eax
2739 f01011f1: 0f 8e 8d fd ff ff jle f0100f84 <_Z9vprintfmtPFviPvES_PKcPc+0x15>
2740 f01011f7: 8b 5c 24 2c mov 0x2c(%esp),%ebx
2741 f01011fb: 8b 74 24 28 mov 0x28(%esp),%esi
2743 f01011ff: 89 6c 24 04 mov %ebp,0x4(%esp)
2744 f0101203: c7 04 24 20 00 00 00 movl $0x20,(%esp)
2745 f010120a: ff d6 call *%esi
2746 for (; (ch = *p++) != '\0' && (precision < 0 || --precision >= 0); width--)
2747 if (altflag && (ch < ' ' || ch > '~'))
2751 for (; width > 0; width--)
2752 f010120c: 83 eb 01 sub $0x1,%ebx
2753 f010120f: 85 db test %ebx,%ebx
2754 f0101211: 7f ec jg f01011ff <_Z9vprintfmtPFviPvES_PKcPc+0x290>
2755 f0101213: e9 6c fd ff ff jmp f0100f84 <_Z9vprintfmtPFviPvES_PKcPc+0x15>
2756 // Same as getuint but signed - can't use getuint
2757 // because of sign extension
2759 getint(va_list *ap, int lflag)
2762 f0101218: 83 f9 01 cmp $0x1,%ecx
2763 f010121b: 7e 12 jle f010122f <_Z9vprintfmtPFviPvES_PKcPc+0x2c0>
2764 return va_arg(*ap, long long);
2765 f010121d: 8b 44 24 6c mov 0x6c(%esp),%eax
2766 f0101221: 8d 50 08 lea 0x8(%eax),%edx
2767 f0101224: 89 54 24 6c mov %edx,0x6c(%esp)
2768 f0101228: 8b 30 mov (%eax),%esi
2769 f010122a: 8b 78 04 mov 0x4(%eax),%edi
2770 f010122d: eb 2a jmp f0101259 <_Z9vprintfmtPFviPvES_PKcPc+0x2ea>
2772 f010122f: 85 c9 test %ecx,%ecx
2773 f0101231: 74 14 je f0101247 <_Z9vprintfmtPFviPvES_PKcPc+0x2d8>
2774 return va_arg(*ap, long);
2775 f0101233: 8b 44 24 6c mov 0x6c(%esp),%eax
2776 f0101237: 8d 50 04 lea 0x4(%eax),%edx
2777 f010123a: 89 54 24 6c mov %edx,0x6c(%esp)
2778 f010123e: 8b 30 mov (%eax),%esi
2779 f0101240: 89 f7 mov %esi,%edi
2780 f0101242: c1 ff 1f sar $0x1f,%edi
2781 f0101245: eb 12 jmp f0101259 <_Z9vprintfmtPFviPvES_PKcPc+0x2ea>
2783 return va_arg(*ap, int);
2784 f0101247: 8b 44 24 6c mov 0x6c(%esp),%eax
2785 f010124b: 8d 50 04 lea 0x4(%eax),%edx
2786 f010124e: 89 54 24 6c mov %edx,0x6c(%esp)
2787 f0101252: 8b 30 mov (%eax),%esi
2788 f0101254: 89 f7 mov %esi,%edi
2789 f0101256: c1 ff 1f sar $0x1f,%edi
2794 num = getint(&ap, lflag);
2795 if ((long long) num < 0) {
2796 f0101259: 85 ff test %edi,%edi
2797 f010125b: 78 0e js f010126b <_Z9vprintfmtPFviPvES_PKcPc+0x2fc>
2803 num = getint(&ap, lflag);
2804 f010125d: 89 f0 mov %esi,%eax
2805 f010125f: 89 fa mov %edi,%edx
2806 if ((long long) num < 0) {
2808 num = -(long long) num;
2811 f0101261: bb
0a
00 00 00 mov $0xa
,%ebx
2812 f0101266: e9 af
00 00 00 jmp f010131a
<_Z9vprintfmtPFviPvES_PKcPc
+0x3ab>
2816 num
= getint
(&ap
, lflag
);
2817 if
((long long
) num
< 0) {
2819 f010126b: 89 6c 24 04 mov %ebp,0x4(%esp)
2820 f010126f: c7 04 24 2d 00 00 00 movl $0x2d,(%esp)
2821 f0101276: ff 54 24 28 call *0x28(%esp)
2822 num = -(long long) num;
2823 f010127a: 89 f0 mov %esi,%eax
2824 f010127c: 89 fa mov %edi,%edx
2825 f010127e: f7 d8 neg %eax
2826 f0101280: 83 d2 00 adc $0x0,%edx
2827 f0101283: f7 da neg %edx
2830 f0101285: bb
0a
00 00 00 mov $0xa
,%ebx
2831 f010128a: e9
8b 00 00 00 jmp f010131a
<_Z9vprintfmtPFviPvES_PKcPc
+0x3ab>
2836 num
= getuint
(&ap
, lflag
);
2837 f010128f: 89 ca
mov %ecx,%edx
2838 f0101291: 8d
44 24 6c
lea 0x6c(%esp),%eax
2839 f0101295: e8
5a fc ff ff
call f0100ef4
<_ZL7getuintPPci
>
2841 f010129a: bb
0a
00 00 00 mov $0xa
,%ebx
2843 f010129f: eb
79 jmp f010131a
<_Z9vprintfmtPFviPvES_PKcPc
+0x3ab>
2847 // Replace
this with your code.
2849 f01012a1: 89 6c
24 04 mov %ebp,0x4(%esp)
2850 f01012a5: c7
04 24 58 00 00 00 movl
$0x58
,(%esp)
2851 f01012ac: ff
54 24 28 call *0x28(%esp)
2853 f01012b0: 89 6c
24 04 mov %ebp,0x4(%esp)
2854 f01012b4: c7
04 24 58 00 00 00 movl
$0x58
,(%esp)
2855 f01012bb: ff
54 24 28 call *0x28(%esp)
2857 f01012bf: 89 6c
24 04 mov %ebp,0x4(%esp)
2858 f01012c3: c7
04 24 58 00 00 00 movl
$0x58
,(%esp)
2859 f01012ca: ff
54 24 28 call *0x28(%esp)
2861 f01012ce: e9 b1 fc ff ff
jmp f0100f84
<_Z9vprintfmtPFviPvES_PKcPc
+0x15>
2866 f01012d3: 89 6c
24 04 mov %ebp,0x4(%esp)
2867 f01012d7: c7
04 24 30 00 00 00 movl
$0x30
,(%esp)
2868 f01012de: ff
54 24 28 call *0x28(%esp)
2870 f01012e2: 89 6c
24 04 mov %ebp,0x4(%esp)
2871 f01012e6: c7
04 24 78 00 00 00 movl
$0x78
,(%esp)
2872 f01012ed: ff
54 24 28 call *0x28(%esp)
2873 num
= (unsigned long long
)
2874 (uintptr_t
) va_arg
(ap
, void
*);
2875 f01012f1: 8b 44 24 6c
mov 0x6c(%esp),%eax
2876 f01012f5: 8d
50 04 lea 0x4(%eax),%edx
2877 f01012f8: 89 54 24 6c
mov %edx,0x6c(%esp)
2878 f01012fc: 8b 00 mov (%eax),%eax
2879 f01012fe: ba
00 00 00 00 mov $0x0
,%edx
2881 f0101303: bb
10 00 00 00 mov $0x10
,%ebx
2883 f0101308: eb
10 jmp f010131a
<_Z9vprintfmtPFviPvES_PKcPc
+0x3ab>
2885 // (unsigned
) hexadecimal
2887 num
= getuint
(&ap
, lflag
);
2888 f010130a: 89 ca
mov %ecx,%edx
2889 f010130c: 8d
44 24 6c
lea 0x6c(%esp),%eax
2890 f0101310: e8 df fb ff ff
call f0100ef4
<_ZL7getuintPPci
>
2892 f0101315: bb
10 00 00 00 mov $0x10
,%ebx
2894 printnum
(putch
, putdat
, num
, base
, width, padc
);
2895 f010131a: 0f be
4c
24 30 movsbl
0x30(%esp),%ecx
2896 f010131f: 89 4c
24 10 mov %ecx,0x10(%esp)
2897 f0101323: 8b 7c
24 2c
mov 0x2c(%esp),%edi
2898 f0101327: 89 7c
24 0c
mov %edi,0xc(%esp)
2899 f010132b: 89 5c
24 08 mov %ebx,0x8(%esp)
2900 f010132f: 89 04 24 mov %eax,(%esp)
2901 f0101332: 89 54 24 04 mov %edx,0x4(%esp)
2902 f0101336: 89 ea
mov %ebp,%edx
2903 f0101338: 8b 44 24 28 mov 0x28(%esp),%eax
2904 f010133c: e8 cf fa ff ff
call f0100e10
<_ZL8printnumPFviPvES_yjii
>
2906 f0101341: e9
3e fc ff ff
jmp f0100f84
<_Z9vprintfmtPFviPvES_PKcPc
+0x15>
2908 // escaped
'%' character
2911 f0101346: 89 6c
24 04 mov %ebp,0x4(%esp)
2912 f010134a: 89 14 24 mov %edx,(%esp)
2913 f010134d: ff
54 24 28 call *0x28(%esp)
2915 f0101351: e9
2e fc ff ff
jmp f0100f84
<_Z9vprintfmtPFviPvES_PKcPc
+0x15>
2917 // unrecognized escape sequence
- just print it literally
2920 f0101356: 89 6c
24 04 mov %ebp,0x4(%esp)
2921 f010135a: c7
04 24 25 00 00 00 movl
$0x25
,(%esp)
2922 f0101361: ff
54 24 28 call *0x28(%esp)
2923 for
(fmt
--; fmt[-1] != '%'; fmt--)
2924 f0101365: 89 5c
24 68 mov %ebx,0x68(%esp)
2925 f0101369: 80 7b ff
25 cmpb
$0x25
,-0x1(%ebx)
2926 f010136d: 0f
84 11 fc ff ff
je f0100f84
<_Z9vprintfmtPFviPvES_PKcPc
+0x15>
2927 f0101373: 83 eb
01 sub $0x1
,%ebx
2928 f0101376: 80 7b ff
25 cmpb
$0x25
,-0x1(%ebx)
2929 f010137a: 75 f7
jne f0101373
<_Z9vprintfmtPFviPvES_PKcPc
+0x404>
2930 f010137c: 89 5c
24 68 mov %ebx,0x68(%esp)
2931 f0101380: e9 ff fb ff ff
jmp f0100f84
<_Z9vprintfmtPFviPvES_PKcPc
+0x15>
2934 if
(err
> MAXERROR ||
(p
= error_string
[err
]) == NULL
)
2935 printfmt
(putch
, putdat
, "error %d", err
);
2937 printfmt
(putch
, putdat
, "%s", p
);
2938 f0101385: 89 54 24 0c
mov %edx,0xc(%esp)
2939 f0101389: c7
44 24 08 ba
23 10 movl
$0xf01023ba
,0x8(%esp)
2941 f0101391: 89 6c
24 04 mov %ebp,0x4(%esp)
2942 f0101395: 8b 7c
24 28 mov 0x28(%esp),%edi
2943 f0101399: 89 3c
24 mov %edi,(%esp)
2944 f010139c: e8 a3 fb ff ff
call f0100f44
<_Z8printfmtPFviPvES_PKcz
>
2945 f01013a1: e9 de fb ff ff
jmp f0100f84
<_Z9vprintfmtPFviPvES_PKcPc
+0x15>
2946 for
(fmt
--; fmt[-1] != '%'; fmt--)
2952 f01013a6: 83 c4
4c
add $0x4c
,%esp
2953 f01013a9: 5b pop %ebx
2954 f01013aa: 5e
pop %esi
2955 f01013ab: 5f
pop %edi
2956 f01013ac: 5d
pop %ebp
2959 f01013ae
<_Z9vsnprintfPciPKcS_
>:
2964 vsnprintf
(char
*buf
, int n
, const char
*fmt
, va_list ap
)
2966 f01013ae: 83 ec 2c sub $0x2c,%esp
2967 f01013b1: 8b 44 24 30 mov 0x30(%esp),%eax
2968 f01013b5: 8b 54 24 34 mov 0x34(%esp),%edx
2969 struct sprintbuf b = {buf, buf+n-1, 0};
2970 f01013b9: c7
44 24 1c
00 00 00 movl
$0x0
,0x1c(%esp)
2972 f01013c1: 89 44 24 14 mov %eax,0x14(%esp)
2973 f01013c5: 8d
4c
10 ff
lea -0x1(%eax,%edx,1),%ecx
2974 f01013c9: 89 4c
24 18 mov %ecx,0x18(%esp)
2976 if
(buf
== NULL || n
< 1)
2977 f01013cd: 85 c0
test %eax,%eax
2978 f01013cf: 74 35 je f0101406
<_Z9vsnprintfPciPKcS_
+0x58>
2979 f01013d1: 85 d2
test %edx,%edx
2980 f01013d3: 7e
31 jle f0101406
<_Z9vsnprintfPciPKcS_
+0x58>
2983 // print the string to the buffer
2984 vprintfmt
(sprintputch
, &b
, fmt
, ap
);
2985 f01013d5: 8b 44 24 3c
mov 0x3c(%esp),%eax
2986 f01013d9: 89 44 24 0c
mov %eax,0xc(%esp)
2987 f01013dd: 8b 44 24 38 mov 0x38(%esp),%eax
2988 f01013e1: 89 44 24 08 mov %eax,0x8(%esp)
2989 f01013e5: 8d
44 24 14 lea 0x14(%esp),%eax
2990 f01013e9: 89 44 24 04 mov %eax,0x4(%esp)
2991 f01013ed: c7
04 24 28 0f
10 f0 movl
$0xf0100f28
,(%esp)
2992 f01013f4: e8
76 fb ff ff
call f0100f6f
<_Z9vprintfmtPFviPvES_PKcPc
>
2994 // null terminate the buffer
2996 f01013f9: 8b 44 24 14 mov 0x14(%esp),%eax
2997 f01013fd: c6
00 00 movb
$0x0
,(%eax)
3000 f0101400: 8b 44 24 1c
mov 0x1c(%esp),%eax
3001 f0101404: eb
05 jmp f010140b
<_Z9vsnprintfPciPKcS_
+0x5d>
3002 vsnprintf
(char
*buf
, int n
, const char
*fmt
, va_list ap
)
3004 struct sprintbuf b = {buf, buf+n-1, 0};
3006 if
(buf
== NULL || n
< 1)
3008 f0101406: b8 fd ff ff ff
mov $0xfffffffd
,%eax
3010 // null terminate the buffer
3015 f010140b: 83 c4
2c
add $0x2c
,%esp
3018 f010140f
<_Z8snprintfPciPKcz
>:
3021 snprintf
(char
*buf
, int n
, const char
*fmt
, ...
)
3023 f010140f: 83 ec 1c sub $0x1c,%esp
3028 f0101412: 8d 44 24 2c lea 0x2c(%esp),%eax
3029 rc = vsnprintf(buf, n, fmt, ap);
3030 f0101416: 89 44 24 0c mov %eax,0xc(%esp)
3031 f010141a: 8b 44 24 28 mov 0x28(%esp),%eax
3032 f010141e: 89 44 24 08 mov %eax,0x8(%esp)
3033 f0101422: 8b 44 24 24 mov 0x24(%esp),%eax
3034 f0101426: 89 44 24 04 mov %eax,0x4(%esp)
3035 f010142a: 8b 44 24 20 mov 0x20(%esp),%eax
3036 f010142e: 89 04 24 mov %eax,(%esp)
3037 f0101431: e8 78 ff ff ff call f01013ae <_Z9vsnprintfPciPKcS_>
3042 f0101436: 83 c4
1c
add $0x1c
,%esp
3044 f010143a: 00 00 add %al,(%eax)
3045 f010143c: 00 00 add %al,(%eax)
3048 f0101440
<_Z8readlinePKc
>:
3050 static char buf
[BUFLEN
];
3053 readline
(const char
*prompt
)
3055 f0101440: 57 push %edi
3056 f0101441: 56 push %esi
3057 f0101442: 53 push %ebx
3058 f0101443: 83 ec 10 sub $0x10,%esp
3059 f0101446: 8b 44 24 20 mov 0x20(%esp),%eax
3063 f010144a: 85 c0 test %eax,%eax
3064 f010144c: 74 10 je f010145e <_Z8readlinePKc+0x1e>
3065 cprintf("%s", prompt);
3066 f010144e: 89 44 24 04 mov %eax,0x4(%esp)
3067 f0101452: c7 04 24 ba 23 10 f0 movl $0xf01023ba,(%esp)
3068 f0101459: e8 e8 f6 ff ff call f0100b46 <_Z7cprintfPKcz>
3071 echoing = iscons(0) > 0;
3072 f010145e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
3073 f0101465: e8 37 f4 ff ff call f01008a1 <_Z6isconsi>
3074 f010146a: 85 c0 test %eax,%eax
3075 f010146c: 0f 9f c0 setg %al
3076 f010146f: 0f b6 c0 movzbl %al,%eax
3077 f0101472: 89 c7 mov %eax,%edi
3081 cprintf("%s", prompt);
3084 f0101474: be 00 00 00 00 mov $0x0,%esi
3085 echoing = iscons(0) > 0;
3088 f0101479: e8 13 f4 ff ff call f0100891 <_Z7getcharv>
3089 f010147e: 89 c3 mov %eax,%ebx
3091 f0101480: 85 c0 test %eax,%eax
3092 f0101482: 79 17 jns f010149b <_Z8readlinePKc+0x5b>
3093 cprintf("read error: %e\n", c);
3094 f0101484: 89 44 24 04 mov %eax,0x4(%esp)
3095 f0101488: c7 04 24 9c 25 10 f0 movl $0xf010259c,(%esp)
3096 f010148f: e8 b2 f6 ff ff call f0100b46 <_Z7cprintfPKcz>
3098 f0101494: b8 00 00 00 00 mov $0x0,%eax
3099 f0101499: eb 6f jmp f010150a <_Z8readlinePKc+0xca>
3100 } else if
((c
== '\b' || c
== '\x7f') && i
> 0) {
3101 f010149b: 83 f8 08 cmp $0x8,%eax
3102 f010149e: 74 05 je f01014a5 <_Z8readlinePKc+0x65>
3103 f01014a0: 83 f8 7f cmp $0x7f,%eax
3104 f01014a3: 75 19 jne f01014be <_Z8readlinePKc+0x7e>
3105 f01014a5: 85 f6 test %esi,%esi
3106 f01014a7: 7e 15 jle f01014be <_Z8readlinePKc+0x7e>
3108 f01014a9: 85 ff test %edi,%edi
3109 f01014ab: 74 0c je f01014b9 <_Z8readlinePKc+0x79>
3111 f01014ad: c7 04 24 08 00 00 00 movl $0x8,(%esp)
3112 f01014b4: e8 c8 f3 ff ff call f0100881 <_Z8cputchari>
3114 f01014b9: 83 ee 01 sub $0x1,%esi
3115 f01014bc: eb bb jmp f0101479 <_Z8readlinePKc+0x39>
3116 } else if
(c
>= ' ' && i
< BUFLEN
-1) {
3117 f01014be: 83 fb 1f cmp $0x1f,%ebx
3118 f01014c1: 7e 1f jle f01014e2 <_Z8readlinePKc+0xa2>
3119 f01014c3: 81 fe fe 03 00 00 cmp $0x3fe,%esi
3120 f01014c9: 7f 17 jg f01014e2 <_Z8readlinePKc+0xa2>
3122 f01014cb: 85 ff test %edi,%edi
3123 f01014cd: 74 08 je f01014d7 <_Z8readlinePKc+0x97>
3125 f01014cf: 89 1c 24 mov %ebx,(%esp)
3126 f01014d2: e8 aa f3 ff ff call f0100881 <_Z8cputchari>
3128 f01014d7: 88 9e a0 62 11 f0 mov %bl,-0xfee9d60(%esi)
3129 f01014dd: 83 c6 01 add $0x1,%esi
3130 f01014e0: eb 97 jmp f0101479 <_Z8readlinePKc+0x39>
3131 } else if
(c
== '\n' || c
== '\r') {
3132 f01014e2: 83 fb 0a cmp $0xa,%ebx
3133 f01014e5: 74 05 je f01014ec <_Z8readlinePKc+0xac>
3134 f01014e7: 83 fb 0d cmp $0xd,%ebx
3135 f01014ea: 75 8d jne f0101479 <_Z8readlinePKc+0x39>
3137 f01014ec: 85 ff test %edi,%edi
3138 f01014ee: 66 90 xchg %ax,%ax
3139 f01014f0: 74 0c je f01014fe <_Z8readlinePKc+0xbe>
3141 f01014f2: c7 04 24 0a 00 00 00 movl $0xa,(%esp)
3142 f01014f9: e8 83 f3 ff ff call f0100881 <_Z8cputchari>
3144 f01014fe: c6 86 a0 62 11 f0 00 movb $0x0,-0xfee9d60(%esi)
3146 f0101505: b8 a0 62 11 f0 mov $0xf01162a0,%eax
3150 f010150a: 83 c4
10 add $0x10
,%esp
3151 f010150d: 5b pop %ebx
3152 f010150e: 5e
pop %esi
3153 f010150f: 5f
pop %edi
3157 f0101520
<_Z6strlenPKc
>:
3158 // Primespipe runs
3x faster
this way.
3162 strlen
(const char
*s
)
3164 f0101520: 8b 54 24 04 mov 0x4(%esp),%edx
3167 for (n = 0; *s != '\0'; s++)
3168 f0101524: b8 00 00 00 00 mov $0x0,%eax
3169 f0101529: 80 3a 00 cmpb $0x0,(%edx)
3170 f010152c: 74 09 je f0101537 <_Z6strlenPKc+0x17>
3172 f010152e: 83 c0 01 add $0x1,%eax
3174 strlen(const char *s)
3178 for (n = 0; *s != '\0'; s++)
3179 f0101531: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
3180 f0101535: 75 f7 jne f010152e <_Z6strlenPKc+0xe>
3184 f0101537: f3 c3
repz ret
3186 f0101539
<_Z7strnlenPKcj
>:
3189 strnlen
(const char
*s
, size_t
size)
3191 f0101539: 8b 4c 24 04 mov 0x4(%esp),%ecx
3197 strnlen
(const char
*s
, size_t
size)
3198 f010153d: 8b 54 24 08 mov 0x8(%esp),%edx
3202 for (n = 0; size > 0 && *s != '\0'; s++, size--)
3203 f0101541: b8 00 00 00 00 mov $0x0,%eax
3204 f0101546: 39 d0 cmp %edx,%eax
3205 f0101548: 74 0b je f0101555 <_Z7strnlenPKcj+0x1c>
3206 f010154a: 80 3c 01 00 cmpb $0x0,(%ecx,%eax,1)
3207 f010154e: 74 05 je f0101555 <_Z7strnlenPKcj+0x1c>
3209 f0101550: 83 c0 01 add $0x1,%eax
3210 f0101553: eb f1 jmp f0101546 <_Z7strnlenPKcj+0xd>
3213 f0101555: f3 c3
repz ret
3215 f0101557
<_Z6strcpyPcPKc
>:
3218 strcpy
(char
*dst
, const char
*src
)
3220 f0101557: 53 push %ebx
3221 f0101558: 8b 44 24 08 mov 0x8(%esp),%eax
3222 f010155c: 8b 5c 24 0c mov 0xc(%esp),%ebx
3225 while ((*dst++ = *src++) != '\0')
3226 f0101560: ba 00 00 00 00 mov $0x0,%edx
3227 f0101565: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
3228 f0101569: 88 0c 10 mov %cl,(%eax,%edx,1)
3229 f010156c: 83 c2 01 add $0x1,%edx
3230 f010156f: 84 c9 test %cl,%cl
3231 f0101571: 75 f2 jne f0101565 <_Z6strcpyPcPKc+0xe>
3235 f0101573: 5b pop %ebx
3238 f0101575
<_Z7strncpyPcPKcj
>:
3241 strncpy
(char
*dst
, const char
*src
, size_t
size)
3243 f0101575: 56 push %esi
3244 f0101576: 53 push %ebx
3245 f0101577: 8b 44 24 0c mov 0xc(%esp),%eax
3246 f010157b: 8b 54 24 10 mov 0x10(%esp),%edx
3247 f010157f: 8b 74 24 14 mov 0x14(%esp),%esi
3251 for (i = 0; i < size; i++) {
3252 f0101583: 85 f6 test %esi,%esi
3253 f0101585: 74 18 je f010159f <_Z7strncpyPcPKcj+0x2a>
3254 f0101587: b9 00 00 00 00 mov $0x0,%ecx
3256 f010158c: 0f b6 1a movzbl (%edx),%ebx
3257 f010158f: 88 1c 08 mov %bl,(%eax,%ecx,1)
3258 // If strlen(src) < size, null-pad 'dst' out to 'size' chars
3261 f0101592: 80 3a 01 cmpb $0x1,(%edx)
3262 f0101595: 83 da ff sbb $0xffffffff,%edx
3263 strncpy(char *dst, const char *src, size_t size)
3268 for (i = 0; i < size; i++) {
3269 f0101598: 83 c1 01 add $0x1,%ecx
3270 f010159b: 39 f1 cmp %esi,%ecx
3271 f010159d: 75 ed jne f010158c <_Z7strncpyPcPKcj+0x17>
3272 // If strlen(src) < size, null-pad 'dst' out to 'size' chars
3278 f010159f: 5b pop %ebx
3279 f01015a0: 5e
pop %esi
3282 f01015a2
<_Z7strlcpyPcPKcj
>:
3285 strlcpy
(char
*dst
, const char
*src
, size_t
size)
3287 f01015a2: 56 push %esi
3288 f01015a3: 53 push %ebx
3289 f01015a4: 8b 74 24 0c mov 0xc(%esp),%esi
3290 f01015a8: 8b 4c 24 10 mov 0x10(%esp),%ecx
3291 f01015ac: 8b 54 24 14 mov 0x14(%esp),%edx
3295 f01015b0: 89 f0 mov %esi,%eax
3296 f01015b2: 85 d2 test %edx,%edx
3297 f01015b4: 74 17 je f01015cd <_Z7strlcpyPcPKcj+0x2b>
3298 while (--size > 0 && *src != '\0')
3299 f01015b6: 83 ea 01 sub $0x1,%edx
3300 f01015b9: 74 17 je f01015d2 <_Z7strlcpyPcPKcj+0x30>
3301 f01015bb: 80 39 00 cmpb $0x0,(%ecx)
3302 f01015be: 74 16 je f01015d6 <_Z7strlcpyPcPKcj+0x34>
3304 f01015c0: 0f b6 19 movzbl (%ecx),%ebx
3305 f01015c3: 88 18 mov %bl,(%eax)
3306 f01015c5: 83 c0 01 add $0x1,%eax
3307 f01015c8: 83 c1 01 add $0x1,%ecx
3308 f01015cb: eb e9 jmp f01015b6 <_Z7strlcpyPcPKcj+0x14>
3311 return dst
- dst_in
;
3312 f01015cd: 29 f0
sub %esi,%eax
3314 f01015cf: 5b pop %ebx
3315 f01015d0: 5e
pop %esi
3317 strlcpy
(char
*dst
, const char
*src
, size_t
size)
3322 while (--size > 0 && *src != '\0')
3323 f01015d2: 89 c2 mov %eax,%edx
3324 f01015d4: eb 02 jmp f01015d8 <_Z7strlcpyPcPKcj+0x36>
3325 f01015d6: 89 c2 mov %eax,%edx
3328 f01015d8: c6 02 00 movb $0x0,(%edx)
3329 f01015db: eb f0 jmp f01015cd <_Z7strlcpyPcPKcj+0x2b>
3331 f01015dd <_Z6strcmpPKcS0_>:
3332 return dst - dst_in;
3336 strcmp
(const char
*p
, const char
*q
)
3338 f01015dd: 8b 4c 24 04 mov 0x4(%esp),%ecx
3339 f01015e1: 8b 54 24 08 mov 0x8(%esp),%edx
3340 while (*p && *p == *q)
3341 f01015e5: 0f b6 01 movzbl (%ecx),%eax
3342 f01015e8: 84 c0 test %al,%al
3343 f01015ea: 74 0c je f01015f8 <_Z6strcmpPKcS0_+0x1b>
3344 f01015ec: 3a 02 cmp (%edx),%al
3345 f01015ee: 75 08 jne f01015f8 <_Z6strcmpPKcS0_+0x1b>
3347 f01015f0: 83 c1 01 add $0x1,%ecx
3348 f01015f3: 83 c2 01 add $0x1,%edx
3349 f01015f6: eb ed jmp f01015e5 <_Z6strcmpPKcS0_+0x8>
3350 return (unsigned char) *p - (unsigned char) *q;
3351 f01015f8: 0f b6 c0 movzbl %al,%eax
3352 f01015fb: 0f b6 12 movzbl (%edx),%edx
3353 f01015fe: 29 d0 sub %edx,%eax
3357 f0101601
<_Z7strncmpPKcS0_j
>:
3360 strncmp
(const char
*p
, const char
*q
, size_t n
)
3362 f0101601: 53 push %ebx
3363 f0101602: 8b 4c 24 08 mov 0x8(%esp),%ecx
3364 f0101606: 8b 5c 24 0c mov 0xc(%esp),%ebx
3365 f010160a: 8b 54 24 10 mov 0x10(%esp),%edx
3366 while (n > 0 && *p && *p == *q)
3367 f010160e: 85 d2 test %edx,%edx
3368 f0101610: 74 16 je f0101628 <_Z7strncmpPKcS0_j+0x27>
3369 f0101612: 0f b6 01 movzbl (%ecx),%eax
3370 f0101615: 84 c0 test %al,%al
3371 f0101617: 74 16 je f010162f <_Z7strncmpPKcS0_j+0x2e>
3372 f0101619: 3a 03 cmp (%ebx),%al
3373 f010161b: 75 12 jne f010162f <_Z7strncmpPKcS0_j+0x2e>
3375 f010161d: 83 ea 01 sub $0x1,%edx
3376 f0101620: 83 c1 01 add $0x1,%ecx
3377 f0101623: 83 c3 01 add $0x1,%ebx
3378 f0101626: eb e6 jmp f010160e <_Z7strncmpPKcS0_j+0xd>
3381 f0101628: b8 00 00 00 00 mov $0x0,%eax
3383 return (unsigned char) *p - (unsigned char) *q;
3385 f010162d: 5b pop %ebx
3387 while
(n
> 0 && *p
&& *p
== *q
)
3392 return
(unsigned char
) *p
- (unsigned char
) *q
;
3393 f010162f: 0f b6
01 movzbl
(%ecx),%eax
3394 f0101632: 0f b6
13 movzbl
(%ebx),%edx
3395 f0101635: 29 d0
sub %edx,%eax
3396 f0101637: eb f4
jmp f010162d
<_Z7strncmpPKcS0_j
+0x2c>
3398 f0101639
<_Z6strchrPKcc
>:
3400 // Return a pointer to the first occurrence of
'c' in 's',
3401 // or a null pointer if the string has no
'c'.
3403 strchr
(const char
*s
, char c
)
3405 f0101639: 8b 44 24 04 mov 0x4(%esp),%eax
3406 f010163d: 0f b6 4c 24 08 movzbl 0x8(%esp),%ecx
3408 f0101642: 0f b6 10 movzbl (%eax),%edx
3409 f0101645: 84 d2 test %dl,%dl
3410 f0101647: 74 1b je f0101664 <_Z6strchrPKcc+0x2b>
3412 f0101649: 38 ca cmp %cl,%dl
3413 f010164b: 75 09 jne f0101656 <_Z6strchrPKcc+0x1d>
3414 f010164d: f3 c3 repz ret
3415 // Return a pointer to the first occurrence of 'c' in 's',
3416 // or a null pointer if the string has no 'c'.
3418 strchr(const char *s, char c)
3421 f010164f: 83 c0 01 add $0x1,%eax
3423 f0101652: 38 ca cmp %cl,%dl
3424 f0101654: 74 13 je f0101669 <_Z6strchrPKcc+0x30>
3425 // Return a pointer to the first occurrence of 'c' in 's',
3426 // or a null pointer if the string has no 'c'.
3428 strchr(const char *s, char c)
3431 f0101656: 0f b6 50 01 movzbl 0x1(%eax),%edx
3432 f010165a: 84 d2 test %dl,%dl
3433 f010165c: 75 f1 jne f010164f <_Z6strchrPKcc+0x16>
3437 f010165e: b8 00 00 00 00 mov $0x0,%eax
3439 f0101664: b8 00 00 00 00 mov $0x0,%eax
3441 f0101669: f3 c3
repz ret
3443 f010166b
<_Z7strfindPKcc
>:
3445 // Return a pointer to the first occurrence of
'c' in 's',
3446 // or a pointer to the string
-ending null character if the string has no
'c'.
3448 strfind
(const char
*s
, char c
)
3450 f010166b: 8b 44 24 04 mov 0x4(%esp),%eax
3451 f010166f: 0f b6 4c 24 08 movzbl 0x8(%esp),%ecx
3453 f0101674: 0f b6 10 movzbl (%eax),%edx
3454 f0101677: 84 d2 test %dl,%dl
3455 f0101679: 74 14 je f010168f <_Z7strfindPKcc+0x24>
3457 f010167b: 38 ca cmp %cl,%dl
3458 f010167d: 75 06 jne f0101685 <_Z7strfindPKcc+0x1a>
3459 f010167f: f3 c3 repz ret
3460 f0101681: 38 ca cmp %cl,%dl
3461 f0101683: 74 0a je f010168f <_Z7strfindPKcc+0x24>
3462 // Return a pointer to the first occurrence of 'c' in 's',
3463 // or a pointer to the string-ending null character if the string has no 'c'.
3465 strfind(const char *s, char c)
3468 f0101685: 83 c0 01 add $0x1,%eax
3469 f0101688: 0f b6 10 movzbl (%eax),%edx
3470 f010168b: 84 d2 test %dl,%dl
3471 f010168d: 75 f2 jne f0101681 <_Z7strfindPKcc+0x16>
3476 f010168f: f3 c3
repz ret
3481 memset
(void
*v
, int c
, size_t n
)
3483 f0101691: 83 ec 0c sub $0xc,%esp
3484 f0101694: 89 1c 24 mov %ebx,(%esp)
3485 f0101697: 89 74 24 04 mov %esi,0x4(%esp)
3486 f010169b: 89 7c 24 08 mov %edi,0x8(%esp)
3487 f010169f: 8b 7c 24 10 mov 0x10(%esp),%edi
3488 f01016a3: 8b 44 24 14 mov 0x14(%esp),%eax
3489 f01016a7: 8b 4c 24 18 mov 0x18(%esp),%ecx
3491 if ((uintptr_t) v % 4 == 0 && n % 4 == 0) {
3492 f01016ab: f7 c7 03 00 00 00 test $0x3,%edi
3493 f01016b1: 75 25 jne f01016d8 <memset+0x47>
3494 f01016b3: f6 c1 03 test $0x3,%cl
3495 f01016b6: 75 20 jne f01016d8 <memset+0x47>
3497 f01016b8: 0f b6 d0 movzbl %al,%edx
3498 c = (c<<24)|(c<<16)|(c<<8)|c;
3499 f01016bb: 89 d3 mov %edx,%ebx
3500 f01016bd: c1 e3 08 shl $0x8,%ebx
3501 f01016c0: 89 d6 mov %edx,%esi
3502 f01016c2: c1 e6 18 shl $0x18,%esi
3503 f01016c5: 89 d0 mov %edx,%eax
3504 f01016c7: c1 e0 10 shl $0x10,%eax
3505 f01016ca: 09 f0 or %esi,%eax
3506 f01016cc: 09 d0 or %edx,%eax
3507 f01016ce: 09 d8 or %ebx,%eax
3508 asm volatile("cld; rep stosl\n"
3509 :: "D" (v), "a" (c), "c" (n/4)
3511 f01016d0: c1 e9 02 shr $0x2,%ecx
3513 f01016d4: f3 ab rep stos %eax,%es:(%edi)
3514 f01016d6: eb 03 jmp f01016db <memset+0x4a>
3516 asm volatile
("cld; rep stosb\n"
3517 :: "D" (v
), "a" (c
), "c" (n
)
3520 f01016d9: f3 aa
rep stos %al,%es:(%edi)
3527 f01016db: 89 f8
mov %edi,%eax
3528 f01016dd: 8b 1c
24 mov (%esp),%ebx
3529 f01016e0: 8b 74 24 04 mov 0x4(%esp),%esi
3530 f01016e4: 8b 7c
24 08 mov 0x8(%esp),%edi
3531 f01016e8: 83 c4
0c
add $0xc
,%esp
3537 memmove
(void
*dst
, const void
*src
, size_t n
)
3539 f01016ec: 83 ec 08 sub $0x8,%esp
3540 f01016ef: 89 34 24 mov %esi,(%esp)
3541 f01016f2: 89 7c 24 04 mov %edi,0x4(%esp)
3542 f01016f6: 8b 44 24 0c mov 0xc(%esp),%eax
3543 f01016fa: 8b 74 24 10 mov 0x10(%esp),%esi
3544 f01016fe: 8b 4c 24 14 mov 0x14(%esp),%ecx
3546 const char *s = (const char *) src;
3547 char *d = (char *) dst;
3549 if (s < d && s + n > d) {
3550 f0101702: 39 c6 cmp %eax,%esi
3551 f0101704: 73 36 jae f010173c <memmove+0x50>
3552 f0101706: 8d 14 0e lea (%esi,%ecx,1),%edx
3553 f0101709: 39 d0 cmp %edx,%eax
3554 f010170b: 73 2f jae f010173c <memmove+0x50>
3557 f010170d: 8d 3c 08 lea (%eax,%ecx,1),%edi
3558 if ((uintptr_t) s % 4 == 0 && (uintptr_t) d % 4 == 0
3559 f0101710: f6 c2 03 test $0x3,%dl
3560 f0101713: 75 1b jne f0101730 <memmove+0x44>
3561 f0101715: f7 c7 03 00 00 00 test $0x3,%edi
3562 f010171b: 75 13 jne f0101730 <memmove+0x44>
3563 f010171d: f6 c1 03 test $0x3,%cl
3564 f0101720: 75 0e jne f0101730 <memmove+0x44>
3566 asm volatile("std; rep movsl\n"
3567 :: "D" (d-4), "S" (s-4), "c" (n/4) : "cc", "memory");
3568 f0101722: 83 ef 04 sub $0x4,%edi
3569 f0101725: 8d 72 fc lea -0x4(%edx),%esi
3570 f0101728: c1 e9 02 shr $0x2,%ecx
3572 f010172c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
3573 f010172e: eb 09 jmp f0101739 <memmove+0x4d>
3575 asm volatile("std; rep movsb\n"
3576 :: "D" (d-1), "S" (s-1), "c" (n) : "cc", "memory");
3577 f0101730: 83 ef 01 sub $0x1,%edi
3578 f0101733: 8d 72 ff lea -0x1(%edx),%esi
3580 f0101737: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
3581 // Some versions of GCC rely on DF being clear
3582 asm volatile("cld" ::: "cc");
3584 f010173a: eb 20 jmp f010175c <memmove+0x70>
3586 if ((uintptr_t) s % 4 == 0 && (uintptr_t) d % 4 == 0
3587 f010173c: f7 c6 03 00 00 00 test $0x3,%esi
3588 f0101742: 75 13 jne f0101757 <memmove+0x6b>
3589 f0101744: a8 03 test $0x3,%al
3590 f0101746: 75 0f jne f0101757 <memmove+0x6b>
3591 f0101748: f6 c1 03 test $0x3,%cl
3592 f010174b: 75 0a jne f0101757 <memmove+0x6b>
3594 asm volatile("cld; rep movsl\n"
3595 :: "D" (d), "S" (s), "c" (n/4) : "cc", "memory");
3596 f010174d: c1 e9 02 shr $0x2,%ecx
3597 f0101750: 89 c7 mov %eax,%edi
3599 f0101753: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
3600 f0101755: eb 05 jmp f010175c <memmove+0x70>
3602 asm volatile("cld; rep movsb\n"
3603 :: "D" (d), "S" (s), "c" (n) : "cc", "memory");
3604 f0101757: 89 c7 mov %eax,%edi
3606 f010175a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
3613 f010175c: 8b 34 24 mov (%esp),%esi
3614 f010175f: 8b 7c
24 04 mov 0x4(%esp),%edi
3615 f0101763: 83 c4
08 add $0x8
,%esp
3621 memcpy
(void
*dst
, const void
*src
, size_t n
)
3623 f0101767: 83 ec 08 sub $0x8,%esp
3624 f010176a: 89 34 24 mov %esi,(%esp)
3625 f010176d: 89 7c 24 04 mov %edi,0x4(%esp)
3626 f0101771: 8b 44 24 0c mov 0xc(%esp),%eax
3627 f0101775: 8b 74 24 10 mov 0x10(%esp),%esi
3628 f0101779: 8b 4c 24 14 mov 0x14(%esp),%ecx
3630 const char *s = (const char *) src;
3631 char *d = (char *) dst;
3633 if ((uintptr_t) s % 4 == 0 && (uintptr_t) d % 4 == 0
3634 f010177d: f7 c6 03 00 00 00 test $0x3,%esi
3635 f0101783: 75 13 jne f0101798 <memcpy+0x31>
3636 f0101785: a8 03 test $0x3,%al
3637 f0101787: 75 0f jne f0101798 <memcpy+0x31>
3638 f0101789: f6 c1 03 test $0x3,%cl
3639 f010178c: 75 0a jne f0101798 <memcpy+0x31>
3641 asm volatile("cld; rep movsl\n"
3642 :: "D" (d), "S" (s), "c" (n/4) : "cc", "memory");
3643 f010178e: c1 e9 02 shr $0x2,%ecx
3644 f0101791: 89 c7 mov %eax,%edi
3646 f0101794: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
3647 f0101796: eb 05 jmp f010179d <memcpy+0x36>
3649 asm volatile("cld; rep movsb\n"
3650 :: "D" (d), "S" (s), "c" (n) : "cc", "memory");
3651 f0101798: 89 c7 mov %eax,%edi
3653 f010179b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
3660 f010179d: 8b 34 24 mov (%esp),%esi
3661 f01017a0: 8b 7c
24 04 mov 0x4(%esp),%edi
3662 f01017a4: 83 c4
08 add $0x8
,%esp
3668 memcmp
(const void
*v1
, const void
*v2
, size_t n
)
3670 f01017a8: 57 push %edi
3671 f01017a9: 56 push %esi
3672 f01017aa: 53 push %ebx
3673 f01017ab: 8b 5c 24 10 mov 0x10(%esp),%ebx
3674 f01017af: 8b 74 24 14 mov 0x14(%esp),%esi
3675 f01017b3: 8b 7c 24 18 mov 0x18(%esp),%edi
3682 f01017b7: b8
00 00 00 00 mov $0x0
,%eax
3683 memcmp
(const void
*v1
, const void
*v2
, size_t n
)
3685 const unsigned char *s1 = (const unsigned char *) v1;
3686 const unsigned char *s2 = (const unsigned char *) v2;
3689 f01017bc: 85 ff test %edi,%edi
3690 f01017be: 74 37 je f01017f7 <memcmp+0x4f>
3692 f01017c0: 0f b6 03 movzbl (%ebx),%eax
3693 f01017c3: 0f b6 0e movzbl (%esi),%ecx
3694 memcmp(const void *v1, const void *v2, size_t n)
3696 const unsigned char *s1 = (const unsigned char *) v1;
3697 const unsigned char *s2 = (const unsigned char *) v2;
3700 f01017c6: 83 ef 01 sub $0x1,%edi
3701 f01017c9: ba 00 00 00 00 mov $0x0,%edx
3703 f01017ce: 38 c8 cmp %cl,%al
3704 f01017d0: 74 1c je f01017ee <memcmp+0x46>
3705 f01017d2: eb 10 jmp f01017e4 <memcmp+0x3c>
3706 f01017d4: 0f b6 44 13 01 movzbl 0x1(%ebx,%edx,1),%eax
3707 f01017d9: 83 c2 01 add $0x1,%edx
3708 f01017dc: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
3709 f01017e0: 38 c8 cmp %cl,%al
3710 f01017e2: 74 0a je f01017ee <memcmp+0x46>
3712 f01017e4: 0f b6 c0 movzbl %al,%eax
3713 f01017e7: 0f b6 c9 movzbl %cl,%ecx
3714 f01017ea: 29 c8 sub %ecx,%eax
3715 f01017ec: eb 09 jmp f01017f7 <memcmp+0x4f>
3716 memcmp(const void *v1, const void *v2, size_t n)
3718 const unsigned char *s1 = (const unsigned char *) v1;
3719 const unsigned char *s2 = (const unsigned char *) v2;
3722 f01017ee: 39 fa cmp %edi,%edx
3723 f01017f0: 75 e2 jne f01017d4 <memcmp+0x2c>
3730 f01017f2: b8
00 00 00 00 mov $0x0
,%eax
3732 f01017f7: 5b pop %ebx
3733 f01017f8: 5e
pop %esi
3734 f01017f9: 5f
pop %edi
3740 memfind
(const void
*v
, int c
, size_t n
)
3742 f01017fb: 53 push %ebx
3743 f01017fc: 8b 5c 24 08 mov 0x8(%esp),%ebx
3744 const unsigned char *s = (const unsigned char *) v;
3745 const unsigned char *ends = s + n;
3746 f0101800: 89 da mov %ebx,%edx
3747 f0101802: 03 54 24 10 add 0x10(%esp),%edx
3751 memfind
(const void
*v
, int c
, size_t n
)
3753 const unsigned char *s = (const unsigned char *) v;
3754 f0101806: 89 d8 mov %ebx,%eax
3755 const unsigned char *ends = s + n;
3757 for (; s < ends; s++)
3758 f0101808: 39 d3 cmp %edx,%ebx
3759 f010180a: 73 16 jae f0101822 <memfind+0x27>
3760 if (*s == (unsigned char) c)
3761 f010180c: 0f b6 4c 24 0c movzbl 0xc(%esp),%ecx
3762 f0101811: 38 0b cmp %cl,(%ebx)
3763 f0101813: 75 06 jne f010181b <memfind+0x20>
3764 f0101815: eb 0b jmp f0101822 <memfind+0x27>
3765 f0101817: 38 08 cmp %cl,(%eax)
3766 f0101819: 74 07 je f0101822 <memfind+0x27>
3767 memfind(const void *v, int c, size_t n)
3769 const unsigned char *s = (const unsigned char *) v;
3770 const unsigned char *ends = s + n;
3772 for (; s < ends; s++)
3773 f010181b: 83 c0 01 add $0x1,%eax
3774 f010181e: 39 d0 cmp %edx,%eax
3775 f0101820: 75 f5 jne f0101817 <memfind+0x1c>
3776 if (*s == (unsigned char) c)
3780 f0101822: 5b pop %ebx
3783 f0101824
<_Z6strtolPKcPPci
>:
3786 strtol
(const char
*s
, char
**endptr
, int base
)
3788 f0101824: 55 push %ebp
3789 f0101825: 57 push %edi
3790 f0101826: 56 push %esi
3791 f0101827: 53 push %ebx
3792 f0101828: 8b 54 24 14 mov 0x14(%esp),%edx
3793 f010182c: 8b 74 24 18 mov 0x18(%esp),%esi
3797 // gobble initial whitespace
3798 while (*s == ' ' || *s == '\t')
3799 f0101830: 0f b6 02 movzbl (%edx),%eax
3800 f0101833: 3c 20 cmp $0x20,%al
3801 f0101835: 74 04 je f010183b <_Z6strtolPKcPPci+0x17>
3802 f0101837: 3c 09 cmp $0x9,%al
3803 f0101839: 75 0e jne f0101849 <_Z6strtolPKcPPci+0x25>
3805 f010183b: 83 c2 01 add $0x1,%edx
3810 // gobble initial whitespace
3811 while (*s == ' ' || *s == '\t')
3812 f010183e: 0f b6 02 movzbl (%edx),%eax
3813 f0101841: 3c 20 cmp $0x20,%al
3814 f0101843: 74 f6 je f010183b <_Z6strtolPKcPPci+0x17>
3815 f0101845: 3c 09 cmp $0x9,%al
3816 f0101847: 74 f2 je f010183b <_Z6strtolPKcPPci+0x17>
3821 f0101849: 3c 2b cmp $0x2b,%al
3822 f010184b: 75 0a jne f0101857 <_Z6strtolPKcPPci+0x33>
3824 f010184d: 83 c2 01 add $0x1,%edx
3828 strtol
(const char
*s
, char
**endptr
, int base
)
3831 f0101850: bf 00 00 00 00 mov $0x0,%edi
3832 f0101855: eb 10 jmp f0101867 <_Z6strtolPKcPPci+0x43>
3833 f0101857: bf 00 00 00 00 mov $0x0,%edi
3840 f010185c: 3c 2d cmp $0x2d,%al
3841 f010185e: 75 07 jne f0101867 <_Z6strtolPKcPPci+0x43>
3843 f0101860: 83 c2 01 add $0x1,%edx
3844 f0101863: 66 bf 01 00 mov $0x1,%di
3846 // hex or octal base prefix
3847 if ((base == 0 || base == 16) && (s[0] == '0' && s[1] == 'x'))
3848 f0101867: 83 7c 24 1c 00 cmpl $0x0,0x1c(%esp)
3849 f010186c: 0f 94 c0 sete %al
3850 f010186f: 74 07 je f0101878 <_Z6strtolPKcPPci+0x54>
3851 f0101871: 83 7c 24 1c 10 cmpl $0x10,0x1c(%esp)
3852 f0101876: 75 18 jne f0101890 <_Z6strtolPKcPPci+0x6c>
3853 f0101878: 80 3a 30 cmpb $0x30,(%edx)
3854 f010187b: 75 13 jne f0101890 <_Z6strtolPKcPPci+0x6c>
3855 f010187d: 80 7a 01 78 cmpb $0x78,0x1(%edx)
3856 f0101881: 75 0d jne f0101890 <_Z6strtolPKcPPci+0x6c>
3858 f0101883: 83 c2 02 add $0x2,%edx
3859 f0101886: c7 44 24 1c 10 00 00 movl $0x10,0x1c(%esp)
3861 f010188e: eb 1c jmp f01018ac <_Z6strtolPKcPPci+0x88>
3862 else if (base == 0 && s[0] == '0')
3863 f0101890: 84 c0 test %al,%al
3864 f0101892: 74 18 je f01018ac <_Z6strtolPKcPPci+0x88>
3868 f0101894: c7 44 24 1c 0a 00 00 movl $0xa,0x1c(%esp)
3872 // hex or octal base prefix
3873 if ((base == 0 || base == 16) && (s[0] == '0' && s[1] == 'x'))
3875 else if (base == 0 && s[0] == '0')
3876 f010189c: 80 3a 30 cmpb $0x30,(%edx)
3877 f010189f: 75 0b jne f01018ac <_Z6strtolPKcPPci+0x88>
3879 f01018a1: 83 c2 01 add $0x1,%edx
3880 f01018a4: c7 44 24 1c 08 00 00 movl $0x8,0x1c(%esp)
3884 f01018ac: b8 00 00 00 00 mov $0x0,%eax
3890 if (*s >= '0' && *s <= '9')
3891 f01018b1: 0f b6 0a movzbl (%edx),%ecx
3892 f01018b4: 8d 69 d0 lea -0x30(%ecx),%ebp
3893 f01018b7: 89 eb mov %ebp,%ebx
3894 f01018b9: 80 fb 09 cmp $0x9,%bl
3895 f01018bc: 77 08 ja f01018c6 <_Z6strtolPKcPPci+0xa2>
3897 f01018be: 0f be c9 movsbl %cl,%ecx
3898 f01018c1: 83 e9 30 sub $0x30,%ecx
3899 f01018c4: eb 22 jmp f01018e8 <_Z6strtolPKcPPci+0xc4>
3900 else if (*s >= 'a' && *s <= 'z')
3901 f01018c6: 8d 69 9f lea -0x61(%ecx),%ebp
3902 f01018c9: 89 eb mov %ebp,%ebx
3903 f01018cb: 80 fb 19 cmp $0x19,%bl
3904 f01018ce: 77 08 ja f01018d8 <_Z6strtolPKcPPci+0xb4>
3905 dig = *s - 'a' + 10;
3906 f01018d0: 0f be c9 movsbl %cl,%ecx
3907 f01018d3: 83 e9 57 sub $0x57,%ecx
3908 f01018d6: eb 10 jmp f01018e8 <_Z6strtolPKcPPci+0xc4>
3909 else if (*s >= 'A' && *s <= 'Z')
3910 f01018d8: 8d 69 bf lea -0x41(%ecx),%ebp
3911 f01018db: 89 eb mov %ebp,%ebx
3912 f01018dd: 80 fb 19 cmp $0x19,%bl
3913 f01018e0: 77 18 ja f01018fa <_Z6strtolPKcPPci+0xd6>
3914 dig = *s - 'A' + 10;
3915 f01018e2: 0f be c9 movsbl %cl,%ecx
3916 f01018e5: 83 e9 37 sub $0x37,%ecx
3920 f01018e8: 3b 4c 24 1c cmp 0x1c(%esp),%ecx
3921 f01018ec: 7d 10 jge f01018fe <_Z6strtolPKcPPci+0xda>
3923 s++, val = (val * base) + dig;
3924 f01018ee: 83 c2 01 add $0x1,%edx
3925 f01018f1: 0f af 44 24 1c imul 0x1c(%esp),%eax
3926 f01018f6: 01 c8 add %ecx,%eax
3933 f01018f8: eb b7 jmp f01018b1 <_Z6strtolPKcPPci+0x8d>
3935 if (*s >= '0' && *s <= '9')
3937 else if (*s >= 'a' && *s <= 'z')
3938 dig = *s - 'a' + 10;
3939 else if (*s >= 'A' && *s <= 'Z')
3940 f01018fa: 89 c1 mov %eax,%ecx
3941 f01018fc: eb 02 jmp f0101900 <_Z6strtolPKcPPci+0xdc>
3942 dig = *s - 'A' + 10;
3946 f01018fe: 89 c1 mov %eax,%ecx
3948 s++, val = (val * base) + dig;
3949 // we don't properly detect overflow!
3953 f0101900: 85 f6
test %esi,%esi
3954 f0101902: 74 02 je f0101906
<_Z6strtolPKcPPci
+0xe2>
3955 *endptr
= (char
*) s
;
3956 f0101904: 89 16 mov %edx,(%esi)
3957 return
(neg ? -val
: val
);
3958 f0101906: 85 ff
test %edi,%edi
3959 f0101908: 74 04 je f010190e
<_Z6strtolPKcPPci
+0xea>
3960 f010190a: 89 c8
mov %ecx,%eax
3961 f010190c: f7 d8
neg %eax
3963 f010190e: 5b pop %ebx
3964 f010190f: 5e
pop %esi
3965 f0101910: 5f
pop %edi
3966 f0101911: 5d
pop %ebp
3970 f0101920
<__udivdi3
>:
3971 f0101920: 83 ec
1c
sub $0x1c
,%esp
3972 f0101923: 8b 44 24 2c
mov 0x2c(%esp),%eax
3973 f0101927: 89 74 24 10 mov %esi,0x10(%esp)
3974 f010192b: 8b 4c
24 28 mov 0x28(%esp),%ecx
3975 f010192f: 8b 74 24 20 mov 0x20(%esp),%esi
3976 f0101933: 89 7c
24 14 mov %edi,0x14(%esp)
3977 f0101937: 8b 7c
24 24 mov 0x24(%esp),%edi
3978 f010193b: 85 c0
test %eax,%eax
3979 f010193d: 89 6c
24 18 mov %ebp,0x18(%esp)
3980 f0101941: 89 cd
mov %ecx,%ebp
3981 f0101943: 89 74 24 08 mov %esi,0x8(%esp)
3982 f0101947: 75 37 jne f0101980
<__udivdi3
+0x60>
3983 f0101949: 39 f9
cmp %edi,%ecx
3984 f010194b: 77 5b ja f01019a8
<__udivdi3
+0x88>
3985 f010194d: 85 c9
test %ecx,%ecx
3986 f010194f: 75 0b jne f010195c
<__udivdi3
+0x3c>
3987 f0101951: b8
01 00 00 00 mov $0x1
,%eax
3988 f0101956: 31 d2
xor %edx,%edx
3989 f0101958: f7 f1
div %ecx
3990 f010195a: 89 c1
mov %eax,%ecx
3991 f010195c: 89 f8
mov %edi,%eax
3992 f010195e: 31 d2
xor %edx,%edx
3993 f0101960: f7 f1
div %ecx
3994 f0101962: 89 c7
mov %eax,%edi
3995 f0101964: 89 f0
mov %esi,%eax
3996 f0101966: f7 f1
div %ecx
3997 f0101968: 89 fa
mov %edi,%edx
3998 f010196a: 89 c6
mov %eax,%esi
3999 f010196c: 89 f0
mov %esi,%eax
4000 f010196e: 8b 74 24 10 mov 0x10(%esp),%esi
4001 f0101972: 8b 7c
24 14 mov 0x14(%esp),%edi
4002 f0101976: 8b 6c
24 18 mov 0x18(%esp),%ebp
4003 f010197a: 83 c4
1c
add $0x1c
,%esp
4005 f010197e: 66 90 xchg %ax,%ax
4006 f0101980: 31 d2
xor %edx,%edx
4007 f0101982: 31 f6
xor %esi,%esi
4008 f0101984: 39 f8
cmp %edi,%eax
4009 f0101986: 77 e4
ja f010196c
<__udivdi3
+0x4c>
4010 f0101988: 0f bd c8
bsr %eax,%ecx
4011 f010198b: 83 f1
1f
xor $0x1f
,%ecx
4012 f010198e: 89 4c
24 04 mov %ecx,0x4(%esp)
4013 f0101992: 75 24 jne f01019b8
<__udivdi3
+0x98>
4014 f0101994: 3b 6c
24 08 cmp 0x8(%esp),%ebp
4015 f0101998: 76 04 jbe f010199e
<__udivdi3
+0x7e>
4016 f010199a: 39 f8
cmp %edi,%eax
4017 f010199c: 73 ce
jae f010196c
<__udivdi3
+0x4c>
4018 f010199e: 31 d2
xor %edx,%edx
4019 f01019a0: be
01 00 00 00 mov $0x1
,%esi
4020 f01019a5: eb c5
jmp f010196c
<__udivdi3
+0x4c>
4022 f01019a8: 89 f0
mov %esi,%eax
4023 f01019aa: 89 fa
mov %edi,%edx
4024 f01019ac: f7 f1
div %ecx
4025 f01019ae: 31 d2
xor %edx,%edx
4026 f01019b0: 89 c6
mov %eax,%esi
4027 f01019b2: eb b8
jmp f010196c
<__udivdi3
+0x4c>
4028 f01019b4: 8d
74 26 00 lea 0x0(%esi,%eiz
,1),%esi
4029 f01019b8: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4030 f01019bd: 89 c2
mov %eax,%edx
4031 f01019bf: b8
20 00 00 00 mov $0x20
,%eax
4032 f01019c4: 2b 44 24 04 sub 0x4(%esp),%eax
4033 f01019c8: 89 ee
mov %ebp,%esi
4034 f01019ca: d3 e2
shl %cl,%edx
4035 f01019cc: 89 c1
mov %eax,%ecx
4036 f01019ce: d3 ee
shr %cl,%esi
4037 f01019d0: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4038 f01019d5: 09 d6
or %edx,%esi
4039 f01019d7: 89 fa
mov %edi,%edx
4040 f01019d9: 89 74 24 0c
mov %esi,0xc(%esp)
4041 f01019dd: 8b 74 24 08 mov 0x8(%esp),%esi
4042 f01019e1: d3 e5
shl %cl,%ebp
4043 f01019e3: 89 c1
mov %eax,%ecx
4044 f01019e5: d3 ea
shr %cl,%edx
4045 f01019e7: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4046 f01019ec: d3 e7
shl %cl,%edi
4047 f01019ee: 89 c1
mov %eax,%ecx
4048 f01019f0: d3 ee
shr %cl,%esi
4049 f01019f2: 09 fe
or %edi,%esi
4050 f01019f4: 89 f0
mov %esi,%eax
4051 f01019f6: f7
74 24 0c divl
0xc(%esp)
4052 f01019fa: 89 d7
mov %edx,%edi
4053 f01019fc: 89 c6
mov %eax,%esi
4054 f01019fe: f7 e5
mul %ebp
4055 f0101a00: 39 d7
cmp %edx,%edi
4056 f0101a02: 72 13 jb f0101a17
<__udivdi3
+0xf7>
4057 f0101a04: 8b 6c
24 08 mov 0x8(%esp),%ebp
4058 f0101a08: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4059 f0101a0d: d3 e5
shl %cl,%ebp
4060 f0101a0f: 39 c5
cmp %eax,%ebp
4061 f0101a11: 73 07 jae f0101a1a
<__udivdi3
+0xfa>
4062 f0101a13: 39 d7
cmp %edx,%edi
4063 f0101a15: 75 03 jne f0101a1a
<__udivdi3
+0xfa>
4064 f0101a17: 83 ee
01 sub $0x1
,%esi
4065 f0101a1a: 31 d2
xor %edx,%edx
4066 f0101a1c: e9
4b ff ff ff
jmp f010196c
<__udivdi3
+0x4c>
4069 f0101a30
<__umoddi3
>:
4070 f0101a30: 83 ec
1c
sub $0x1c
,%esp
4071 f0101a33: 89 6c
24 18 mov %ebp,0x18(%esp)
4072 f0101a37: 8b 6c
24 2c
mov 0x2c(%esp),%ebp
4073 f0101a3b: 8b 44 24 20 mov 0x20(%esp),%eax
4074 f0101a3f: 89 74 24 10 mov %esi,0x10(%esp)
4075 f0101a43: 8b 4c
24 28 mov 0x28(%esp),%ecx
4076 f0101a47: 8b 74 24 24 mov 0x24(%esp),%esi
4077 f0101a4b: 85 ed
test %ebp,%ebp
4078 f0101a4d: 89 7c
24 14 mov %edi,0x14(%esp)
4079 f0101a51: 89 44 24 08 mov %eax,0x8(%esp)
4080 f0101a55: 89 cf
mov %ecx,%edi
4081 f0101a57: 89 04 24 mov %eax,(%esp)
4082 f0101a5a: 89 f2
mov %esi,%edx
4083 f0101a5c: 75 1a
jne f0101a78
<__umoddi3
+0x48>
4084 f0101a5e: 39 f1
cmp %esi,%ecx
4085 f0101a60: 76 4e
jbe f0101ab0
<__umoddi3
+0x80>
4086 f0101a62: f7 f1
div %ecx
4087 f0101a64: 89 d0
mov %edx,%eax
4088 f0101a66: 31 d2
xor %edx,%edx
4089 f0101a68: 8b 74 24 10 mov 0x10(%esp),%esi
4090 f0101a6c: 8b 7c
24 14 mov 0x14(%esp),%edi
4091 f0101a70: 8b 6c
24 18 mov 0x18(%esp),%ebp
4092 f0101a74: 83 c4
1c
add $0x1c
,%esp
4094 f0101a78: 39 f5
cmp %esi,%ebp
4095 f0101a7a: 77 54 ja f0101ad0
<__umoddi3
+0xa0>
4096 f0101a7c: 0f bd c5
bsr %ebp,%eax
4097 f0101a7f: 83 f0
1f
xor $0x1f
,%eax
4098 f0101a82: 89 44 24 04 mov %eax,0x4(%esp)
4099 f0101a86: 75 60 jne f0101ae8
<__umoddi3
+0xb8>
4100 f0101a88: 3b 0c
24 cmp (%esp),%ecx
4101 f0101a8b: 0f
87 07 01 00 00 ja f0101b98
<__umoddi3
+0x168>
4102 f0101a91: 89 f2
mov %esi,%edx
4103 f0101a93: 8b 34 24 mov (%esp),%esi
4104 f0101a96: 29 ce
sub %ecx,%esi
4105 f0101a98: 19 ea
sbb %ebp,%edx
4106 f0101a9a: 89 34 24 mov %esi,(%esp)
4107 f0101a9d: 8b 04 24 mov (%esp),%eax
4108 f0101aa0: 8b 74 24 10 mov 0x10(%esp),%esi
4109 f0101aa4: 8b 7c
24 14 mov 0x14(%esp),%edi
4110 f0101aa8: 8b 6c
24 18 mov 0x18(%esp),%ebp
4111 f0101aac: 83 c4
1c
add $0x1c
,%esp
4113 f0101ab0: 85 c9
test %ecx,%ecx
4114 f0101ab2: 75 0b jne f0101abf
<__umoddi3
+0x8f>
4115 f0101ab4: b8
01 00 00 00 mov $0x1
,%eax
4116 f0101ab9: 31 d2
xor %edx,%edx
4117 f0101abb: f7 f1
div %ecx
4118 f0101abd: 89 c1
mov %eax,%ecx
4119 f0101abf: 89 f0
mov %esi,%eax
4120 f0101ac1: 31 d2
xor %edx,%edx
4121 f0101ac3: f7 f1
div %ecx
4122 f0101ac5: 8b 04 24 mov (%esp),%eax
4123 f0101ac8: f7 f1
div %ecx
4124 f0101aca: eb
98 jmp f0101a64
<__umoddi3
+0x34>
4125 f0101acc: 8d
74 26 00 lea 0x0(%esi,%eiz
,1),%esi
4126 f0101ad0: 89 f2
mov %esi,%edx
4127 f0101ad2: 8b 74 24 10 mov 0x10(%esp),%esi
4128 f0101ad6: 8b 7c
24 14 mov 0x14(%esp),%edi
4129 f0101ada: 8b 6c
24 18 mov 0x18(%esp),%ebp
4130 f0101ade: 83 c4
1c
add $0x1c
,%esp
4132 f0101ae2: 8d b6
00 00 00 00 lea 0x0(%esi),%esi
4133 f0101ae8: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4134 f0101aed: 89 e8
mov %ebp,%eax
4135 f0101aef: bd
20 00 00 00 mov $0x20
,%ebp
4136 f0101af4: 2b 6c
24 04 sub 0x4(%esp),%ebp
4137 f0101af8: 89 fa
mov %edi,%edx
4138 f0101afa: d3 e0
shl %cl,%eax
4139 f0101afc: 89 e9
mov %ebp,%ecx
4140 f0101afe: d3 ea
shr %cl,%edx
4141 f0101b00: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4142 f0101b05: 09 c2
or %eax,%edx
4143 f0101b07: 8b 44 24 08 mov 0x8(%esp),%eax
4144 f0101b0b: 89 14 24 mov %edx,(%esp)
4145 f0101b0e: 89 f2
mov %esi,%edx
4146 f0101b10: d3 e7
shl %cl,%edi
4147 f0101b12: 89 e9
mov %ebp,%ecx
4148 f0101b14: d3 ea
shr %cl,%edx
4149 f0101b16: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4150 f0101b1b: 89 7c
24 0c
mov %edi,0xc(%esp)
4151 f0101b1f: d3 e6
shl %cl,%esi
4152 f0101b21: 89 e9
mov %ebp,%ecx
4153 f0101b23: d3 e8
shr %cl,%eax
4154 f0101b25: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4155 f0101b2a: 09 f0
or %esi,%eax
4156 f0101b2c: 8b 74 24 08 mov 0x8(%esp),%esi
4157 f0101b30: f7
34 24 divl
(%esp)
4158 f0101b33: d3 e6
shl %cl,%esi
4159 f0101b35: 89 74 24 08 mov %esi,0x8(%esp)
4160 f0101b39: 89 d6
mov %edx,%esi
4161 f0101b3b: f7 e7
mul %edi
4162 f0101b3d: 39 d6
cmp %edx,%esi
4163 f0101b3f: 89 c1
mov %eax,%ecx
4164 f0101b41: 89 d7
mov %edx,%edi
4165 f0101b43: 72 3f
jb f0101b84
<__umoddi3
+0x154>
4166 f0101b45: 39 44 24 08 cmp %eax,0x8(%esp)
4167 f0101b49: 72 35 jb f0101b80
<__umoddi3
+0x150>
4168 f0101b4b: 8b 44 24 08 mov 0x8(%esp),%eax
4169 f0101b4f: 29 c8
sub %ecx,%eax
4170 f0101b51: 19 fe
sbb %edi,%esi
4171 f0101b53: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4172 f0101b58: 89 f2
mov %esi,%edx
4173 f0101b5a: d3 e8
shr %cl,%eax
4174 f0101b5c: 89 e9
mov %ebp,%ecx
4175 f0101b5e: d3 e2
shl %cl,%edx
4176 f0101b60: 0f b6
4c
24 04 movzbl
0x4(%esp),%ecx
4177 f0101b65: 09 d0
or %edx,%eax
4178 f0101b67: 89 f2
mov %esi,%edx
4179 f0101b69: d3 ea
shr %cl,%edx
4180 f0101b6b: 8b 74 24 10 mov 0x10(%esp),%esi
4181 f0101b6f: 8b 7c
24 14 mov 0x14(%esp),%edi
4182 f0101b73: 8b 6c
24 18 mov 0x18(%esp),%ebp
4183 f0101b77: 83 c4
1c
add $0x1c
,%esp
4186 f0101b7c: 8d
74 26 00 lea 0x0(%esi,%eiz
,1),%esi
4187 f0101b80: 39 d6
cmp %edx,%esi
4188 f0101b82: 75 c7
jne f0101b4b
<__umoddi3
+0x11b>
4189 f0101b84: 89 d7
mov %edx,%edi
4190 f0101b86: 89 c1
mov %eax,%ecx
4191 f0101b88: 2b 4c
24 0c
sub 0xc(%esp),%ecx
4192 f0101b8c: 1b 3c
24 sbb (%esp),%edi
4193 f0101b8f: eb ba
jmp f0101b4b
<__umoddi3
+0x11b>
4194 f0101b91: 8d b4
26 00 00 00 00 lea 0x0(%esi,%eiz
,1),%esi
4195 f0101b98: 39 f5
cmp %esi,%ebp
4196 f0101b9a: 0f
82 f1 fe ff ff
jb f0101a91
<__umoddi3
+0x61>
4197 f0101ba0: e9 f8 fe ff ff
jmp f0101a9d
<__umoddi3
+0x6d>