]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix arg check for two-arg SSE math functions in interpreter.
authorMike Pall <mike>
Wed, 14 Jul 2010 12:11:48 +0000 (14:11 +0200)
committerMike Pall <mike>
Wed, 14 Jul 2010 12:11:48 +0000 (14:11 +0200)
src/buildvm_x64.h
src/buildvm_x64win.h
src/buildvm_x86.dasc
src/buildvm_x86.h

index d98d225d1e87760f36c27e4dfaae8a06f4beef7e..a44f7e504d3fe813472c8a4a1426a675711a9bc2 100644 (file)
@@ -1206,7 +1206,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   }
   dasm_put(Dst, 4774, 2+1, LJ_TISNUM, LJ_TISNUM);
   if (sse) {
-    dasm_put(Dst, 4826, 1+1, LJ_TISNUM, LJ_TISNUM);
+    dasm_put(Dst, 4826, 2+1, LJ_TISNUM, LJ_TISNUM);
   } else {
     dasm_put(Dst, 4873, 2+1, LJ_TISNUM, LJ_TISNUM);
   }
@@ -1319,27 +1319,27 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   }
   dasm_put(Dst, 6405);
   if (sse) {
-  dasm_put(Dst, 6416, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6416, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6485);
   if (sse) {
-  dasm_put(Dst, 6494, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6494, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6563);
   if (sse) {
-  dasm_put(Dst, 6573, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6573, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6642);
   if (sse) {
-  dasm_put(Dst, 6652, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6652, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6721);
   if (sse) {
-  dasm_put(Dst, 6730, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6730, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6799, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base));
index 81ca8c037bea3bb969c19407e147ce35ee15efd7..5e57bb3fba97520e9f689e8a5de58b80f76462f5 100644 (file)
@@ -1207,7 +1207,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   }
   dasm_put(Dst, 4748, 2+1, LJ_TISNUM, LJ_TISNUM);
   if (sse) {
-    dasm_put(Dst, 4800, 1+1, LJ_TISNUM, LJ_TISNUM);
+    dasm_put(Dst, 4800, 2+1, LJ_TISNUM, LJ_TISNUM);
   } else {
     dasm_put(Dst, 4847, 2+1, LJ_TISNUM, LJ_TISNUM);
   }
@@ -1320,27 +1320,27 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   }
   dasm_put(Dst, 6364);
   if (sse) {
-  dasm_put(Dst, 6375, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6375, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6444);
   if (sse) {
-  dasm_put(Dst, 6453, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6453, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6522);
   if (sse) {
-  dasm_put(Dst, 6532, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6532, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6601);
   if (sse) {
-  dasm_put(Dst, 6611, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6611, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6680);
   if (sse) {
-  dasm_put(Dst, 6689, 1+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
+  dasm_put(Dst, 6689, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32));
   } else {
   }
   dasm_put(Dst, 6758, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base));
index 31845526a83fc9444b25b831c32e8b2d0cb919c3..36151318ad4ca2617d88cff254bcbc558012fb05 100644 (file)
@@ -1211,7 +1211,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   |.endmacro
   |
   |.macro .ffunc_nnsse, name
-  |  .ffunc_1 name
+  |  .ffunc_2 name
   |  cmp dword [BASE+4], LJ_TISNUM;  ja ->fff_fallback
   |  cmp dword [BASE+12], LJ_TISNUM;  ja ->fff_fallback
   |  movsd xmm0, qword [BASE]
index 6f0b60901600b50090f53f6bc812d174c5f6d034..e833c3c3cf616b3eed384f1716815d042070718a 100644 (file)
@@ -1265,7 +1265,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   }
   dasm_put(Dst, 4858, 2+1, LJ_TISNUM, LJ_TISNUM);
   if (sse) {
-    dasm_put(Dst, 4910, 1+1, LJ_TISNUM, LJ_TISNUM);
+    dasm_put(Dst, 4910, 2+1, LJ_TISNUM, LJ_TISNUM);
   } else {
     dasm_put(Dst, 4957, 2+1, LJ_TISNUM, LJ_TISNUM);
   }
@@ -1404,31 +1404,31 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   }
   dasm_put(Dst, 6982);
   if (sse) {
-  dasm_put(Dst, 6993, 1+1, LJ_TISNUM, LJ_TISNUM);
+  dasm_put(Dst, 6993, 2+1, LJ_TISNUM, LJ_TISNUM);
   } else {
   dasm_put(Dst, 7067, 2+1, LJ_TISNUM, LJ_TISNUM);
   }
   dasm_put(Dst, 7133);
   if (sse) {
-  dasm_put(Dst, 7142, 1+1, LJ_TISNUM, LJ_TISNUM);
+  dasm_put(Dst, 7142, 2+1, LJ_TISNUM, LJ_TISNUM);
   } else {
   dasm_put(Dst, 7216, 2+1, LJ_TISNUM, LJ_TISNUM);
   }
   dasm_put(Dst, 7282);
   if (sse) {
-  dasm_put(Dst, 7292, 1+1, LJ_TISNUM, LJ_TISNUM);
+  dasm_put(Dst, 7292, 2+1, LJ_TISNUM, LJ_TISNUM);
   } else {
   dasm_put(Dst, 7366, 2+1, LJ_TISNUM, LJ_TISNUM);
   }
   dasm_put(Dst, 7432);
   if (sse) {
-  dasm_put(Dst, 7442, 1+1, LJ_TISNUM, LJ_TISNUM);
+  dasm_put(Dst, 7442, 2+1, LJ_TISNUM, LJ_TISNUM);
   } else {
   dasm_put(Dst, 7516, 2+1, LJ_TISNUM, LJ_TISNUM);
   }
   dasm_put(Dst, 7582);
   if (sse) {
-  dasm_put(Dst, 7591, 1+1, LJ_TISNUM, LJ_TISNUM);
+  dasm_put(Dst, 7591, 2+1, LJ_TISNUM, LJ_TISNUM);
   } else {
   dasm_put(Dst, 7665, 2+1, LJ_TISNUM, LJ_TISNUM);
   }