summaryrefslogtreecommitdiff
path: root/src/lj_target_x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_target_x86.h')
-rw-r--r--src/lj_target_x86.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lj_target_x86.h b/src/lj_target_x86.h
index 564ffc63..48b53b6d 100644
--- a/src/lj_target_x86.h
+++ b/src/lj_target_x86.h
@@ -21,6 +21,8 @@
21#define FPRDEF(_) \ 21#define FPRDEF(_) \
22 _(XMM0) _(XMM1) _(XMM2) _(XMM3) _(XMM4) _(XMM5) _(XMM6) _(XMM7) 22 _(XMM0) _(XMM1) _(XMM2) _(XMM3) _(XMM4) _(XMM5) _(XMM6) _(XMM7)
23#endif 23#endif
24#define VRIDDEF(_) \
25 _(MRM)
24 26
25#define RIDENUM(name) RID_##name, 27#define RIDENUM(name) RID_##name,
26 28
@@ -63,6 +65,7 @@ enum {
63#define RSET_GPR (RSET_RANGE(RID_MIN_GPR, RID_MAX_GPR)-RID2RSET(RID_ESP)) 65#define RSET_GPR (RSET_RANGE(RID_MIN_GPR, RID_MAX_GPR)-RID2RSET(RID_ESP))
64#define RSET_FPR (RSET_RANGE(RID_MIN_FPR, RID_MAX_FPR)) 66#define RSET_FPR (RSET_RANGE(RID_MIN_FPR, RID_MAX_FPR))
65#define RSET_ALL (RSET_GPR|RSET_FPR) 67#define RSET_ALL (RSET_GPR|RSET_FPR)
68#define RSET_INIT RSET_ALL
66 69
67#if LJ_64 70#if LJ_64
68/* Note: this requires the use of FORCE_REX! */ 71/* Note: this requires the use of FORCE_REX! */
@@ -80,6 +83,7 @@ enum {
80 (RSET_ACD|RSET_RANGE(RID_R8D, RID_R11D+1)|RSET_RANGE(RID_XMM0, RID_XMM5+1)) 83 (RSET_ACD|RSET_RANGE(RID_R8D, RID_R11D+1)|RSET_RANGE(RID_XMM0, RID_XMM5+1))
81#define REGARG_GPRS \ 84#define REGARG_GPRS \
82 (RID_ECX|((RID_EDX|((RID_R8D|(RID_R9D<<5))<<5))<<5)) 85 (RID_ECX|((RID_EDX|((RID_R8D|(RID_R9D<<5))<<5))<<5))
86#define REGARG_NUMGPR 4
83#define REGARG_FIRSTFPR RID_XMM0 87#define REGARG_FIRSTFPR RID_XMM0
84#define REGARG_LASTFPR RID_XMM3 88#define REGARG_LASTFPR RID_XMM3
85#define STACKARG_OFS (4*8) 89#define STACKARG_OFS (4*8)
@@ -90,6 +94,7 @@ enum {
90#define REGARG_GPRS \ 94#define REGARG_GPRS \
91 (RID_EDI|((RID_ESI|((RID_EDX|((RID_ECX|((RID_R8D|(RID_R9D \ 95 (RID_EDI|((RID_ESI|((RID_EDX|((RID_ECX|((RID_R8D|(RID_R9D \
92 <<5))<<5))<<5))<<5))<<5)) 96 <<5))<<5))<<5))<<5))<<5))
97#define REGARG_NUMGPR 6
93#define REGARG_FIRSTFPR RID_XMM0 98#define REGARG_FIRSTFPR RID_XMM0
94#define REGARG_LASTFPR RID_XMM7 99#define REGARG_LASTFPR RID_XMM7
95#define STACKARG_OFS 0 100#define STACKARG_OFS 0
@@ -98,6 +103,7 @@ enum {
98/* Common x86 ABI. */ 103/* Common x86 ABI. */
99#define RSET_SCRATCH (RSET_ACD|RSET_FPR) 104#define RSET_SCRATCH (RSET_ACD|RSET_FPR)
100#define REGARG_GPRS (RID_ECX|(RID_EDX<<5)) /* Fastcall only. */ 105#define REGARG_GPRS (RID_ECX|(RID_EDX<<5)) /* Fastcall only. */
106#define REGARG_NUMGPR 2 /* Fastcall only. */
101#define STACKARG_OFS 0 107#define STACKARG_OFS 0
102#endif 108#endif
103 109