Back to index

plt-scheme  4.2.1
Classes | Defines
fp.h File Reference

Go to the source code of this file.

Classes

union  jit_double_imm

Defines

#define JIT_FPR_NUM   6
#define JIT_FPR(i)   (i)
#define jit_fxch(rs, op)
#define jit_fp_unary(rd, s1, op)
#define jit_fp_binary(rd, s1, s2, op, opr)
#define jit_addr_d(rd, s1, s2)   jit_fp_binary((rd),(s1),(s2),FADDrr,FADDrr)
#define jit_subr_d(rd, s1, s2)   jit_fp_binary((rd),(s1),(s2),FSUBrr,FSUBRrr)
#define jit_subrr_d(rd, s1, s2)   jit_fp_binary((rd),(s1),(s2),FSUBRrr,FSUBrr)
#define jit_mulr_d(rd, s1, s2)   jit_fp_binary((rd),(s1),(s2),FMULrr,FMULrr)
#define jit_divr_d(rd, s1, s2)   jit_fp_binary((rd),(s1),(s2),FDIVrr,FDIVRrr)
#define jit_divrr_d(rd, s1, s2)   jit_fp_binary((rd),(s1),(s2),FDIVRrr,FDIVrr)
#define jit_abs_d(rd, rs)   jit_fp_unary ((rd), (rs), _OO (0xd9e1))
#define jit_negr_d(rd, rs)   jit_fp_unary ((rd), (rs), _OO (0xd9e0))
#define jit_sqrt_d(rd, rs)   jit_fp_unary ((rd), (rs), _OO (0xd9fa))
#define jit_addr_d_fppop(rd, s1, s2)   (FADDPr(1))
#define jit_subr_d_fppop(rd, s1, s2)   (FSUBPr(1))
#define jit_subrr_d_fppop(rd, s1, s2)   (FSUBRPr(1))
#define jit_mulr_d_fppop(rd, s1, s2)   (FMULPr(1))
#define jit_divr_d_fppop(rd, s1, s2)   (FDIVPr(1))
#define jit_divrr_d_fppop(rd, s1, s2)   (FDIVRPr(1))
#define jit_negr_d_fppop(rd, rs)   ( _OO (0xd9e0))
#define jit_abs_d_fppop(rd, rs)   ( _OO (0xd9e1))
#define jit_movr_d(rd, s1)
#define jit_movi_f(rd, immf)
#define _jit_push_d(immd)
#define FPX()   ((void) 0)
#define jit_movi_d(rd, immd)
#define jit_movi_d_fppush(rd, immd)
#define jit_ldi_f(rd, is)
#define jit_ldi_d(rd, is)
#define jit_ldi_d_fppush(rd, is)   (FPX(), FLDLm((is), 0, 0, 0))
#define jit_ldr_f(rd, rs)
#define jit_ldr_d(rd, rs)
#define jit_ldr_d_fppush(rd, rs)   (FPX(), FLDLm(0, (rs), 0, 0))
#define jit_ldxi_f(rd, rs, is)
#define jit_ldxi_d(rd, rs, is)
#define jit_ldxi_d_fppush(rd, rs, is)   (FPX(), FLDLm((is), (rs), 0, 0))
#define jit_ldxr_f(rd, s1, s2)
#define jit_ldxr_d(rd, s1, s2)
#define jit_extr_i_d(rd, rs)
#define jit_stxi_f(id, rd, rs)   jit_fxch ((rs), FPX(), FSTSm((id), (rd), 0, 0))
#define jit_stxr_f(d1, d2, rs)   jit_fxch ((rs), FPX(), FSTSm(0, (d1), (d2), 1))
#define jit_stxi_d(id, rd, rs)   jit_fxch ((rs), FPX(), FSTLm((id), (rd), 0, 0))
#define jit_stxr_d(d1, d2, rs)   jit_fxch ((rs), FPX(), FSTLm(0, (d1), (d2), 1))
#define jit_sti_f(id, rs)   jit_fxch ((rs), FPX(), FSTSm((id), 0, 0, 0))
#define jit_str_f(rd, rs)   jit_fxch ((rs), FPX(), FSTSm(0, (rd), 0, 0))
#define jit_sti_d(id, rs)   jit_fxch ((rs), FPX(), FSTLm((id), 0, 0, 0))
#define jit_str_d(rd, rs)   jit_fxch ((rs), FPX(), FSTLm(0, (rd), 0, 0))
#define jit_sti_d_fppop(id, rs)   (FPX(), FSTPLm((id), 0, 0, 0))
#define jit_stxi_d_fppop(id, rd, rs)   (FPX(), FSTPLm((id), (rd), 0, 0))
#define jit_str_d_fppop(rd, rs)   (FPX(), FSTPLm(0, (rd), 0, 0))
#define jit_floorr_d_i(rd, rs)   (FLDr (rs), jit_floor2((rd), ((rd) == _EDX ? _EAX : _EDX)))
#define jit_ceilr_d_i(rd, rs)   (FLDr (rs), jit_ceil2((rd), ((rd) == _EDX ? _EAX : _EDX)))
#define jit_truncr_d_i(rd, rs)   (FLDr (rs), jit_trunc2((rd), ((rd) == _EDX ? _EAX : _EDX)))
#define jit_calc_diff(ofs)
#define jit_floor2(rd, aux)
#define jit_ceil2(rd, aux)
#define jit_trunc2(rd, aux)
#define jit_roundr_d_i(rd, rs)
#define jit_fp_test(d, s1, s2, n, _and, res)
#define jit_fp_btest(d, s1, s2, n, _and, cmp, res)
#define jit_fp_test_fppop(d, n, _and, res)
#define jit_fp_btest_fppop(d, n, _and, cmp, res)
#define jit_nothing_needed(x)
#define jit_gtr_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 8, 0x45, SETZr (_AL))
#define jit_ger_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 9, 0, SBBBir (-1, _AL))
#define jit_unler_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 8, 0x45, SETNZr (_AL))
#define jit_unltr_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 9, 0, ADCBir (0, _AL))
#define jit_ltr_d(d, s1, s2)   jit_fp_test((d), (s2), (s1), 8, 0x45, SETZr (_AL))
#define jit_ler_d(d, s1, s2)   jit_fp_test((d), (s2), (s1), 9, 0, SBBBir (-1, _AL))
#define jit_unger_d(d, s1, s2)   jit_fp_test((d), (s2), (s1), 8, 0x45, SETNZr (_AL))
#define jit_ungtr_d(d, s1, s2)   jit_fp_test((d), (s2), (s1), 9, 0, ADCBir (0, _AL))
#define jit_eqr_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 8, 0x45, (CMPBir (0x40, _AL), SETEr (_AL)))
#define jit_ner_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 8, 0x45, (CMPBir (0x40, _AL), SETNEr (_AL)))
#define jit_ltgtr_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 15, 0, SBBBir (-1, _AL))
#define jit_uneqr_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 15, 0, ADCBir (0, _AL))
#define jit_ordr_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 11, 0, SBBBir (-1, _AL))
#define jit_unordr_d(d, s1, s2)   jit_fp_test((d), (s1), (s2), 11, 0, ADCBir (0, _AL))
#define jit_bgtr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 8, 0x45, 0, JZm)
#define jit_bger_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 9, 0, 0, JNCm)
#define jit_bantigtr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 8, 0x45, 0, JNZm)
#define jit_bantiger_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 9, 0, 0, JCm)
#define jit_bunler_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 8, 0x45, 0, JNZm)
#define jit_bunltr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 9, 0, 0, JCm)
#define jit_bltr_d(d, s1, s2)   jit_fp_btest((d), (s2), (s1), 8, 0x45, 0, JZm)
#define jit_bler_d(d, s1, s2)   jit_fp_btest((d), (s2), (s1), 9, 0, 0, JNCm)
#define jit_bantiltr_d(d, s1, s2)   jit_fp_btest((d), (s2), (s1), 8, 0x45, 0, JNZm)
#define jit_bantiler_d(d, s1, s2)   jit_fp_btest((d), (s2), (s1), 9, 0, 0, JCm)
#define jit_bunger_d(d, s1, s2)   jit_fp_btest((d), (s2), (s1), 8, 0x45, 0, JNZm)
#define jit_bungtr_d(d, s1, s2)   jit_fp_btest((d), (s2), (s1), 9, 0, 0, JCm)
#define jit_beqr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 8, 0x45, 0x40, JZm)
#define jit_bantieqr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 8, 0x45, 0x40, JNZm)
#define jit_bner_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 8, 0x45, 0x40, JNZm)
#define jit_bltgtr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 15, 0, 0, JNCm)
#define jit_buneqr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 15, 0, 0, JCm)
#define jit_bordr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 11, 0, 0, JNCm)
#define jit_bunordr_d(d, s1, s2)   jit_fp_btest((d), (s1), (s2), 11, 0, 0, JCm)
#define jit_bger_d_fppop(d, s1, s2)   jit_fp_btest_fppop((d), 9, 0, 0, JNCm)
#define jit_bantiger_d_fppop(d, s1, s2)   jit_fp_btest_fppop((d), 9, 0, 0, JCm)
#define jit_bler_d_fppop(d, s1, s2)   (FXCHr(1), jit_bger_d_fppop(d, s1, s2))
#define jit_bantiler_d_fppop(d, s1, s2)   (FXCHr(1), jit_bantiger_d_fppop(d, s1, s2))
#define jit_bgtr_d_fppop(d, s1, s2)   jit_fp_btest_fppop((d), 8, 0x45, 0, JZm)
#define jit_bantigtr_d_fppop(d, s1, s2)   jit_fp_btest_fppop((d), 8, 0x45, 0, JNZm)
#define jit_bltr_d_fppop(d, s1, s2)   (FXCHr(1), jit_bgtr_d_fppop(d, s1, s2))
#define jit_bantiltr_d_fppop(d, s1, s2)   (FXCHr(1), jit_bantigtr_d_fppop(d, s1, s2))
#define jit_beqr_d_fppop(d, s1, s2)   jit_fp_btest_fppop((d), 8, 0x45, 0x40, JZm)
#define jit_bantieqr_d_fppop(d, s1, s2)   jit_fp_btest_fppop((d), 8, 0x45, 0x40, JNZm)
#define jit_getarg_f(rd, ofs)   jit_ldxi_f((rd), JIT_FP,(ofs))
#define jit_getarg_d(rd, ofs)   jit_ldxi_d((rd), JIT_FP,(ofs))
#define jit_pusharg_d(rs)   (jit_subi_i(JIT_SP,JIT_SP,sizeof(double)), jit_str_d(JIT_SP,(rs)))
#define jit_pusharg_f(rs)   (jit_subi_i(JIT_SP,JIT_SP,sizeof(float)), jit_str_f(JIT_SP,(rs)))
#define jit_retval_d(op1)   jit_movr_d(0, (op1))

