Home | History | Annotate | Download | only in x86
      1 %verify "branch taken"
      2 %verify "branch not taken"
      3     /*
      4      * Generic one-operand compare-and-branch operation.  Provide a "revcmp"
      5      * fragment that specifies the *reverse* comparison to perform, e.g.
      6      * for "if-le" you would use "gt".
      7      *
      8      * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
      9      */
     10     /* if-cmp vAA, +BBBB */
     11     movzx    rINST_HI,%ecx             # ecx <- AA
     12     cmpl     $$0,(rFP,%ecx,4)          # compare (vA, 0)
     13     movswl   2(rPC),rINST_FULL         # fetch signed displacement
     14     movl     $$2,%eax                  # assume branch not taken
     15     j${revcmp}   1f
     16     testl    rINST_FULL,rINST_FULL
     17     js       common_backwardBranch
     18     movl     rINST_FULL,%eax
     19 1:
     20     FETCH_INST_INDEXED(%eax)
     21     ADVANCE_PC_INDEXED(%eax)
     22     GOTO_NEXT
     23