title: How to convert IA32 'cmp' instruction to Y86?
body: <p><strong>IA32</strong> to <strong>Y86</strong></p>
  
  <p><strong>ATT Assembly</strong></p>
  
  <p>I have the following IA32 assembly code:</p>
  
  <pre><code>Bubble:
  .LFB0:
      pushl   %esi
      pushl   %ebx
      movl    16(%esp), %esi
      movl    12(%esp), %edx
      subl    $1, %esi
      andl    %esi, %esi
      jle .L1
  .L7:
      xorl    %eax, %eax
  .L5:
      movl    4(%edx,%eax,4), %ecx
      movl    (%edx,%eax,4), %ebx
      cmpl    %ebx, %ecx
      jge .L4
      movl    %ebx, 4(%edx,%eax,4)
      movl    %ecx, (%edx,%eax,4)
  .L4:  
      addl    $1, %eax
      cmpl    %eax, %esi
      jg  .L5
      subl    $1, %esi
      jne .L7
  .L1: 
      popl    %ebx
      popl    %esi
      ret
  </code></pre>
  
  <p>I'm trying to convert it to Y86 assembly code. I'm having trouble translating the compare instruction:</p>
  
  <pre><code> cmpl    %ebx, %ecx
  </code></pre>
  
  <p>Thanks.</p>