Class Documentation

union jit_double_imm

Definition at line 127 of file fp.h.

Class Members
double d
int i

Define Documentation

#define _jit_push_d (   immd)
Value:
(_O (0x68),                                                                    \
         _jit.x.uc_pc[4] = 0x68,                                                       \
         ((union jit_double_imm *) (_jit.x.uc_pc + 5))->d = (double) immd,             \
         *((int *) _jit.x.uc_pc) = ((union jit_double_imm *) (_jit.x.uc_pc + 5))->i[1],        \
         _jit.x.uc_pc += 9)

Definition at line 139 of file fp.h.

#define FPX ( )    ((void) 0)

Definition at line 145 of file fp.h.

#define jit_abs_d (   rd,
  rs 
)    jit_fp_unary ((rd), (rs), _OO (0xd9e1))

Definition at line 75 of file fp.h.

#define jit_abs_d_fppop (   rd,
  rs 
)    ( _OO (0xd9e1))

Definition at line 86 of file fp.h.

#define jit_addr_d (   rd,
  s1,
  s2 
)    jit_fp_binary((rd),(s1),(s2),FADDrr,FADDrr)

Definition at line 68 of file fp.h.

#define jit_addr_d_fppop (   rd,
  s1,
  s2 
)    (FADDPr(1))

Definition at line 79 of file fp.h.

#define jit_bantieqr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 8, 0x45, 0x40, JNZm)

Definition at line 389 of file fp.h.

#define jit_bantieqr_d_fppop (   d,
  s1,
  s2 
)    jit_fp_btest_fppop((d), 8, 0x45, 0x40, JNZm)

Definition at line 407 of file fp.h.

#define jit_bantiger_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 9, 0, 0, JCm)

Definition at line 379 of file fp.h.

#define jit_bantiger_d_fppop (   d,
  s1,
  s2 
)    jit_fp_btest_fppop((d), 9, 0, 0, JCm)

Definition at line 397 of file fp.h.

#define jit_bantigtr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 8, 0x45, 0, JNZm)

Definition at line 378 of file fp.h.

#define jit_bantigtr_d_fppop (   d,
  s1,
  s2 
)    jit_fp_btest_fppop((d), 8, 0x45, 0, JNZm)

Definition at line 402 of file fp.h.

#define jit_bantiler_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s2), (s1), 9, 0, 0, JCm)

Definition at line 385 of file fp.h.

#define jit_bantiler_d_fppop (   d,
  s1,
  s2 
)    (FXCHr(1), jit_bantiger_d_fppop(d, s1, s2))

Definition at line 399 of file fp.h.

