some portability cleanups
[picodrive.git] / pico / pico_port.h
diff --git a/pico/pico_port.h b/pico/pico_port.h
new file mode 100644 (file)
index 0000000..f1d95a5
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef PICO_PORT_INCLUDED
+#define PICO_PORT_INCLUDED
+
+#if defined(__GNUC__) && defined(__i386__)
+#define REGPARM(x) __attribute__((regparm(x)))
+#else
+#define REGPARM(x)
+#endif
+
+#ifdef __GNUC__
+#define NOINLINE    __attribute__((noinline))
+#define ALIGNED(n)  __attribute__((aligned(n)))
+#else
+#define NOINLINE
+#define ALIGNED(n)
+#endif
+
+#endif // PICO_PORT_INCLUDED