aboutsummaryrefslogtreecommitdiff
path: root/riscv/common.h
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2021-07-28 17:54:49 -0700
committerAndrew Waterman <andrew@sifive.com>2021-07-28 17:54:49 -0700
commit2021fdb41f533882605e9cefc30567ed2fb0aead (patch)
tree83bfb0e896ac8dd81b832acb31a889c5870b8884 /riscv/common.h
parent25eb657276e0a6158339cccffdbb72c52d3f6dd8 (diff)
downloadspike-2021fdb41f533882605e9cefc30567ed2fb0aead.zip
spike-2021fdb41f533882605e9cefc30567ed2fb0aead.tar.gz
spike-2021fdb41f533882605e9cefc30567ed2fb0aead.tar.bz2
Add NORETURN macro
Diffstat (limited to 'riscv/common.h')
-rw-r--r--riscv/common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/riscv/common.h b/riscv/common.h
index d593df2..002a83f 100644
--- a/riscv/common.h
+++ b/riscv/common.h
@@ -6,11 +6,13 @@
#ifdef __GNUC__
# define likely(x) __builtin_expect(x, 1)
# define unlikely(x) __builtin_expect(x, 0)
+# define NOINLINE __attribute__ ((noinline))
+# define NORETURN __attribute__ ((noreturn))
#else
# define likely(x) (x)
# define unlikely(x) (x)
+# define NOINLINE
+# define NORETURN
#endif
-#define NOINLINE __attribute__ ((noinline))
-
#endif