aboutsummaryrefslogtreecommitdiff
path: root/src/lj_jit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_jit.h')
-rw-r--r--src/lj_jit.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/lj_jit.h b/src/lj_jit.h
index ecd79de5..4246e9db 100644
--- a/src/lj_jit.h
+++ b/src/lj_jit.h
@@ -14,18 +14,15 @@
14 14
15/* CPU-specific JIT engine flags. */ 15/* CPU-specific JIT engine flags. */
16#if LJ_TARGET_X86ORX64 16#if LJ_TARGET_X86ORX64
17#define JIT_F_CMOV 0x00000010 17#define JIT_F_SSE2 0x00000010
18#define JIT_F_SSE2 0x00000020 18#define JIT_F_SSE3 0x00000020
19#define JIT_F_SSE3 0x00000040 19#define JIT_F_SSE4_1 0x00000040
20#define JIT_F_SSE4_1 0x00000080 20#define JIT_F_PREFER_IMUL 0x00000080
21#define JIT_F_P4 0x00000100 21#define JIT_F_LEA_AGU 0x00000100
22#define JIT_F_PREFER_IMUL 0x00000200
23#define JIT_F_SPLIT_XMM 0x00000400
24#define JIT_F_LEA_AGU 0x00000800
25 22
26/* Names for the CPU-specific flags. Must match the order above. */ 23/* Names for the CPU-specific flags. Must match the order above. */
27#define JIT_F_CPU_FIRST JIT_F_CMOV 24#define JIT_F_CPU_FIRST JIT_F_SSE2
28#define JIT_F_CPUSTRING "\4CMOV\4SSE2\4SSE3\6SSE4.1\2P4\3AMD\2K8\4ATOM" 25#define JIT_F_CPUSTRING "\4SSE2\4SSE3\6SSE4.1\3AMD\4ATOM"
29#elif LJ_TARGET_ARM 26#elif LJ_TARGET_ARM
30#define JIT_F_ARMV6_ 0x00000010 27#define JIT_F_ARMV6_ 0x00000010
31#define JIT_F_ARMV6T2_ 0x00000020 28#define JIT_F_ARMV6T2_ 0x00000020
@@ -100,6 +97,7 @@
100 _(\012, maxirconst, 500) /* Max. # of IR constants of a trace. */ \ 97 _(\012, maxirconst, 500) /* Max. # of IR constants of a trace. */ \
101 _(\007, maxside, 100) /* Max. # of side traces of a root trace. */ \ 98 _(\007, maxside, 100) /* Max. # of side traces of a root trace. */ \
102 _(\007, maxsnap, 500) /* Max. # of snapshots for a trace. */ \ 99 _(\007, maxsnap, 500) /* Max. # of snapshots for a trace. */ \
100 _(\011, minstitch, 0) /* Min. # of IR ins for a stitched trace. */ \
103 \ 101 \
104 _(\007, hotloop, 56) /* # of iter. to detect a hot loop/call. */ \ 102 _(\007, hotloop, 56) /* # of iter. to detect a hot loop/call. */ \
105 _(\007, hotexit, 10) /* # of taken exits to start a side trace. */ \ 103 _(\007, hotexit, 10) /* # of taken exits to start a side trace. */ \
@@ -205,7 +203,8 @@ typedef enum {
205 LJ_TRLINK_UPREC, /* Up-recursion. */ 203 LJ_TRLINK_UPREC, /* Up-recursion. */
206 LJ_TRLINK_DOWNREC, /* Down-recursion. */ 204 LJ_TRLINK_DOWNREC, /* Down-recursion. */
207 LJ_TRLINK_INTERP, /* Fallback to interpreter. */ 205 LJ_TRLINK_INTERP, /* Fallback to interpreter. */
208 LJ_TRLINK_RETURN /* Return to interpreter. */ 206 LJ_TRLINK_RETURN, /* Return to interpreter. */
207 LJ_TRLINK_STITCH /* Trace stitching. */
209} TraceLink; 208} TraceLink;
210 209
211/* Trace object. */ 210/* Trace object. */
@@ -400,6 +399,12 @@ typedef struct jit_State {
400 size_t szallmcarea; /* Total size of all allocated mcode areas. */ 399 size_t szallmcarea; /* Total size of all allocated mcode areas. */
401 400
402 TValue errinfo; /* Additional info element for trace errors. */ 401 TValue errinfo; /* Additional info element for trace errors. */
402
403#if LJ_HASPROFILE
404 GCproto *prev_pt; /* Previous prototype. */
405 BCLine prev_line; /* Previous line. */
406 int prof_mode; /* Profiling mode: 0, 'f', 'l'. */
407#endif
403} 408}
404#if LJ_TARGET_ARM 409#if LJ_TARGET_ARM
405LJ_ALIGN(16) /* For DISPATCH-relative addresses in assembler part. */ 410LJ_ALIGN(16) /* For DISPATCH-relative addresses in assembler part. */