#define jit_bantiltr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s2), (s1), 8, 0x45, 0, JNZm)

Definition at line 384 of file fp.h.

#define jit_bantiltr_d_fppop (   d,
  s1,
  s2 
)    (FXCHr(1), jit_bantigtr_d_fppop(d, s1, s2))

Definition at line 404 of file fp.h.

#define jit_beqr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 8, 0x45, 0x40, JZm)

Definition at line 388 of file fp.h.

#define jit_beqr_d_fppop (   d,
  s1,
  s2 
)    jit_fp_btest_fppop((d), 8, 0x45, 0x40, JZm)

Definition at line 406 of file fp.h.

#define jit_bger_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 9, 0, 0, JNCm)

Definition at line 377 of file fp.h.

#define jit_bger_d_fppop (   d,
  s1,
  s2 
)    jit_fp_btest_fppop((d), 9, 0, 0, JNCm)

Definition at line 396 of file fp.h.

#define jit_bgtr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 8, 0x45, 0, JZm)

Definition at line 376 of file fp.h.

#define jit_bgtr_d_fppop (   d,
  s1,
  s2 
)    jit_fp_btest_fppop((d), 8, 0x45, 0, JZm)

Definition at line 401 of file fp.h.

#define jit_bler_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s2), (s1), 9, 0, 0, JNCm)

Definition at line 383 of file fp.h.

#define jit_bler_d_fppop (   d,
  s1,
  s2 
)    (FXCHr(1), jit_bger_d_fppop(d, s1, s2))

Definition at line 398 of file fp.h.

#define jit_bltgtr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 15, 0, 0, JNCm)

Definition at line 391 of file fp.h.

#define jit_bltr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s2), (s1), 8, 0x45, 0, JZm)

Definition at line 382 of file fp.h.

#define jit_bltr_d_fppop (   d,
  s1,
  s2 
)    (FXCHr(1), jit_bgtr_d_fppop(d, s1, s2))

Definition at line 403 of file fp.h.

#define jit_bner_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 8, 0x45, 0x40, JNZm)

Definition at line 390 of file fp.h.

#define jit_bordr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 11, 0, 0, JNCm)

Definition at line 393 of file fp.h.

#define jit_buneqr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 15, 0, 0, JCm)

Definition at line 392 of file fp.h.

#define jit_bunger_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s2), (s1), 8, 0x45, 0, JNZm)

Definition at line 386 of file fp.h.

#define jit_bungtr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s2), (s1), 9, 0, 0, JCm)

Definition at line 387 of file fp.h.

#define jit_bunler_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 8, 0x45, 0, JNZm)

Definition at line 380 of file fp.h.

#define jit_bunltr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 9, 0, 0, JCm)

Definition at line 381 of file fp.h.

#define jit_bunordr_d (   d,
  s1,
  s2 
)    jit_fp_btest((d), (s1), (s2), 11, 0, 0, JCm)

Definition at line 394 of file fp.h.

#define jit_calc_diff (   ofs)
Value:
FISTLm(ofs, _ESP, 0, 0),    \
       FILDLm(ofs, _ESP, 0, 0),    \
       FSUBRPr(1),                 \
       FSTPSm(4+ofs, _ESP, 0, 0)   \

Definition at line 242 of file fp.h.

#define jit_ceil2 (   rd,
  aux 
)
Value:
(PUSHLr(aux),               \
       SUBLir(8, _ESP),            \
       jit_calc_diff(0),           \
       POPLr(rd),                  /* floor in rd */ \
       POPLr(aux),                 /* x-round(x) in aux */ \
       TESTLrr(aux, aux),          \
       SETGr(jit_reg8(aux)),              \
       SHRLir(1, aux),                    \
       ADCLir(0, rd),                     \
       POPLr(aux))

Definition at line 259 of file fp.h.

#define jit_ceilr_d_i (   rd,
  rs 
)    (FLDr (rs), jit_ceil2((rd), ((rd) == _EDX ? _EAX : _EDX)))

Definition at line 236 of file fp.h.

#define jit_divr_d (   rd,
  s1,
  s2 
)    jit_fp_binary((rd),(s1),(s2),FDIVrr,FDIVRrr)

Definition at line 72 of file fp.h.

