Skip to content
Permalink
Browse files

regparm is an x86 only attribute, only define it there

  • Loading branch information
webgeek1234 committed May 23, 2019
1 parent c013d49 commit 2e1333e1bb92b6d66ce8ab3883bce9a465df7065
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gba/GBAcpu.h
@@ -4,16 +4,16 @@
extern int armExecute();
extern int thumbExecute();

#ifdef __GNUC__
#ifndef __APPLE__
#if defined(__i386__) || defined(__x86_64__)
#define INSN_REGPARM __attribute__((regparm(1)))
#else
#define INSN_REGPARM /*nothing*/
#endif

#ifdef __GNUC__
#define LIKELY(x) __builtin_expect(!!(x), 1)
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
#else
#define INSN_REGPARM /*nothing*/
#define LIKELY(x) (x)
#define UNLIKELY(x) (x)
#endif

0 comments on commit 2e1333e

Please sign in to comment.
You can’t perform that action at this time.