summaryrefslogtreecommitdiff
path: root/src/lj_iropt.h
diff options
context:
space:
mode:
authorMike Pall <mike>2010-12-05 21:50:52 +0100
committerMike Pall <mike>2010-12-05 22:12:31 +0100
commit5a13fa69d95993fa68b12be4091f48b80844bdcf (patch)
tree73ec2ee4d64eec20245f198fde91eff9b3eadf35 /src/lj_iropt.h
parentb1fb71fb981c464868e6bc669363658a98ecbd9e (diff)
downloadluajit-5a13fa69d95993fa68b12be4091f48b80844bdcf.tar.gz
luajit-5a13fa69d95993fa68b12be4091f48b80844bdcf.tar.bz2
luajit-5a13fa69d95993fa68b12be4091f48b80844bdcf.zip
Add IR_KINT64.
Diffstat (limited to 'src/lj_iropt.h')
-rw-r--r--src/lj_iropt.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lj_iropt.h b/src/lj_iropt.h
index 00bb2496..c05040d6 100644
--- a/src/lj_iropt.h
+++ b/src/lj_iropt.h
@@ -39,10 +39,11 @@ static LJ_AINLINE IRRef lj_ir_nextins(jit_State *J)
39 39
40/* Interning of constants. */ 40/* Interning of constants. */
41LJ_FUNC TRef LJ_FASTCALL lj_ir_kint(jit_State *J, int32_t k); 41LJ_FUNC TRef LJ_FASTCALL lj_ir_kint(jit_State *J, int32_t k);
42LJ_FUNC void lj_ir_knum_freeall(jit_State *J); 42LJ_FUNC void lj_ir_k64_freeall(jit_State *J);
43LJ_FUNC TRef lj_ir_knum_addr(jit_State *J, cTValue *tv); 43LJ_FUNC TRef lj_ir_k64(jit_State *J, IROp op, cTValue *tv);
44LJ_FUNC TRef lj_ir_knum_nn(jit_State *J, uint64_t nn); 44LJ_FUNC TRef lj_ir_knum_u64(jit_State *J, uint64_t u64);
45LJ_FUNC TRef lj_ir_knumint(jit_State *J, lua_Number n); 45LJ_FUNC TRef lj_ir_knumint(jit_State *J, lua_Number n);
46LJ_FUNC TRef lj_ir_kint64(jit_State *J, uint64_t u64);
46LJ_FUNC TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t); 47LJ_FUNC TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t);
47LJ_FUNC TRef lj_ir_kptr(jit_State *J, void *ptr); 48LJ_FUNC TRef lj_ir_kptr(jit_State *J, void *ptr);
48LJ_FUNC TRef lj_ir_knull(jit_State *J, IRType t); 49LJ_FUNC TRef lj_ir_knull(jit_State *J, IRType t);
@@ -52,7 +53,7 @@ static LJ_AINLINE TRef lj_ir_knum(jit_State *J, lua_Number n)
52{ 53{
53 TValue tv; 54 TValue tv;
54 tv.n = n; 55 tv.n = n;
55 return lj_ir_knum_nn(J, tv.u64); 56 return lj_ir_knum_u64(J, tv.u64);
56} 57}
57 58
58#define lj_ir_kstr(J, str) lj_ir_kgc(J, obj2gco((str)), IRT_STR) 59#define lj_ir_kstr(J, str) lj_ir_kgc(J, obj2gco((str)), IRT_STR)
@@ -60,13 +61,13 @@ static LJ_AINLINE TRef lj_ir_knum(jit_State *J, lua_Number n)
60#define lj_ir_kfunc(J, func) lj_ir_kgc(J, obj2gco((func)), IRT_FUNC) 61#define lj_ir_kfunc(J, func) lj_ir_kgc(J, obj2gco((func)), IRT_FUNC)
61 62
62/* Special FP constants. */ 63/* Special FP constants. */
63#define lj_ir_knum_zero(J) lj_ir_knum_nn(J, U64x(00000000,00000000)) 64#define lj_ir_knum_zero(J) lj_ir_knum_u64(J, U64x(00000000,00000000))
64#define lj_ir_knum_one(J) lj_ir_knum_nn(J, U64x(3ff00000,00000000)) 65#define lj_ir_knum_one(J) lj_ir_knum_u64(J, U64x(3ff00000,00000000))
65#define lj_ir_knum_tobit(J) lj_ir_knum_nn(J, U64x(43380000,00000000)) 66#define lj_ir_knum_tobit(J) lj_ir_knum_u64(J, U64x(43380000,00000000))
66 67
67/* Special 128 bit SIMD constants. */ 68/* Special 128 bit SIMD constants. */
68#define lj_ir_knum_abs(J) lj_ir_knum_addr(J, LJ_KSIMD(J, LJ_KSIMD_ABS)) 69#define lj_ir_knum_abs(J) lj_ir_k64(J, IR_KNUM, LJ_KSIMD(J, LJ_KSIMD_ABS))
69#define lj_ir_knum_neg(J) lj_ir_knum_addr(J, LJ_KSIMD(J, LJ_KSIMD_NEG)) 70#define lj_ir_knum_neg(J) lj_ir_k64(J, IR_KNUM, LJ_KSIMD(J, LJ_KSIMD_NEG))
70 71
71/* Access to constants. */ 72/* Access to constants. */
72LJ_FUNC void lj_ir_kvalue(lua_State *L, TValue *tv, const IRIns *ir); 73LJ_FUNC void lj_ir_kvalue(lua_State *L, TValue *tv, const IRIns *ir);