#define jit_divr_d_fppop (   rd,
  s1,
  s2 
)    (FDIVPr(1))

Definition at line 83 of file fp.h.

#define jit_divrr_d (   rd,
  s1,
  s2 
)    jit_fp_binary((rd),(s1),(s2),FDIVRrr,FDIVrr)

Definition at line 73 of file fp.h.

#define jit_divrr_d_fppop (   rd,
  s1,
  s2 
)    (FDIVRPr(1))

Definition at line 84 of file fp.h.

#define jit_eqr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 8, 0x45, (CMPBir (0x40, _AL), SETEr (_AL)))

Definition at line 370 of file fp.h.

#define jit_extr_i_d (   rd,
  rs 
)
Value:
(PUSHLr((rs)),          \
  ((rd) == 0 ? (FSTPr (0), FILDLm(0, _ESP, 0, 0))      \
   : (FILDLm(0, _ESP, 0, 0), FSTPr ((rd) + 1))),       \
  POPLr((rs)))

Definition at line 204 of file fp.h.

#define jit_floor2 (   rd,
  aux 
)
Value:
(PUSHLr(aux),               \
       SUBLir(8, _ESP),            \
       jit_calc_diff(0),           \
       POPLr(rd),                  /* floor in rd */ \
       POPLr(aux),                 /* x-round(x) in aux */ \
       ADDLir(0x7FFFFFFF, aux),    /* carry if x-round(x) < -0 */ \
       SBBLir(0, rd),                     /* subtract 1 if carry */ \
       POPLr(aux))

Definition at line 249 of file fp.h.

#define jit_floorr_d_i (   rd,
  rs 
)    (FLDr (rs), jit_floor2((rd), ((rd) == _EDX ? _EAX : _EDX)))

Definition at line 233 of file fp.h.

#define jit_fp_binary (   rd,
  s1,
  s2,
  op,
  opr 
)
Value:
((rd) == (s1) ?                                 \
          ((s2) == 0 ? opr(0, (rd))                    \
           : (s2) == (s1) ? jit_fxch((rd), op(0, 0))   \
           : jit_fxch((rd), op((s2), 0)))              \
        : (rd) == (s2) ? ((s1) == 0 ? op((s1), (s2)) : jit_fxch((s2), opr((s1), 0))) \
        : (FLDr (s1), op(0, (s2)+1), FSTPr((rd)+1)))

Definition at line 60 of file fp.h.

#define jit_fp_btest (   d,
  s1,
  s2,
  n,
  _and,
  cmp,
  res 
)
Value:
(((s1) == 0 ? FCOMr((s2)) : (FLDr((s1)), FUCOMPr((s2) + 1))),    \
        PUSHQr(_EAX),                                          \
        FNSTSWr(_EAX),                                         \
        SHRLir(n, _EAX),                                       \
        (void)((_and) ? ANDLir ((_and), _EAX) : 0),            \
        ((cmp) ? CMPLir ((cmp), _AL) : 0),                     \
        (void) POPQr(_EAX),                                     \
        res ((d), 0, 0, 0), _jit.x.pc)

Definition at line 306 of file fp.h.

#define jit_fp_btest_fppop (   d,
  n,
  _and,
  cmp,
  res 
)
Value:
(FUCOMPPr(1),                                           \
        PUSHQr(_EAX),                                          \
        FNSTSWr(_EAX),                                         \
        SHRLir(n, _EAX),                                       \
        (void)((_and) ? ANDLir ((_and), _EAX) : 0),            \
        (void)((cmp) ? CMPLir ((cmp), _AL) : 0),               \
        POPQr(_EAX),                                           \
        res ((d), 0, 0, 0), _jit.x.pc)

Definition at line 325 of file fp.h.

#define jit_fp_test (   d,
  s1,
  s2,
  n,
  _and,
  res 
)
Value:
(((s1) == 0 ? FUCOMr((s2)) : (FLDr((s1)), FUCOMPr((s2) + 1))),     \
        ((d) != _EAX ? MOVLrr(_EAX, (d)) : 0),                 \
        FNSTSWr(_EAX),                                         \
        SHRLir(n, _EAX),                                       \
        ((_and) ? ANDLir((_and), _EAX) : MOVLir(0, _EAX)),     \
        res,                                                   \
        ((d) != _EAX ? _O (0x90 + ((d) & 7)) : 0))     /* xchg */

Definition at line 297 of file fp.h.

