This is an old revision of the document!
Analytical Modeling of System Temperature
Results
nops test
Essentially this is a while loop with a nop
in it
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 10 sub $0x10,%esp 80483a5: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp) 80483ac: 90 nop 80483ad: eb fd jmp 80483ac <main+0x18> 80483af: 90 nop
int add test
Essentially this is a while loop with a x++
in it
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 10 sub $0x10,%esp 80483a5: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp) 80483ac: 83 45 f8 01 addl $0x1,-0x8(%ebp) 80483b0: eb f3 jmp 80483a5 <main+0x11> 80483b2: 90 nop 80483b3: 90 nop 80483b4: 90 nop 80483b5: 90 nop 80483b6: 90 nop 80483b7: 90 nop 80483b8: 90 nop 80483b9: 90 nop 80483ba: 90 nop 80483bb: 90 nop 80483bc: 90 nop 80483bd: 90 nop 80483be: 90 nop 80483bf: 90 nop
int sub test
Essentially this is a while loop with a x–
in it
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 10 sub $0x10,%esp 80483a5: c7 45 f8 02 00 00 00 movl $0x2,-0x8(%ebp) 80483ac: 83 6d f8 01 subl $0x1,-0x8(%ebp) 80483b0: eb f3 jmp 80483a5 <main+0x11> 80483b2: 90 nop 80483b3: 90 nop 80483b4: 90 nop 80483b5: 90 nop 80483b6: 90 nop 80483b7: 90 nop 80483b8: 90 nop 80483b9: 90 nop 80483ba: 90 nop 80483bb: 90 nop 80483bc: 90 nop 80483bd: 90 nop 80483be: 90 nop 80483bf: 90 nop
int mul test
Essentially this is a while loop which takes two integers (x=54;y=82;
) and multiplies them (z=x*y
).
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 10 sub $0x10,%esp 80483a5: c7 45 f8 36 00 00 00 movl $0x36,-0x8(%ebp) 80483ac: c7 45 f4 52 00 00 00 movl $0x52,-0xc(%ebp) 80483b3: 8b 45 f8 mov -0x8(%ebp),%eax 80483b6: 0f af 45 f4 imul -0xc(%ebp),%eax 80483ba: 89 45 f0 mov %eax,-0x10(%ebp) 80483bd: eb e6 jmp 80483a5 <main+0x11> 80483bf: 90 nop
int div test
Essentially this is a while loop which takes two integers (x=54;y=82;
) and multiplies them (z=y/x
).
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 18 sub $0x18,%esp 80483a5: c7 45 f8 36 00 00 00 movl $0x36,-0x8(%ebp) 80483ac: c7 45 f4 52 00 00 00 movl $0x52,-0xc(%ebp) 80483b3: 8b 45 f4 mov -0xc(%ebp),%eax 80483b6: 89 45 e4 mov %eax,-0x1c(%ebp) 80483b9: 8b 55 e4 mov -0x1c(%ebp),%edx 80483bc: 89 d0 mov %edx,%eax 80483be: c1 fa 1f sar $0x1f,%edx 80483c1: f7 7d f8 idivl -0x8(%ebp) 80483c4: 89 45 f0 mov %eax,-0x10(%ebp) 80483c7: eb dc jmp 80483a5 <main+0x11> 80483c9: 90 nop 80483ca: 90 nop 80483cb: 90 nop 80483cc: 90 nop 80483cd: 90 nop 80483ce: 90 nop 80483cf: 90 nop
fp add test
This is a while loop which takes two doubles and adds them just like in the int add test.
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 24 sub $0x24,%esp 80483a5: dd 05 90 84 04 08 fldl 0x8048490 80483ab: dd 5d f0 fstpl -0x10(%ebp) 80483ae: dd 05 98 84 04 08 fldl 0x8048498 80483b4: dd 5d e8 fstpl -0x18(%ebp) 80483b7: dd 45 f0 fldl -0x10(%ebp) 80483ba: dc 45 e8 faddl -0x18(%ebp) 80483bd: dd 5d e0 fstpl -0x20(%ebp) 80483c0: eb e3 jmp 80483a5 <main+0x11> 80483c2: 90 nop 80483c3: 90 nop 80483c4: 90 nop 80483c5: 90 nop 80483c6: 90 nop 80483c7: 90 nop 80483c8: 90 nop 80483c9: 90 nop 80483ca: 90 nop 80483cb: 90 nop 80483cc: 90 nop 80483cd: 90 nop 80483ce: 90 nop 80483cf: 90 nop
fp sub test
A while loop which takes two doubles and subtracts them.
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 24 sub $0x24,%esp 80483a5: dd 05 90 84 04 08 fldl 0x8048490 80483ab: dd 5d f0 fstpl -0x10(%ebp) 80483ae: dd 05 98 84 04 08 fldl 0x8048498 80483b4: dd 5d e8 fstpl -0x18(%ebp) 80483b7: dd 45 e8 fldl -0x18(%ebp) 80483ba: dc 65 f0 fsubl -0x10(%ebp) 80483bd: dd 5d e0 fstpl -0x20(%ebp) 80483c0: eb e3 jmp 80483a5 <main+0x11> 80483c2: 90 nop 80483c3: 90 nop 80483c4: 90 nop 80483c5: 90 nop 80483c6: 90 nop 80483c7: 90 nop 80483c8: 90 nop 80483c9: 90 nop 80483ca: 90 nop 80483cb: 90 nop 80483cc: 90 nop 80483cd: 90 nop 80483ce: 90 nop 80483cf: 90 nop
fp mul test
A while loop which takes two doubles and multiplies them. Within the loop, we take two doubles, so we are multiplying the same numbers again and again. This should avoid overflow.
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 24 sub $0x24,%esp 80483a5: dd 05 90 84 04 08 fldl 0x8048490 80483ab: dd 5d f0 fstpl -0x10(%ebp) 80483ae: dd 05 98 84 04 08 fldl 0x8048498 80483b4: dd 5d e8 fstpl -0x18(%ebp) 80483b7: dd 45 f0 fldl -0x10(%ebp) 80483ba: dc 4d e8 fmull -0x18(%ebp) 80483bd: dd 5d e0 fstpl -0x20(%ebp) 80483c0: eb e3 jmp 80483a5 <main+0x11> 80483c2: 90 nop 80483c3: 90 nop 80483c4: 90 nop 80483c5: 90 nop 80483c6: 90 nop 80483c7: 90 nop 80483c8: 90 nop 80483c9: 90 nop 80483ca: 90 nop 80483cb: 90 nop 80483cc: 90 nop 80483cd: 90 nop 80483ce: 90 nop 80483cf: 90 nop
fp div test
A while loop which takes two doubles and divides them.
08048394 <main>: 8048394: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048398: 83 e4 f0 and $0xfffffff0,%esp 804839b: ff 71 fc pushl -0x4(%ecx) 804839e: 55 push %ebp 804839f: 89 e5 mov %esp,%ebp 80483a1: 51 push %ecx 80483a2: 83 ec 24 sub $0x24,%esp 80483a5: dd 05 90 84 04 08 fldl 0x8048490 80483ab: dd 5d f0 fstpl -0x10(%ebp) 80483ae: dd 05 98 84 04 08 fldl 0x8048498 80483b4: dd 5d e8 fstpl -0x18(%ebp) 80483b7: dd 45 e8 fldl -0x18(%ebp) 80483ba: dc 75 f0 fdivl -0x10(%ebp) 80483bd: dd 5d e0 fstpl -0x20(%ebp) 80483c0: eb e3 jmp 80483a5 <main+0x11> 80483c2: 90 nop 80483c3: 90 nop 80483c4: 90 nop 80483c5: 90 nop 80483c6: 90 nop 80483c7: 90 nop 80483c8: 90 nop 80483c9: 90 nop 80483ca: 90 nop 80483cb: 90 nop 80483cc: 90 nop 80483cd: 90 nop 80483ce: 90 nop 80483cf: 90 nop