aboutsummaryrefslogtreecommitdiff
path: root/src/lj_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_str.c')
-rw-r--r--src/lj_str.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_str.c b/src/lj_str.c
index 5e69ed0d..19f9d191 100644
--- a/src/lj_str.c
+++ b/src/lj_str.c
@@ -29,7 +29,7 @@ int32_t LJ_FASTCALL lj_str_cmp(GCstr *a, GCstr *b)
29 uint32_t va = *(const uint32_t *)(strdata(a)+i); 29 uint32_t va = *(const uint32_t *)(strdata(a)+i);
30 uint32_t vb = *(const uint32_t *)(strdata(b)+i); 30 uint32_t vb = *(const uint32_t *)(strdata(b)+i);
31 if (va != vb) { 31 if (va != vb) {
32#if LJ_ARCH_ENDIAN == LUAJIT_LE 32#if LJ_LE
33 va = lj_bswap(va); vb = lj_bswap(vb); 33 va = lj_bswap(va); vb = lj_bswap(vb);
34#endif 34#endif
35 i -= n; 35 i -= n;
@@ -53,7 +53,7 @@ static LJ_AINLINE int str_fastcmp(const char *a, const char *b, MSize len)
53 uint32_t v = *(const uint32_t *)(a+i) ^ *(const uint32_t *)(b+i); 53 uint32_t v = *(const uint32_t *)(a+i) ^ *(const uint32_t *)(b+i);
54 if (v) { 54 if (v) {
55 i -= len; 55 i -= len;
56#if LJ_ARCH_ENDIAN == LUAJIT_LE 56#if LJ_LE
57 return (int32_t)i >= -3 ? (v << (32+(i<<3))) : 1; 57 return (int32_t)i >= -3 ? (v << (32+(i<<3))) : 1;
58#else 58#else
59 return (int32_t)i >= -3 ? (v >> (32+(i<<3))) : 1; 59 return (int32_t)i >= -3 ? (v >> (32+(i<<3))) : 1;