Assembly File Code Example

The following is an example of a portion of an assembly file code for IA-32:

main:
.B1.1:  
/1   
/ Preds .B1.0
/ AFL
pushl     %ebp              /1.0 1 0
movl      %esp, %ebp        /1.0 1 0
subl      $3, %esp          /1.0 1 0
andl      $-8, %esp         /1.0 1 0
addl      $4, %esp          /1.0 1 0
subl      $12, %esp         /1.0 1 0
movl      12(%ebp), %edx    /1.0 2 0
leal      8(%ebp), %eax     /1.0 4 0
movl      %eax, (%esp)      /1.0 4 0
movl      %edx, 4(%esp)     /1.0 5 0
call      f90_init          /1.0 6 0
/ LOE ebx esi edi

The elements in the above code are as follows:

Itanium(TM)-based applications:

An assembly file code portion:

        .section .text
// -- Begin  main
  .proc  main#
  .align 32
// Block 0: entry  Pred:     Succ: 3
// Freq 1.0e+000, Prob 1.00, Ipc 2.67
  .global main#
  .align 32
main:
{   .mmi
  alloc   r34=ar.pfs,2,2,2,0      //0:  1
  add     sp=-64,sp               //0:  1
  nop.i   0 ;;
} { .mii
  ld8     r30=[sp]                //1:  1
  mov     r35=b0                  //1:  1 MS
  add     r36=$2$1_2pab_p$0# + _2$1_2auto_size - 0x00000030,sp
                                             //1:  1 MS
RE
} { .mmi
  mov     r37=r33 ;;              //1:  1 MS
  st8     [r36]=r32               //2:  1 B3 DS
  mov     r32=gp                  //2:  1 B3 DS
// Block 3:  Pred: 0     Succ: 1
// Freq 1.0e+000, Prob 1.00, Ipc 1.00
} { .mib
  nop.m   0
  nop.i   0
  br.call.sptk.many       b0=f90_init# ;;    //2:  1 MS

The elements in the above code are as follows:

For more information, see Intel® Itanium™ Assembler User’s Guide.