Appendix . Appendix A

Example A1. Assembly Call of multiply_d() from main()

1    ..B1.3:             # 1              # Preds..B1.2
2             movl       $b, %eax                           #55.2
3             movl       $a, %edx                           #55.2
4             movl       $c, %ecx                           #55.2
5             call       multiply_d.                        #55.2

Example A2. Assembly language version of multiply_d()

1 # -- Begin multiply_d 2 # mark_begin; 3 .align 2,0x90 4 5 multiply_d: 6 # parameter 1: %eax 7 # parameter 2: %edx 8 # parameter 3: %ecx 9 ..B4.1: # 1 # Preds ..B4.0 10 movl 4(%esp), %eax #11.1 11 movl 8(%esp), %edx #11.1 12 movl 12(%esp), %ecx #11.1 13 14 multiply_d.: # 15 pushl %edi #11.1 16 pushl %esi #11.1 17 xorl %esi, %esi #14.6 18 # LOE eax edx ecx ebx ebp esi 19 ..B4.2: # 3 # Preds ..B4.4 ..B4.1 20 movl $-3, %edi #15.8 21 # LOE eax edx ecx ebx ebp esi edi 22 ..B4.3: # 9 # Preds ..B4.3 ..B4.2 ...

Get Software Development for Embedded Multi-core Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.