Explorar o código

Consistently round int args of string functions on x64.

Mike Pall %!s(int64=15) %!d(string=hai) anos
pai
achega
bc146ddbe7
Modificáronse 4 ficheiros con 16 adicións e 16 borrados
  1. 4 4
      src/buildvm_x64.h
  2. 4 4
      src/buildvm_x64win.h
  3. 4 4
      src/buildvm_x86.dasc
  4. 4 4
      src/buildvm_x86.h

+ 4 - 4
src/buildvm_x64.h

@@ -265,16 +265,16 @@ static const unsigned char build_actionlist[14087] = {
   15,182,173,233,255,252,242,15,42,197,252,233,244,63,255,137,44,36,219,4,36,
   252,233,244,64,255,248,112,65,139,174,233,65,59,174,233,15,130,244,247,232,
   244,66,248,1,129,252,248,239,15,133,244,55,129,122,253,4,239,15,135,244,55,
-  255,252,242,15,45,42,129,252,253,252,255,0,0,0,15,135,244,55,137,108,36,4,
+  255,252,242,15,44,42,129,252,253,252,255,0,0,0,15,135,244,55,137,108,36,4,
   255,221,2,219,92,36,4,129,124,36,4,252,255,0,0,0,15,135,244,55,255,199,68,
   36,8,1,0,0,0,72,141,68,36,4,248,113,139,108,36,24,137,149,233,139,84,36,8,
   72,137,198,137,252,239,137,92,36,28,232,251,1,17,139,149,233,139,90,252,252,
   199,66,252,252,237,137,66,252,248,252,233,244,58,248,114,65,139,174,233,65,
   59,174,233,15,130,244,247,232,244,66,248,1,199,68,36,4,252,255,252,255,252,
   255,252,255,129,252,248,239,15,130,244,55,15,134,244,247,129,122,253,20,239,
-  255,252,242,15,45,106,16,137,108,36,4,255,221,66,16,219,92,36,4,255,248,1,
+  255,252,242,15,44,106,16,137,108,36,4,255,221,66,16,219,92,36,4,255,248,1,
   129,122,253,4,239,15,133,244,55,129,122,253,12,239,15,135,244,55,139,42,137,
-  108,36,8,139,173,233,255,252,242,15,45,74,8,255,139,68,36,4,57,197,15,130,
+  108,36,8,139,173,233,255,252,242,15,44,74,8,255,139,68,36,4,57,197,15,130,
   244,251,248,2,133,201,15,142,244,253,248,3,139,108,36,8,41,200,15,140,244,
   115,141,172,253,13,233,131,192,1,248,4,137,68,36,8,137,232,252,233,244,113,
   248,5,15,140,244,252,141,68,40,1,252,233,244,2,248,6,137,232,252,233,244,
@@ -282,7 +282,7 @@ static const unsigned char build_actionlist[14087] = {
   0,0,252,233,244,3,248,115,49,192,252,233,244,4,248,116,129,252,248,239,15,
   130,244,55,65,139,174,233,65,59,174,233,15,130,244,247,232,244,66,248,1,255,
   129,122,253,4,239,15,133,244,55,129,122,253,12,239,15,135,244,55,139,42,255,
-  252,242,15,45,66,8,255,221,66,8,219,92,36,4,139,68,36,4,255,133,192,15,142,
+  252,242,15,44,66,8,255,221,66,8,219,92,36,4,139,68,36,4,255,133,192,15,142,
   244,115,131,189,233,1,15,130,244,115,15,133,244,117,65,57,134,233,15,130,
   244,117,15,182,141,233,65,139,174,233,137,68,36,8,248,1,136,77,0,131,197,
   1,131,232,1,15,133,244,1,65,139,134,233,252,233,244,113,248,118,129,252,248,

+ 4 - 4
src/buildvm_x64win.h

@@ -265,7 +265,7 @@ static const unsigned char build_actionlist[14034] = {
   42,139,114,252,252,131,189,233,1,15,130,244,72,15,182,173,233,255,252,242,
   15,42,197,252,233,244,63,255,137,108,36,80,219,68,36,80,252,233,244,64,255,
   248,112,139,171,233,59,171,233,15,130,244,247,232,244,66,248,1,129,252,248,
-  239,15,133,244,55,129,122,253,4,239,15,135,244,55,255,252,242,15,45,42,129,
+  239,15,133,244,55,129,122,253,4,239,15,135,244,55,255,252,242,15,44,42,129,
   252,253,252,255,0,0,0,15,135,244,55,137,108,36,84,255,221,2,219,92,36,84,
   129,124,36,84,252,255,0,0,0,15,135,244,55,255,199,68,36,32,1,0,0,0,72,141,
   68,36,84,248,113,139,108,36,96,137,149,233,68,139,68,36,32,72,137,194,137,
@@ -273,9 +273,9 @@ static const unsigned char build_actionlist[14034] = {
   252,237,137,66,252,248,252,233,244,58,248,114,139,171,233,59,171,233,15,130,
   244,247,232,244,66,248,1,199,68,36,84,252,255,252,255,252,255,252,255,129,
   252,248,239,15,130,244,55,15,134,244,247,129,122,253,20,239,255,252,242,15,
-  45,106,16,137,108,36,84,255,221,66,16,219,92,36,84,255,248,1,129,122,253,
+  44,106,16,137,108,36,84,255,221,66,16,219,92,36,84,255,248,1,129,122,253,
   4,239,15,133,244,55,129,122,253,12,239,15,135,244,55,139,42,137,108,36,32,
-  139,173,233,255,252,242,15,45,74,8,255,139,68,36,84,57,197,15,130,244,251,
+  139,173,233,255,252,242,15,44,74,8,255,139,68,36,84,57,197,15,130,244,251,
   248,2,133,201,15,142,244,253,248,3,139,108,36,32,41,200,15,140,244,115,141,
   172,253,13,233,131,192,1,248,4,137,68,36,32,137,232,252,233,244,113,248,5,
   15,140,244,252,141,68,40,1,252,233,244,2,248,6,137,232,252,233,244,2,248,
@@ -283,7 +283,7 @@ static const unsigned char build_actionlist[14034] = {
   233,244,3,248,115,49,192,252,233,244,4,248,116,129,252,248,239,15,130,244,
   55,139,171,233,59,171,233,15,130,244,247,232,244,66,248,1,255,129,122,253,
   4,239,15,133,244,55,129,122,253,12,239,15,135,244,55,139,42,255,252,242,15,
-  45,66,8,255,221,66,8,219,92,36,84,139,68,36,84,255,133,192,15,142,244,115,
+  44,66,8,255,221,66,8,219,92,36,84,139,68,36,84,255,133,192,15,142,244,115,
   131,189,233,1,15,130,244,115,15,133,244,117,57,131,233,15,130,244,117,15,
   182,141,233,139,171,233,137,68,36,32,248,1,136,77,0,131,197,1,131,232,1,15,
   133,244,1,139,131,233,252,233,244,113,248,118,129,252,248,239,255,15,130,

+ 4 - 4
src/buildvm_x86.dasc

@@ -2027,7 +2027,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   |  cmp NARGS:RD, 1+1;  jne ->fff_fallback	// *Exactly* 1 arg.
   |  cmp dword [BASE+4], LJ_TISNUM;  ja ->fff_fallback
   if (sse) {
-    |  cvtsd2si RB, qword [BASE]
+    |  cvttsd2si RB, qword [BASE]
     |  cmp RB, 255;  ja ->fff_fallback
     |  mov TMP2, RB
   } else {
@@ -2068,7 +2068,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   |  jna >1
   |  cmp dword [BASE+20], LJ_TISNUM;  ja ->fff_fallback
   if (sse) {
-    |  cvtsd2si RB, qword [BASE+16]
+    |  cvttsd2si RB, qword [BASE+16]
     |  mov TMP2, RB
   } else {
     |  fld qword [BASE+16]
@@ -2081,7 +2081,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   |  mov TMP3, STR:RB
   |  mov RB, STR:RB->len
   if (sse) {
-    |  cvtsd2si RA, qword [BASE+8]
+    |  cvttsd2si RA, qword [BASE+8]
   } else {
     |.if not X64
     |  fld qword [BASE+8]
@@ -2137,7 +2137,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   |  cmp dword [BASE+12], LJ_TISNUM;  ja ->fff_fallback
   |  mov STR:RB, [BASE]
   if (sse) {
-    |  cvtsd2si RC, qword [BASE+8]
+    |  cvttsd2si RC, qword [BASE+8]
   } else {
     |  fld qword [BASE+8]
     |  fistp TMP2

+ 4 - 4
src/buildvm_x86.h

@@ -277,17 +277,17 @@ static const unsigned char build_actionlist[15227] = {
   42,139,114,252,252,131,189,233,1,15,130,244,72,15,182,173,233,255,252,242,
   15,42,197,252,233,244,63,255,137,108,36,16,219,68,36,16,252,233,244,64,255,
   248,112,139,171,233,59,171,233,15,130,244,247,232,244,66,248,1,129,252,248,
-  239,15,133,244,55,129,122,253,4,239,15,135,244,55,255,252,242,15,45,42,129,
+  239,15,133,244,55,129,122,253,4,239,15,135,244,55,255,252,242,15,44,42,129,
   252,253,252,255,0,0,0,15,135,244,55,137,108,36,20,255,221,2,219,92,36,20,
   129,124,36,20,252,255,0,0,0,15,135,244,55,255,199,68,36,8,1,0,0,0,141,68,
   36,20,248,113,139,108,36,48,137,149,233,137,68,36,4,137,44,36,137,116,36,
   24,232,251,1,17,139,149,233,139,114,252,252,199,66,252,252,237,137,66,252,
   248,252,233,244,58,248,114,139,171,233,59,171,233,15,130,244,247,232,244,
   66,248,1,199,68,36,20,252,255,252,255,252,255,252,255,129,252,248,239,15,
-  130,244,55,15,134,244,247,129,122,253,20,239,255,252,242,15,45,106,16,137,
+  130,244,55,15,134,244,247,129,122,253,20,239,255,252,242,15,44,106,16,137,
   108,36,20,255,221,66,16,219,92,36,20,255,248,1,129,122,253,4,239,15,133,244,
   55,129,122,253,12,239,15,135,244,55,139,42,137,108,36,12,139,173,233,255,
-  252,242,15,45,74,8,255,221,66,8,219,92,36,8,139,76,36,8,255,139,68,36,20,
+  252,242,15,44,74,8,255,221,66,8,219,92,36,8,139,76,36,8,255,139,68,36,20,
   57,197,15,130,244,251,248,2,133,201,15,142,244,253,248,3,139,108,36,12,41,
   200,15,140,244,115,141,172,253,13,233,131,192,1,248,4,137,68,36,8,137,232,
   252,233,244,113,248,5,15,140,244,252,141,68,40,1,252,233,244,2,248,6,137,
@@ -295,7 +295,7 @@ static const unsigned char build_actionlist[15227] = {
   3,248,8,185,1,0,0,0,252,233,244,3,248,115,49,192,252,233,244,4,248,116,129,
   252,248,239,15,130,244,55,139,171,233,59,171,233,15,130,244,247,232,244,66,
   248,1,255,129,122,253,4,239,15,133,244,55,129,122,253,12,239,15,135,244,55,
-  139,42,255,252,242,15,45,66,8,255,221,66,8,219,92,36,20,139,68,36,20,255,
+  139,42,255,252,242,15,44,66,8,255,221,66,8,219,92,36,20,139,68,36,20,255,
   133,192,15,142,244,115,131,189,233,1,15,130,244,115,15,133,244,117,57,131,
   233,15,130,244,117,15,182,141,233,139,171,233,137,68,36,8,248,1,136,77,0,
   131,197,1,131,232,1,15,133,244,1,139,131,233,252,233,244,113,248,118,129,