Inline-Lua

 view release on metacpan or  search on metacpan

ffi/target/release/build/mlua-sys-6a99a2ae50f12319/out/luajit-build/build/src/vm_x64.dasc  view on Meta::CPAN

  ||case BC_ISGE:
  |   ge target
  ||break;
  ||case BC_ISLE:
  |   le target
  ||break;
  ||case BC_ISGT:
  |   gt target
  ||break;
  ||default: break;  /* Shut up GCC. */
  ||}
  |.endmacro

  case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
    |  // RA = src1, RD = src2, JMP with RD = target
    |  ins_AD
    |  mov ITYPE, [BASE+RA*8]
    |  mov RB, [BASE+RD*8]
    |  mov RA, ITYPE
    |  mov RD, RB
    |  sar ITYPE, 47
    |  sar RB, 47
    |.if DUALNUM
    |  cmp ITYPEd, LJ_TISNUM; jne >7
    |  cmp RBd, LJ_TISNUM; jne >8
    |  add PC, 4
    |  cmp RAd, RDd
    |  jmp_comp jge, jl, jg, jle, >9
    |6:
    |  movzx RDd, PC_RD
    |  branchPC RD
    |9:
    |  ins_next
    |
    |7:  // RA is not an integer.
    |  ja ->vmeta_comp
    |  // RA is a number.
    |  cmp RBd, LJ_TISNUM; jb >1; jne ->vmeta_comp
    |  // RA is a number, RD is an integer.
    |  cvtsi2sd xmm0, RDd
    |  jmp >2
    |
    |8:  // RA is an integer, RD is not an integer.
    |  ja ->vmeta_comp
    |  // RA is an integer, RD is a number.
    |  cvtsi2sd xmm1, RAd
    |  movd xmm0, RD
    |  jmp >3
    |.else
    |  cmp ITYPEd, LJ_TISNUM; jae ->vmeta_comp
    |  cmp RBd, LJ_TISNUM; jae ->vmeta_comp
    |.endif
    |1:
    |  movd xmm0, RD
    |2:
    |  movd xmm1, RA
    |3:
    |  add PC, 4
    |  ucomisd xmm0, xmm1
    |  // Unordered: all of ZF CF PF set, ordered: PF clear.
    |  // To preserve NaN semantics GE/GT branch on unordered, but LT/LE don't.
    |.if DUALNUM
    |  jmp_comp jbe, ja, jb, jae, <9
    |  jmp <6
    |.else
    |  jmp_comp jbe, ja, jb, jae, >1
    |  movzx RDd, PC_RD
    |  branchPC RD
    |1:
    |  ins_next
    |.endif
    break;

  case BC_ISEQV: case BC_ISNEV:
    vk = op == BC_ISEQV;
    |  ins_AD	// RA = src1, RD = src2, JMP with RD = target
    |  mov RB, [BASE+RD*8]
    |  mov ITYPE, [BASE+RA*8]
    |  add PC, 4
    |  mov RD, RB
    |  mov RA, ITYPE
    |  sar RB, 47
    |  sar ITYPE, 47
    |.if DUALNUM
    |  cmp RBd, LJ_TISNUM; jne >7
    |  cmp ITYPEd, LJ_TISNUM; jne >8
    |  cmp RDd, RAd
    if (vk) {
      |  jne >9
    } else {
      |  je >9
    }
    |  movzx RDd, PC_RD
    |  branchPC RD
    |9:
    |  ins_next
    |
    |7:  // RD is not an integer.
    |  ja >5
    |  // RD is a number.
    |  movd xmm1, RD
    |  cmp ITYPEd, LJ_TISNUM; jb >1; jne >5
    |  // RD is a number, RA is an integer.
    |  cvtsi2sd xmm0, RAd
    |  jmp >2
    |
    |8:  // RD is an integer, RA is not an integer.
    |  ja >5
    |  // RD is an integer, RA is a number.
    |  cvtsi2sd xmm1, RDd
    |  jmp >1
    |
    |.else
    |  cmp RBd, LJ_TISNUM; jae >5
    |  cmp ITYPEd, LJ_TISNUM; jae >5
    |  movd xmm1, RD
    |.endif
    |1:
    |  movd xmm0, RA
    |2:
    |  ucomisd xmm0, xmm1



( run in 2.865 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )