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:
parent
2ec355df6a
commit
c0f25aeae3
5 changed files with 31 additions and 23 deletions
5
all.h
5
all.h
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue