Assembly Language for Beginners

(Jeff_L) #1
1.19. FLOATING-POINT UNIT

22 0x080484b0 <+16>: ret
23 End of assembler dump.
24 (gdb) ni
25 0x080484a8 in d_max ()
26 (gdb) info float
27 R7: Valid 0x3fff9999999999999800 +1.199999999999999956
28 =>R6: Valid 0x4000d999999999999800 +3.399999999999999911
29 R5: Empty 0x00000000000000000000
30 R4: Empty 0x00000000000000000000
31 R3: Empty 0x00000000000000000000
32 R2: Empty 0x00000000000000000000
33 R1: Empty 0x00000000000000000000
34 R0: Empty 0x00000000000000000000
35
36 Status Word: 0x3000
37 TOP: 6
38 Control Word: 0x037f IM DM ZM OM UM PM
39 PC: Extended Precision (64-bits)
40 RC: Round to nearest
41 Tag Word: 0x0fff
42 Instruction Pointer: 0x73:0x080484a4
43 Operand Pointer: 0x7b:0xbffff118
44 Opcode: 0x0000
45 (gdb) ni
46 0x080484aa in d_max ()
47 (gdb) info float
48 R7: Valid 0x4000d999999999999800 +3.399999999999999911
49 =>R6: Valid 0x3fff9999999999999800 +1.199999999999999956
50 R5: Empty 0x00000000000000000000
51 R4: Empty 0x00000000000000000000
52 R3: Empty 0x00000000000000000000
53 R2: Empty 0x00000000000000000000
54 R1: Empty 0x00000000000000000000
55 R0: Empty 0x00000000000000000000
56
57 Status Word: 0x3000
58 TOP: 6
59 Control Word: 0x037f IM DM ZM OM UM PM
60 PC: Extended Precision (64-bits)
61 RC: Round to nearest
62 Tag Word: 0x0fff
63 Instruction Pointer: 0x73:0x080484a8
64 Operand Pointer: 0x7b:0xbffff118
65 Opcode: 0x0000
66 (gdb) disas $eip
67 Dump of assembler code for function d_max:
68 0x080484a0 <+0>: fldl 0x4(%esp)
69 0x080484a4 <+4>: fldl 0xc(%esp)
70 0x080484a8 <+8>: fxch %st(1)
71 => 0x080484aa <+10>: fucomi %st(1),%st
72 0x080484ac <+12>: fcmovbe %st(1),%st
73 0x080484ae <+14>: fstp %st(1)
74 0x080484b0 <+16>: ret
75 End of assembler dump.
76 (gdb) ni
77 0x080484ac in d_max ()
78 (gdb) info registers
79 eax 0x1 1
80 ecx 0xbffff1c4 -1073745468
81 edx 0x8048340 134513472
82 ebx 0xb7fbf000 -1208225792
83 esp 0xbffff10c 0xbffff10c
84 ebp 0xbffff128 0xbffff128
85 esi 0x0 0
86 edi 0x0 0
87 eip 0x80484ac 0x80484ac <d_max+12>
88 eflags 0x203 [ CF IF ]
89 cs 0x73 115
90 ss 0x7b 123
91 ds 0x7b 123

Free download pdf