summaryrefslogtreecommitdiff
path: root/src/lj_cdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_cdata.c')
-rw-r--r--src/lj_cdata.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/lj_cdata.c b/src/lj_cdata.c
index 71453e27..7c7eed43 100644
--- a/src/lj_cdata.c
+++ b/src/lj_cdata.c
@@ -235,7 +235,6 @@ void lj_cdata_set(CTState *cts, CType *d, uint8_t *dp, TValue *o, CTInfo qual)
235uint64_t lj_cdata_powi64(uint64_t x, uint64_t k, int isunsigned) 235uint64_t lj_cdata_powi64(uint64_t x, uint64_t k, int isunsigned)
236{ 236{
237 uint64_t y = 0; 237 uint64_t y = 0;
238 int sign = 0;
239 if (k == 0) 238 if (k == 0)
240 return 1; 239 return 1;
241 if (!isunsigned) { 240 if (!isunsigned) {
@@ -249,10 +248,6 @@ uint64_t lj_cdata_powi64(uint64_t x, uint64_t k, int isunsigned)
249 else 248 else
250 return 0; 249 return 0;
251 } 250 }
252 if ((int64_t)x < 0) {
253 x = -x;
254 sign = (k & 1);
255 }
256 } 251 }
257 for (; (k & 1) == 0; k >>= 1) x *= x; 252 for (; (k & 1) == 0; k >>= 1) x *= x;
258 y = x; 253 y = x;
@@ -265,7 +260,6 @@ uint64_t lj_cdata_powi64(uint64_t x, uint64_t k, int isunsigned)
265 } 260 }
266 y *= x; 261 y *= x;
267 } 262 }
268 if (sign) y = (uint64_t)-(int64_t)y;
269 return y; 263 return y;
270} 264}
271 265