some portability cleanups

This commit is contained in:
notaz 2017-10-13 23:30:44 +03:00
parent 7612bf90be
commit bce144211c
4 changed files with 21 additions and 25 deletions

18
pico/pico_port.h Normal file
View file

@ -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