From 26be27459b11feabed52cf40aaa76f86c7edc977 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 23 Sep 2022 11:08:10 -0300 Subject: Negation in constant folding of '>>' may overflow --- lvm.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lvm.h') diff --git a/lvm.h b/lvm.h index 1bc16f3a..dba1ad27 100644 --- a/lvm.h +++ b/lvm.h @@ -110,6 +110,11 @@ typedef enum { luaC_barrierback(L, gcvalue(t), v); } +/* +** Shift right is the same as shift left with a negative 'y' +*/ +#define luaV_shiftr(x,y) luaV_shiftl(x,intop(-, 0, y)) + LUAI_FUNC int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2); -- cgit v1.2.1