summary refs log tree commit diff
path: root/all.h
diff options
context:
space:
mode:
Diffstat (limited to 'all.h')
-rw-r--r--all.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/all.h b/all.h
index 3ddb944..fe2b56b 100644
--- a/all.h
+++ b/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,