Page 13 - BG555
P. 13

leal






                                                                                                  arith:
       int arith                                                                                         pushl %ebp                                                             Set


                  (int x, int y, int z)                                                                  movl %esp,%ebp                                                         Up



       {
                                                                                                          movl 8(%ebp),%eax
                   int t1 = x+y;                                                                          movl 12(%ebp),%edx

                   int t2 = z+t1;                                                                         leal (%edx,%eax),%ecx


                   int t3 = x+4;                                                                          leal (%edx,%edx,2),%edx
                                                                                                          sall $4,%edx
                   int t4 = y * 48;                                                                       addl 16(%ebp),%ecx

                   int t5 = t3 + t4;                                                                      leal 4(%edx,%eax),%eax


                   int rval = t2 * t5;                                                                    imull %ecx,%eax

                   return rval;


       }                                                                                                  movl %ebp,%esp                                                      Finish

                                      Register                Variabel                                    popl %ebp
                                                                                                          ret
                                        %edx                      y

                                        %eax                      x
   8   9   10   11   12   13   14   15   16   17   18