aboutsummaryrefslogtreecommitdiff
path: root/src/lj_target_x86.h
diff options
context:
space:
mode:
authorMike Pall <mike>2011-02-02 02:29:37 +0100
committerMike Pall <mike>2011-02-02 02:29:37 +0100
commitb613216efc7447dae645d8834e4d6f3185cd1bcc (patch)
tree0859fed377f00ebeada70ba45d02496b7fb4a249 /src/lj_target_x86.h
parentc539c0cac8f668e66a5ce9e5fd645cb45e3c5063 (diff)
downloadluajit-b613216efc7447dae645d8834e4d6f3185cd1bcc.tar.gz
luajit-b613216efc7447dae645d8834e4d6f3185cd1bcc.tar.bz2
luajit-b613216efc7447dae645d8834e4d6f3185cd1bcc.zip
Add SPLIT pass to split 64 bit IR instructions for 32 bit CPUs.
Add generic HIOP instruction for extra backend functionality. Add support for HIOP to x86 backend. Use POWI for 64 bit integer x^k, too. POWI is lowered to a call by SPLIT or the x64 backend.
Diffstat (limited to 'src/lj_target_x86.h')
-rw-r--r--src/lj_target_x86.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lj_target_x86.h b/src/lj_target_x86.h
index 94ab3c32..37c68f4b 100644
--- a/src/lj_target_x86.h
+++ b/src/lj_target_x86.h
@@ -193,6 +193,7 @@ typedef enum {
193 XI_FLD1 = 0xe8d9, 193 XI_FLD1 = 0xe8d9,
194 XI_FLDLG2 = 0xecd9, 194 XI_FLDLG2 = 0xecd9,
195 XI_FLDLN2 = 0xedd9, 195 XI_FLDLN2 = 0xedd9,
196 XI_FDUP = 0xc0d9, /* Really fld st0. */
196 XI_FPOP = 0xd8dd, /* Really fstp st0. */ 197 XI_FPOP = 0xd8dd, /* Really fstp st0. */
197 XI_FPOP1 = 0xd9dd, /* Really fstp st1. */ 198 XI_FPOP1 = 0xd9dd, /* Really fstp st1. */
198 XI_FRNDINT = 0xfcd9, 199 XI_FRNDINT = 0xfcd9,
@@ -263,10 +264,17 @@ typedef enum {
263 XO_MOVD = XO_660f(6e), 264 XO_MOVD = XO_660f(6e),
264 XO_MOVDto = XO_660f(7e), 265 XO_MOVDto = XO_660f(7e),
265 266
267 XO_FLDd = XO_(d9), XOg_FLDd = 0,
266 XO_FLDq = XO_(dd), XOg_FLDq = 0, 268 XO_FLDq = XO_(dd), XOg_FLDq = 0,
267 XO_FILDd = XO_(db), XOg_FILDd = 0, 269 XO_FILDd = XO_(db), XOg_FILDd = 0,
270 XO_FILDq = XO_(df), XOg_FILDq = 5,
271 XO_FSTPd = XO_(d9), XOg_FSTPd = 3,
268 XO_FSTPq = XO_(dd), XOg_FSTPq = 3, 272 XO_FSTPq = XO_(dd), XOg_FSTPq = 3,
269 XO_FISTPq = XO_(df), XOg_FISTPq = 7, 273 XO_FISTPq = XO_(df), XOg_FISTPq = 7,
274 XO_FISTTPq = XO_(dd), XOg_FISTTPq = 1,
275 XO_FADDq = XO_(dc), XOg_FADDq = 0,
276 XO_FLDCW = XO_(d9), XOg_FLDCW = 5,
277 XO_FNSTCW = XO_(d9), XOg_FNSTCW = 7
270} x86Op; 278} x86Op;
271 279
272/* x86 opcode groups. */ 280/* x86 opcode groups. */
@@ -278,6 +286,7 @@ typedef uint32_t x86Group;
278#define XG_TOXOi8(xg) ((x86Op)(0x000000fe + (((xg)<<8) & 0xff000000))) 286#define XG_TOXOi8(xg) ((x86Op)(0x000000fe + (((xg)<<8) & 0xff000000)))
279 287
280#define XO_ARITH(a) ((x86Op)(0x030000fe + ((a)<<27))) 288#define XO_ARITH(a) ((x86Op)(0x030000fe + ((a)<<27)))
289#define XO_ARITHw(a) ((x86Op)(0x036600fd + ((a)<<27)))
281 290
282typedef enum { 291typedef enum {
283 XOg_ADD, XOg_OR, XOg_ADC, XOg_SBB, XOg_AND, XOg_SUB, XOg_XOR, XOg_CMP, 292 XOg_ADD, XOg_OR, XOg_ADC, XOg_SBB, XOg_AND, XOg_SUB, XOg_XOR, XOg_CMP,