Home | History | Annotate | Download | only in x86
      1 %verify "branch taken"
      2 %verify "branch not taken"
      3     /*
      4      * Generic two-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-eq, if-ne, if-lt, if-ge, if-gt, if-le
      9      */
     10     /* if-cmp vA, vB, +CCCC */
     11     movzx    rINSTbl,%ecx          # ecx <- A+
     12     andb     $$0xf,%cl             # ecx <- A
     13     GET_VREG_R %eax %ecx           # eax <- vA
     14     sarl     $$4,rINST             # rINST<- B
     15     movl     rSELF,%ecx
     16     cmpl     (rFP,rINST,4),%eax    # compare (vA, vB)
     17     movl     $$2,%eax              # assume not taken
     18     j${revcmp}   1f
     19     movswl   2(rPC),%eax           # Get signed branch offset
     20 1:
     21     movl     offThread_curHandlerTable(%ecx),rIBASE
     22     FETCH_INST_INDEXED %eax
     23     ADVANCE_PC_INDEXED %eax
     24     GOTO_NEXT
     25