Skip to content

Commit 6db93b3

Browse files
author
whitequark
committedAug 2, 2015
artiq_personality: port to device.
1 parent aae2923 commit 6db93b3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
 

Diff for: ‎soc/runtime/artiq_personality.c

+9
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
/* Logging */
99

1010
#ifndef NDEBUG
11+
#if defined(__or1k__)
12+
#include "log.h"
13+
#define EH_LOG0(fmt) log("%s: " fmt, __func__)
14+
#define EH_LOG(fmt, ...) log("%s: " fmt, __func__, __VA_ARGS__)
15+
#else
1116
#define EH_LOG0(fmt) fprintf(stderr, "%s: " fmt "\n", __func__)
1217
#define EH_LOG(fmt, ...) fprintf(stderr, "%s: " fmt "\n", __func__, __VA_ARGS__)
18+
#endif
1319
#else
1420
#define EH_LOG0(fmt)
1521
#define EH_LOG(fmt, ...)
@@ -312,6 +318,9 @@ static _Unwind_Reason_Code __artiq_uncaught_exception(
312318
}
313319
}
314320

321+
_Unwind_Reason_Code __artiq_personality(
322+
int version, _Unwind_Action actions, uint64_t exceptionClass,
323+
struct _Unwind_Exception *exceptionObject, struct _Unwind_Context *context);
315324
_Unwind_Reason_Code __artiq_personality(
316325
int version, _Unwind_Action actions, uint64_t exceptionClass,
317326
struct _Unwind_Exception *exceptionObject, struct _Unwind_Context *context) {

Diff for: ‎soc/runtime/artiq_personality.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define __ARTIQ_PERSONALITY_H
33

44
#include <stdint.h>
5+
#include <stddef.h>
56

67
struct artiq_exception {
78
union {
@@ -27,7 +28,7 @@ extern "C" {
2728
/* Provided by the runtime */
2829
void __artiq_raise(struct artiq_exception *artiq_exn)
2930
__attribute__((noreturn));
30-
void __artiq_reraise()
31+
void __artiq_reraise(void)
3132
__attribute__((noreturn));
3233

3334
#define artiq_raise_from_c(exnname, exnmsg, exnparam0, exnparam1, exnparam2) \

0 commit comments

Comments
 (0)
Please sign in to comment.