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.
This commit is contained in:
Mike Pall
2011-02-02 02:29:37 +01:00
parent c539c0cac8
commit b613216efc
14 changed files with 795 additions and 116 deletions

View File

@@ -240,6 +240,15 @@ enum {
#define LJ_KSIMD(J, n) \
((TValue *)(((intptr_t)&J->ksimd[2*(n)] + 15) & ~(intptr_t)15))
/* Set/reset flag to activate the SPLIT pass for the current trace. */
#if LJ_32 && LJ_HASFFI
#define lj_needsplit(J) (J->needsplit = 1)
#define lj_resetsplit(J) (J->needsplit = 0)
#else
#define lj_needsplit(J) UNUSED(J)
#define lj_resetsplit(J) UNUSED(J)
#endif
/* Fold state is used to fold instructions on-the-fly. */
typedef struct FoldState {
IRIns ins; /* Currently emitted instruction. */
@@ -293,6 +302,9 @@ typedef struct jit_State {
MSize sizesnapmap; /* Size of temp. snapshot map buffer. */
PostProc postproc; /* Required post-processing after execution. */
#if LJ_32 && LJ_HASFFI
int needsplit; /* Need SPLIT pass. */
#endif
GCRef *trace; /* Array of traces. */
TraceNo freetrace; /* Start of scan for next free trace. */