aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2009-12-29 20:16:29 +0100
committerMike Pall <mike>2009-12-29 20:16:29 +0100
commitd64b031269e0a84af720dfd701e54109af7019f4 (patch)
tree8b1ae5719f7614feb2a04195473c9c145e0fb271 /src
parent82f7d0907cba3cef96c49bed4b4a64b228a6fd97 (diff)
downloadluajit-d64b031269e0a84af720dfd701e54109af7019f4.tar.gz
luajit-d64b031269e0a84af720dfd701e54109af7019f4.tar.bz2
luajit-d64b031269e0a84af720dfd701e54109af7019f4.zip
Minor fixes for x64 interpreter.
Diffstat (limited to 'src')
-rw-r--r--src/buildvm_x86.dasc16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index c110b098..5ff76a55 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -202,7 +202,7 @@
202|//----- 16 byte aligned, ^^^ 32 byte register save area, owned by callee 202|//----- 16 byte aligned, ^^^ 32 byte register save area, owned by callee
203| 203|
204|// TMPQ overlaps TMP1/TMP2. NRESULTS overlaps TMP2 (and TMPQ). 204|// TMPQ overlaps TMP1/TMP2. NRESULTS overlaps TMP2 (and TMPQ).
205|.define TMPQ, qword [rsp+aword*10] 205|.define TMPQ, qword [rsp+aword*14]
206|.define NRESULTS, TMP2 206|.define NRESULTS, TMP2
207|.define TMPa, ARG5 207|.define TMPa, ARG5
208|.define ARG5d, dword [rsp+aword*4] 208|.define ARG5d, dword [rsp+aword*4]
@@ -938,7 +938,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
938 | fstp TMPQ 938 | fstp TMPQ
939 |.endif 939 |.endif
940 } 940 }
941 | lea RCa, TMP1 // Store temp. TValue in TMP1/TMP2. 941 | lea RCa, TMPQ // Store temp. TValue in TMPQ.
942 | jmp >1 942 | jmp >1
943 | 943 |
944 |->vmeta_tgetv: 944 |->vmeta_tgetv:
@@ -1011,7 +1011,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1011 | fstp TMPQ 1011 | fstp TMPQ
1012 |.endif 1012 |.endif
1013 } 1013 }
1014 | lea RCa, TMP1 // Store temp. TValue in TMP1/TMP2. 1014 | lea RCa, TMPQ // Store temp. TValue in TMPQ.
1015 | jmp >1 1015 | jmp >1
1016 | 1016 |
1017 |->vmeta_tsetv: 1017 |->vmeta_tsetv:
@@ -1534,11 +1534,11 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1534 |1: 1534 |1:
1535 | cmp dword [RA+4], LJ_TTAB; jne ->fff_fallback 1535 | cmp dword [RA+4], LJ_TTAB; jne ->fff_fallback
1536 |.if X64 1536 |.if X64
1537 | mov TMP1, BASE // Save BASE.
1537 | mov CARG2d, [RA] 1538 | mov CARG2d, [RA]
1538 | mov L:RB, SAVE_L 1539 | mov L:RB, SAVE_L
1539 | mov L:RB->base, RA // Add frame since C call can throw. 1540 | mov L:RB->base, RA // Add frame since C call can throw.
1540 | mov [RA-4], PC 1541 | mov [RA-4], PC
1541 | mov TMP1, BASE // Save BASE.
1542 | lea CARG3d, [RA+8] 1542 | lea CARG3d, [RA+8]
1543 | mov CARG1d, L:RB // Caveat: CARG1d may be RA. 1543 | mov CARG1d, L:RB // Caveat: CARG1d may be RA.
1544 |.else 1544 |.else
@@ -2648,6 +2648,9 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2648 | 2648 |
2649 |->vm_hotloop: // Hot loop counter underflow. 2649 |->vm_hotloop: // Hot loop counter underflow.
2650#if LJ_HASJIT 2650#if LJ_HASJIT
2651 |.if X64
2652 | int3 // NYI
2653 |.else
2651 | mov L:RB, SAVE_L 2654 | mov L:RB, SAVE_L
2652 | mov L:RB->base, BASE 2655 | mov L:RB->base, BASE
2653 | mov FCARG2, PC 2656 | mov FCARG2, PC
@@ -2656,10 +2659,14 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2656 | mov SAVE_PC, PC 2659 | mov SAVE_PC, PC
2657 | call extern lj_trace_hot@8 // (jit_State *J, const BCIns *pc) 2660 | call extern lj_trace_hot@8 // (jit_State *J, const BCIns *pc)
2658 | jmp <4 2661 | jmp <4
2662 |.endif
2659#endif 2663#endif
2660 | 2664 |
2661 |->vm_hotcall: // Hot call counter underflow. 2665 |->vm_hotcall: // Hot call counter underflow.
2662#if LJ_HASJIT 2666#if LJ_HASJIT
2667 |.if X64
2668 | int3 // NYI
2669 |.else
2663 | mov L:RB, SAVE_L 2670 | mov L:RB, SAVE_L
2664 | mov L:RB->base, BASE 2671 | mov L:RB->base, BASE
2665 | mov FCARG2, PC 2672 | mov FCARG2, PC
@@ -2670,6 +2677,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2670 | mov BASE, L:RB->base 2677 | mov BASE, L:RB->base
2671 | // Dispatch the first instruction and optionally record it. 2678 | // Dispatch the first instruction and optionally record it.
2672 | ins_next 2679 | ins_next
2680 |.endif
2673#endif 2681#endif
2674 | 2682 |
2675 |//----------------------------------------------------------------------- 2683 |//-----------------------------------------------------------------------