summaryrefslogtreecommitdiff
path: root/src/lj_cconv.c
diff options
context:
space:
mode:
authorMike Pall <mike>2017-04-30 23:58:33 +0200
committerMike Pall <mike>2017-04-30 23:58:33 +0200
commitfbfbd7b9e1be2ab700363444c992ab0c96741ac5 (patch)
treecbdc5a61d28004244f6602e97cc755c315f77582 /src/lj_cconv.c
parentdc5eb65ccf8e0e944531c7407d4fff65247b784b (diff)
downloadluajit-fbfbd7b9e1be2ab700363444c992ab0c96741ac5.tar.gz
luajit-fbfbd7b9e1be2ab700363444c992ab0c96741ac5.tar.bz2
luajit-fbfbd7b9e1be2ab700363444c992ab0c96741ac5.zip
FFI: Compile bitfield loads/stores.
Diffstat (limited to 'src/lj_cconv.c')
-rw-r--r--src/lj_cconv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_cconv.c b/src/lj_cconv.c
index ab398adc..13b8230d 100644
--- a/src/lj_cconv.c
+++ b/src/lj_cconv.c
@@ -448,8 +448,10 @@ int lj_cconv_tv_bf(CTState *cts, CType *s, TValue *o, uint8_t *sp)
448 setintV(o, (int32_t)val); 448 setintV(o, (int32_t)val);
449 } 449 }
450 } else { 450 } else {
451 uint32_t b = (val >> pos) & 1;
451 lua_assert(bsz == 1); 452 lua_assert(bsz == 1);
452 setboolV(o, (val >> pos) & 1); 453 setboolV(o, b);
454 setboolV(&cts->g->tmptv2, b); /* Remember for trace recorder. */
453 } 455 }
454 return 0; /* No GC step needed. */ 456 return 0; /* No GC step needed. */
455} 457}