new rsval() helper for signed Refs

The .val field is signed in RSlot.
Add a new dedicated function to
fetch it as a signed int.
This commit is contained in:
Quentin Carbonneaux 2022-12-12 17:36:15 +01:00
parent 2ec355df6a
commit c0f25aeae3
5 changed files with 31 additions and 23 deletions

5
all.h
View file

@ -110,6 +110,11 @@ static inline int rtype(Ref r)
return r.type;
}
static inline int rsval(Ref r)
{
return ((int32_t)r.val << 3) >> 3;
}
enum CmpI {
Cieq,
Cine,