aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/integers.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/integers.h b/stdlib/integers.h
index 2293e065..ea286202 100644
--- a/stdlib/integers.h
+++ b/stdlib/integers.h
@@ -66,6 +66,12 @@
} \
MACROLIKE PUREFUNC c_type type_name ## $wrapping_minus(c_type x, c_type y) { \
return (c_type)((u##c_type)x + (u##c_type)y); \
+ } \
+ MACROLIKE PUREFUNC c_type type_name ## $unsigned_left_shift(c_type x, c_type y) { \
+ return (c_type)((u##c_type)x << y); \
+ } \
+ MACROLIKE PUREFUNC c_type type_name ## $unsigned_right_shift(c_type x, c_type y) { \
+ return (c_type)((u##c_type)x >> y); \
}
DEFINE_INT_TYPE(int64_t, Int64, __attribute__(()))