#define jit_fp_test_fppop (   d,
  n,
  _and,
  res 
)
Value:
(FUCOMPPr(1),                                           \
        ((d) != _EAX ? MOVLrr(_EAX, (d)) : 0),                 \
        FNSTSWr(_EAX),                                         \
        SHRLir(n, _EAX),                                       \
        ((_and) ? ANDLir((_and), _EAX) : MOVLir(0, _EAX)),     \
        res,                                                   \
        ((d) != _EAX ? _O (0x90 + ((d) & 7)) : 0))     /* xchg */

Definition at line 316 of file fp.h.

#define jit_fp_unary (   rd,
  s1,
  op 
)
Value:
((rd) == (s1) ? jit_fxch ((rd), op)             \
        : (rd) == 0 ? (FSTPr (0), FLDr ((s1)-1), op)   \
        : (FLDr ((s1)), op, FSTPr ((rd))))

Definition at line 55 of file fp.h.

#define JIT_FPR (   i)    (i)

Definition at line 50 of file fp.h.

#define JIT_FPR_NUM   6

Definition at line 49 of file fp.h.

#define jit_fxch (   rs,
  op 
)
Value:
(((rs) != 0 ? FXCHr(rs) : (void)0),      \
                                op, ((rs) != 0 ? FXCHr(rs) : (void)0))

Definition at line 52 of file fp.h.

#define jit_ger_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 9, 0, SBBBir (-1, _AL))

Definition at line 363 of file fp.h.

#define jit_getarg_d (   rd,
  ofs 
)    jit_ldxi_d((rd), JIT_FP,(ofs))

Definition at line 410 of file fp.h.

#define jit_getarg_f (   rd,
  ofs 
)    jit_ldxi_f((rd), JIT_FP,(ofs))

Definition at line 409 of file fp.h.

#define jit_gtr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 8, 0x45, SETZr (_AL))

Definition at line 362 of file fp.h.

#define jit_ldi_d (   rd,
  is 
)
Value:
((rd) == 0 ? (FSTPr (0), FPX(), FLDLm((is), 0, 0, 0)) \
   : (FPX(), FLDLm((is), 0, 0, 0), FSTPr ((rd) + 1)))

Definition at line 169 of file fp.h.

#define jit_ldi_d_fppush (   rd,
  is 
)    (FPX(), FLDLm((is), 0, 0, 0))

Definition at line 173 of file fp.h.

#define jit_ldi_f (   rd,
  is 
)
Value:
((rd) == 0 ? (FSTPr (0), FLDSm((is), 0, 0, 0))       \
   : (FLDSm((is), 0, 0, 0), FSTPr ((rd) + 1)))

Definition at line 165 of file fp.h.

#define jit_ldr_d (   rd,
  rs 
)
Value:
((rd) == 0 ? (FSTPr (0), FPX(), FLDLm(0, (rs), 0, 0)) \
   : (FPX(), FLDLm(0, (rs), 0, 0), FSTPr ((rd) + 1)))

Definition at line 180 of file fp.h.

#define jit_ldr_d_fppush (   rd,
  rs 
)    (FPX(), FLDLm(0, (rs), 0, 0))

Definition at line 184 of file fp.h.

#define jit_ldr_f (   rd,
  rs 
)
Value:
((rd) == 0 ? (FSTPr (0), FPX(), FLDSm(0, (rs), 0, 0)) \
   : (FPX(), FLDSm(0, (rs), 0, 0), FSTPr ((rd) + 1)))

Definition at line 176 of file fp.h.

#define jit_ldxi_d (   rd,
  rs,
  is 
)
Value:
((rd) == 0 ? (FSTPr (0), FPX(), FLDLm((is), (rs), 0, 0))       \
   : (FPX(), FLDLm((is), (rs), 0, 0), FSTPr ((rd) + 1)))

Definition at line 190 of file fp.h.

#define jit_ldxi_d_fppush (   rd,
  rs,
  is 
)    (FPX(), FLDLm((is), (rs), 0, 0))

Definition at line 194 of file fp.h.

#define jit_ldxi_f (   rd,
  rs,
  is 
)
Value:
((rd) == 0 ? (FSTPr (0), FPX(), FLDSm((is), (rs), 0, 0))       \
   : (FPX(), FLDSm((is), (rs), 0, 0), FSTPr ((rd) + 1)))

Definition at line 186 of file fp.h.

#define jit_ldxr_d (   rd,
  s1,
  s2 
)
Value:
((rd) == 0 ? (FSTPr (0), FPX(), FLDLm(0, (s1), (s2), 1))       \
   : (FPX(), FLDLm(0, (s1), (s2), 1), FSTPr ((rd) + 1)))

Definition at line 200 of file fp.h.

#define jit_ldxr_f (   rd,
  s1,
  s2 
)
Value:
((rd) == 0 ? (FSTPr (0), FPX(), FLDSm(0, (s1), (s2), 1))       \
   : (FPX(), FLDSm(0, (s1), (s2), 1), FSTPr ((rd) + 1)))

Definition at line 196 of file fp.h.

#define jit_ler_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s2), (s1), 9, 0, SBBBir (-1, _AL))

Definition at line 367 of file fp.h.

#define jit_ltgtr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 15, 0, SBBBir (-1, _AL))

Definition at line 372 of file fp.h.

#define jit_ltr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s2), (s1), 8, 0x45, SETZr (_AL))

Definition at line 366 of file fp.h.

#define jit_movi_d (   rd,
  immd 
)
Value:
(_jit_push_d(immd),                                                            \
        jit_ldr_d((rd), _ESP),                                                         \
        ADDQir(8, _ESP))

Definition at line 148 of file fp.h.

#define jit_movi_d_fppush (   rd,
  immd 
)
Value:
(_jit_push_d(immd),                                                            \
        jit_ldr_d_fppush((rd), _ESP),                                                         \
        ADDQir(8, _ESP))

Definition at line 153 of file fp.h.

#define jit_movi_f (   rd,
  immf 
)
Value:
(_O (0x68),                            \
         *((float *) _jit.x.pc) = (float) immf, \
         _jit.x.uc_pc += sizeof (float),       \
        jit_ldr_f((rd), _ESP),                 \
        ADDQir(4, _ESP))

Definition at line 120 of file fp.h.

#define jit_movr_d (   rd,
  s1 
)
Value:
((s1) == (rd) ? 0                               \
        : (s1) == 0 ? FSTr ((rd))                      \
        : (rd) == 0 ? (FXCHr ((s1)), FSTr ((s1)))      \
        : (FLDr ((s1)), FSTr ((rd)+1)))

Definition at line 101 of file fp.h.

#define jit_mulr_d (   rd,
  s1,
  s2 
)    jit_fp_binary((rd),(s1),(s2),FMULrr,FMULrr)

Definition at line 71 of file fp.h.

#define jit_mulr_d_fppop (   rd,
  s1,
  s2 
)    (FMULPr(1))

Definition at line 82 of file fp.h.

#define jit_negr_d (   rd,
  rs 
)    jit_fp_unary ((rd), (rs), _OO (0xd9e0))

Definition at line 76 of file fp.h.

#define jit_negr_d_fppop (   rd,
  rs 
)    ( _OO (0xd9e0))

Definition at line 85 of file fp.h.

#define jit_ner_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 8, 0x45, (CMPBir (0x40, _AL), SETNEr (_AL)))

Definition at line 371 of file fp.h.

#define jit_nothing_needed (   x)

Definition at line 335 of file fp.h.

#define jit_ordr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 11, 0, SBBBir (-1, _AL))

Definition at line 374 of file fp.h.

#define jit_pusharg_d (   rs)    (jit_subi_i(JIT_SP,JIT_SP,sizeof(double)), jit_str_d(JIT_SP,(rs)))

Definition at line 411 of file fp.h.

#define jit_pusharg_f (   rs)    (jit_subi_i(JIT_SP,JIT_SP,sizeof(float)), jit_str_f(JIT_SP,(rs)))

Definition at line 412 of file fp.h.

#define jit_retval_d (   op1)    jit_movr_d(0, (op1))

Definition at line 413 of file fp.h.

#define jit_roundr_d_i (   rd,
  rs 
)
Value:
(PUSHLr(_EAX),                                 \
        jit_fxch ((rs), FISTPLm(0, _ESP, 0, 0)),       \
       POPLr((rd)))

Definition at line 292 of file fp.h.

#define jit_sqrt_d (   rd,
  rs 
)    jit_fp_unary ((rd), (rs), _OO (0xd9fa))

Definition at line 77 of file fp.h.

#define jit_sti_d (   id,
  rs 
)    jit_fxch ((rs), FPX(), FSTLm((id), 0, 0, 0))

Definition at line 223 of file fp.h.

#define jit_sti_d_fppop (   id,
  rs 
)    (FPX(), FSTPLm((id), 0, 0, 0))

