Add qemu 2.4.0
[kvmfornfv.git] / qemu / tests / tcg / cris / sys.h
diff --git a/qemu/tests/tcg/cris/sys.h b/qemu/tests/tcg/cris/sys.h
new file mode 100644 (file)
index 0000000..c5f88e1
--- /dev/null
@@ -0,0 +1,16 @@
+#include <unistd.h>
+
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+
+#define CURRENT_LOCATION __FILE__ ":" TOSTRING(__LINE__)
+
+#define err()                         \
+{                                     \
+  _fail("at " CURRENT_LOCATION " ");  \
+}
+
+#define mb() asm volatile ("" : : : "memory")
+
+void pass(void);
+void _fail(char *reason);