Consistently round int args of string functions on x64.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user