Definition at line 226 of file fp.h.

#define jit_sti_f (   id,
  rs 
)    jit_fxch ((rs), FPX(), FSTSm((id), 0, 0, 0))

Definition at line 221 of file fp.h.

#define jit_str_d (   rd,
  rs 
)    jit_fxch ((rs), FPX(), FSTLm(0, (rd), 0, 0))

Definition at line 224 of file fp.h.

#define jit_str_d_fppop (   rd,
  rs 
)    (FPX(), FSTPLm(0, (rd), 0, 0))

Definition at line 230 of file fp.h.

#define jit_str_f (   rd,
  rs 
)    jit_fxch ((rs), FPX(), FSTSm(0, (rd), 0, 0))

Definition at line 222 of file fp.h.

#define jit_stxi_d (   id,
  rd,
  rs 
)    jit_fxch ((rs), FPX(), FSTLm((id), (rd), 0, 0))

Definition at line 211 of file fp.h.

#define jit_stxi_d_fppop (   id,
  rd,
  rs 
)    (FPX(), FSTPLm((id), (rd), 0, 0))

Definition at line 228 of file fp.h.

#define jit_stxi_f (   id,
  rd,
  rs 
)    jit_fxch ((rs), FPX(), FSTSm((id), (rd), 0, 0))

Definition at line 209 of file fp.h.

#define jit_stxr_d (   d1,
  d2,
  rs 
)    jit_fxch ((rs), FPX(), FSTLm(0, (d1), (d2), 1))

Definition at line 212 of file fp.h.

#define jit_stxr_f (   d1,
  d2,
  rs 
)    jit_fxch ((rs), FPX(), FSTSm(0, (d1), (d2), 1))

Definition at line 210 of file fp.h.

#define jit_subr_d (   rd,
  s1,
  s2 
)    jit_fp_binary((rd),(s1),(s2),FSUBrr,FSUBRrr)

Definition at line 69 of file fp.h.

#define jit_subr_d_fppop (   rd,
  s1,
  s2 
)    (FSUBPr(1))

Definition at line 80 of file fp.h.

#define jit_subrr_d (   rd,
  s1,
  s2 
)    jit_fp_binary((rd),(s1),(s2),FSUBRrr,FSUBrr)

Definition at line 70 of file fp.h.

#define jit_subrr_d_fppop (   rd,
  s1,
  s2 
)    (FSUBRPr(1))

Definition at line 81 of file fp.h.

#define jit_trunc2 (   rd,
  aux 
)
Value:
(PUSHLr(aux),                      \
       SUBLir(12, _ESP),                  \
       FSTSm(0, _ESP, 0, 0),                     \
       jit_calc_diff(4),                  \
       POPLr(aux),                        \
       POPLr(rd),                         \
       TESTLrr(aux, aux),                 \
       POPLr(aux),                        \
       JSSm(_jit.x.pc + 11, 0, 0, 0),            \
       ADDLir(0x7FFFFFFF, aux),    /* 6 */       \
       SBBLir(0, rd),                     /* 3 */ \
       JMPSm(_jit.x.pc + 10, 0, 0, 0),    /* 2 */ \
       TESTLrr(aux, aux),          /* 2 */ \
       SETGr(jit_reg8(aux)),              /* 3 */ \
       SHRLir(1, aux),                    /* 2 */ \
       ADCLir(0, rd),                     /* 3 */ \
       POPLr(aux))

Definition at line 272 of file fp.h.

#define jit_truncr_d_i (   rd,
  rs 
)    (FLDr (rs), jit_trunc2((rd), ((rd) == _EDX ? _EAX : _EDX)))

Definition at line 239 of file fp.h.

#define jit_uneqr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 15, 0, ADCBir (0, _AL))

Definition at line 373 of file fp.h.

#define jit_unger_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s2), (s1), 8, 0x45, SETNZr (_AL))

Definition at line 368 of file fp.h.

#define jit_ungtr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s2), (s1), 9, 0, ADCBir (0, _AL))

Definition at line 369 of file fp.h.

#define jit_unler_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 8, 0x45, SETNZr (_AL))

Definition at line 364 of file fp.h.

#define jit_unltr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 9, 0, ADCBir (0, _AL))

Definition at line 365 of file fp.h.

#define jit_unordr_d (   d,
  s1,
  s2 
)    jit_fp_test((d), (s1), (s2), 11, 0, ADCBir (0, _AL))

Definition at line 375 of file fp.h.