aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2012-06-11 00:51:59 +0200
committerMike Pall <mike>2012-06-11 00:51:59 +0200
commit3f1035a17022be12f237a42a8e55b812b904bca1 (patch)
tree5d8534fb216174f2dcd556ee2167f77c31850620
parent7da4d16faa5009f181b24c17d6fb73830f52fea7 (diff)
downloadluajit-3f1035a17022be12f237a42a8e55b812b904bca1.tar.gz
luajit-3f1035a17022be12f237a42a8e55b812b904bca1.tar.bz2
luajit-3f1035a17022be12f237a42a8e55b812b904bca1.zip
PPC/e500: Cleanup interpreter.
Use DynASM defines instead of C defines.
-rw-r--r--src/vm_ppcspe.dasc74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/vm_ppcspe.dasc b/src/vm_ppcspe.dasc
index a7ef3ccd..0ee687c2 100644
--- a/src/vm_ppcspe.dasc
+++ b/src/vm_ppcspe.dasc
@@ -867,17 +867,17 @@ static void build_subroutines(BuildCtx *ctx)
867 | stw PC, SAVE_PC 867 | stw PC, SAVE_PC
868 | mr SAVE0, INS 868 | mr SAVE0, INS
869 | bl extern lj_meta_for // (lua_State *L, TValue *base) 869 | bl extern lj_meta_for // (lua_State *L, TValue *base)
870#if LJ_HASJIT 870 |.if JIT
871 | decode_OP1 TMP0, SAVE0 871 | decode_OP1 TMP0, SAVE0
872#endif 872 |.endif
873 | decode_RA8 RA, SAVE0 873 | decode_RA8 RA, SAVE0
874#if LJ_HASJIT 874 |.if JIT
875 | cmpwi TMP0, BC_JFORI 875 | cmpwi TMP0, BC_JFORI
876#endif 876 |.endif
877 | decode_RD8 RD, SAVE0 877 | decode_RD8 RD, SAVE0
878#if LJ_HASJIT 878 |.if JIT
879 | beq =>BC_JFORI 879 | beq =>BC_JFORI
880#endif 880 |.endif
881 | b =>BC_FORI 881 | b =>BC_FORI
882 | 882 |
883 |//----------------------------------------------------------------------- 883 |//-----------------------------------------------------------------------
@@ -1846,9 +1846,9 @@ static void build_subroutines(BuildCtx *ctx)
1846 |//----------------------------------------------------------------------- 1846 |//-----------------------------------------------------------------------
1847 | 1847 |
1848 |->vm_record: // Dispatch target for recording phase. 1848 |->vm_record: // Dispatch target for recording phase.
1849#if LJ_HASJIT 1849 |.if JIT
1850 | NYI 1850 | NYI
1851#endif 1851 |.endif
1852 | 1852 |
1853 |->vm_rethook: // Dispatch target for return hooks. 1853 |->vm_rethook: // Dispatch target for return hooks.
1854 | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) 1854 | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH)
@@ -1900,21 +1900,21 @@ static void build_subroutines(BuildCtx *ctx)
1900 | b <4 1900 | b <4
1901 | 1901 |
1902 |->vm_hotloop: // Hot loop counter underflow. 1902 |->vm_hotloop: // Hot loop counter underflow.
1903#if LJ_HASJIT 1903 |.if JIT
1904 | NYI 1904 | NYI
1905#endif 1905 |.endif
1906 | 1906 |
1907 |->vm_callhook: // Dispatch target for call hooks. 1907 |->vm_callhook: // Dispatch target for call hooks.
1908 | mr CARG2, PC 1908 | mr CARG2, PC
1909#if LJ_HASJIT 1909 |.if JIT
1910 | b >1 1910 | b >1
1911#endif 1911 |.endif
1912 | 1912 |
1913 |->vm_hotcall: // Hot call counter underflow. 1913 |->vm_hotcall: // Hot call counter underflow.
1914#if LJ_HASJIT 1914 |.if JIT
1915 | ori CARG2, PC, 1 1915 | ori CARG2, PC, 1
1916 |1: 1916 |1:
1917#endif 1917 |.endif
1918 | add TMP0, BASE, RC 1918 | add TMP0, BASE, RC
1919 | stw PC, SAVE_PC 1919 | stw PC, SAVE_PC
1920 | mr CARG1, L 1920 | mr CARG1, L
@@ -1937,13 +1937,13 @@ static void build_subroutines(BuildCtx *ctx)
1937 |//----------------------------------------------------------------------- 1937 |//-----------------------------------------------------------------------
1938 | 1938 |
1939 |->vm_exit_handler: 1939 |->vm_exit_handler:
1940#if LJ_HASJIT 1940 |.if JIT
1941 | NYI 1941 | NYI
1942#endif 1942 |.endif
1943 |->vm_exit_interp: 1943 |->vm_exit_interp:
1944#if LJ_HASJIT 1944 |.if JIT
1945 | NYI 1945 | NYI
1946#endif 1946 |.endif
1947 | 1947 |
1948 |//----------------------------------------------------------------------- 1948 |//-----------------------------------------------------------------------
1949 |//-- Math helper functions ---------------------------------------------- 1949 |//-- Math helper functions ----------------------------------------------
@@ -2031,12 +2031,12 @@ static void build_subroutines(BuildCtx *ctx)
2031 | 2031 |
2032 | vm_round vm_floor, 0 2032 | vm_round vm_floor, 0
2033 | vm_round vm_ceil, 1 2033 | vm_round vm_ceil, 1
2034#if LJ_HASJIT 2034 |.if JIT
2035 | vm_round vm_trunc, 2 2035 | vm_round vm_trunc, 2
2036#else 2036 |.else
2037 |->vm_trunc_efd: 2037 |->vm_trunc_efd:
2038 |->vm_trunc_hilo: 2038 |->vm_trunc_hilo:
2039#endif 2039 |.endif
2040 | 2040 |
2041 |// Callable from C: double lj_vm_foldarith(double x, double y, int op) 2041 |// Callable from C: double lj_vm_foldarith(double x, double y, int op)
2042 |// Compute x op y for basic arithmetic operators (+ - * / % ^ and unary -) 2042 |// Compute x op y for basic arithmetic operators (+ - * / % ^ and unary -)
@@ -2079,9 +2079,9 @@ static void build_subroutines(BuildCtx *ctx)
2079 |//----------------------------------------------------------------------- 2079 |//-----------------------------------------------------------------------
2080 | 2080 |
2081 |->vm_ffi_call: 2081 |->vm_ffi_call:
2082#if LJ_HASFFI 2082 |.if FFI
2083 | NYI 2083 | NYI
2084#endif 2084 |.endif
2085 | 2085 |
2086 |//----------------------------------------------------------------------- 2086 |//-----------------------------------------------------------------------
2087} 2087}
@@ -2455,7 +2455,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
2455 | ins_next2 2455 | ins_next2
2456 break; 2456 break;
2457 case BC_KCDATA: 2457 case BC_KCDATA:
2458#if LJ_HASFFI 2458 |.if FFI
2459 | // RA = dst*8, RD = cdata_const*8 (~) 2459 | // RA = dst*8, RD = cdata_const*8 (~)
2460 | ins_next1 2460 | ins_next1
2461 | srwi TMP1, RD, 1 2461 | srwi TMP1, RD, 1
@@ -2465,7 +2465,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
2465 | evmergelo TMP0, TMP2, TMP0 2465 | evmergelo TMP0, TMP2, TMP0
2466 | evstddx TMP0, BASE, RA 2466 | evstddx TMP0, BASE, RA
2467 | ins_next2 2467 | ins_next2
2468#endif 2468 |.endif
2469 break; 2469 break;
2470 case BC_KSHORT: 2470 case BC_KSHORT:
2471 | // RA = dst*8, RD = int16_literal*8 2471 | // RA = dst*8, RD = int16_literal*8
@@ -3106,9 +3106,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3106 3106
3107 case BC_ITERN: 3107 case BC_ITERN:
3108 | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 (2+1)*8) 3108 | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 (2+1)*8)
3109#if LJ_HASJIT 3109 |.if JIT
3110 | // NYI: add hotloop, record BC_ITERN. 3110 | // NYI: add hotloop, record BC_ITERN.
3111#endif 3111 |.endif
3112 | add RA, BASE, RA 3112 | add RA, BASE, RA
3113 | lwz TAB:RB, -12(RA) 3113 | lwz TAB:RB, -12(RA)
3114 | lwz RC, -4(RA) // Get index from control var. 3114 | lwz RC, -4(RA) // Get index from control var.
@@ -3368,9 +3368,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3368 /* -- Loops and branches ------------------------------------------------ */ 3368 /* -- Loops and branches ------------------------------------------------ */
3369 3369
3370 case BC_FORL: 3370 case BC_FORL:
3371#if LJ_HASJIT 3371 |.if JIT
3372 | hotloop 3372 | hotloop
3373#endif 3373 |.endif
3374 | // Fall through. Assumes BC_IFORL follows. 3374 | // Fall through. Assumes BC_IFORL follows.
3375 break; 3375 break;
3376 3376
@@ -3427,9 +3427,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3427 break; 3427 break;
3428 3428
3429 case BC_ITERL: 3429 case BC_ITERL:
3430#if LJ_HASJIT 3430 |.if JIT
3431 | hotloop 3431 | hotloop
3432#endif 3432 |.endif
3433 | // Fall through. Assumes BC_IITERL follows. 3433 | // Fall through. Assumes BC_IITERL follows.
3434 break; 3434 break;
3435 3435
@@ -3457,9 +3457,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3457 | // RA = base*8, RD = target (loop extent) 3457 | // RA = base*8, RD = target (loop extent)
3458 | // Note: RA/RD is only used by trace recorder to determine scope/extent 3458 | // Note: RA/RD is only used by trace recorder to determine scope/extent
3459 | // This opcode does NOT jump, it's only purpose is to detect a hot loop. 3459 | // This opcode does NOT jump, it's only purpose is to detect a hot loop.
3460#if LJ_HASJIT 3460 |.if JIT
3461 | hotloop 3461 | hotloop
3462#endif 3462 |.endif
3463 | // Fall through. Assumes BC_ILOOP follows. 3463 | // Fall through. Assumes BC_ILOOP follows.
3464 break; 3464 break;
3465 3465
@@ -3469,9 +3469,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3469 break; 3469 break;
3470 3470
3471 case BC_JLOOP: 3471 case BC_JLOOP:
3472#if LJ_HASJIT 3472 |.if JIT
3473 | NYI 3473 | NYI
3474#endif 3474 |.endif
3475 break; 3475 break;
3476 3476
3477 case BC_JMP: 3477 case BC_JMP:
@@ -3483,9 +3483,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3483 /* -- Function headers -------------------------------------------------- */ 3483 /* -- Function headers -------------------------------------------------- */
3484 3484
3485 case BC_FUNCF: 3485 case BC_FUNCF:
3486#if LJ_HASJIT 3486 |.if JIT
3487 | hotcall 3487 | hotcall
3488#endif 3488 |.endif
3489 case BC_FUNCV: /* NYI: compiled vararg functions. */ 3489 case BC_FUNCV: /* NYI: compiled vararg functions. */
3490 | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow. 3490 | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow.
3491 break; 3491 break;