about summary refs log tree commit diff
path: root/src/tools/miri/tests/native-lib/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/miri/tests/native-lib/test.c')
-rw-r--r--src/tools/miri/tests/native-lib/test.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tools/miri/tests/native-lib/test.c b/src/tools/miri/tests/native-lib/test.c
new file mode 100644
index 00000000000..68714f1743b
--- /dev/null
+++ b/src/tools/miri/tests/native-lib/test.c
@@ -0,0 +1,27 @@
+#include <stdio.h>
+
+int add_one_int(int x) {
+  return 2 + x;
+}
+
+void printer() {
+  printf("printing from C\n");
+}
+
+// function with many arguments, to test functionality when some args are stored
+// on the stack
+int test_stack_spill(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l) {
+  return a+b+c+d+e+f+g+h+i+j+k+l;
+}
+
+unsigned int get_unsigned_int() {
+  return -10;
+}
+
+short add_int16(short x) {
+  return x + 3;
+}
+
+long add_short_to_long(short x, long y) {
+  return x + y;
+}