Browse Source

Add ORCA_OPT_MINSIZE macro

master
cancel 6 years ago
parent
commit
cfacf87e6a
  1. 11
      base.h
  2. 2
      sim.c

11
base.h

@ -8,6 +8,17 @@
#include <string.h>
#include <unistd.h>
// clang or gcc or msvc or other
#if defined(__clang__)
#define ORCA_OPT_MINSIZE __attribute__((minsize))
#elif defined(__GNUC__)
#define ORCA_OPT_MINSIZE __attribute__(("Os"))
#elif defined(_MSC_VER)
#define ORCA_OPT_MINSIZE
#else
#define ORCA_OPT_MINSIZE
#endif
// (gcc / clang) or msvc or other
#if defined(__GNUC__) || defined(__clang__)
#define ORCA_FORCE_INLINE __attribute__((always_inline)) inline

2
sim.c

@ -186,7 +186,7 @@ Usz usz_clamp(Usz val, Usz min, Usz max) {
(void)Tick_number; \
(void)bank_params;
#define OPER_PHASE_SPEC static ORCA_FORCE_NO_INLINE
#define OPER_PHASE_SPEC ORCA_FORCE_NO_INLINE static
#define BEGIN_SOLO_PHASE_0(_oper_name) \
OPER_PHASE_SPEC void oper_phase0_##_oper_name(OPER_PHASE_0_COMMON_ARGS) { \

Loading…
Cancel
Save