Skip to content

Commit 31a1eaf

Browse files
committed
Tweak handler declaration.
1 parent bdca90e commit 31a1eaf

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tools/arcilator/arcilator-runtime.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,22 @@ ARC_ENV_DECL_GET_PRINT_STREAM(id) {
6666
// eltBits: Number of bits per element
6767
// oobAddr: Referenced address outside of array bounds
6868
// oobIdx: Out-of-bounds index
69-
// Return value: Pointer to new the result value of the array_get operation
70-
#define ARC_HANDLER_ARRAY_GET_OOB_HANDLER(base, size, eltBits, oobAddr, \
71-
oobIdx) \
72-
const void *_arc_env_array_get_oob_handler( \
69+
// Return value: Pointer to the new result value of the array_get operation
70+
#define ARC_ENV_DECL_ARRAY_GET_OOB_HANDLER(base, size, eltBits, oobAddr, \
71+
oobIdx) \
72+
ARC_EXPORT const void *_arc_env_array_get_oob_handler( \
7373
const void *base, uint64_t size, uint32_t eltBits, const void *oobAddr, \
7474
uint64_t oobIdx)
7575

7676
#ifndef ARC_NO_DEFAULT_ARRAY_GET_OOB_HANDLER
7777
#include <iostream>
78-
extern "C" {
79-
ARC_HANDLER_ARRAY_GET_OOB_HANDLER(base, as, eb, oa, oi) {
78+
ARC_ENV_DECL_ARRAY_GET_OOB_HANDLER(base, as, eb, oa, oi) {
8079
(void)eb;
8180
(void)oa;
8281
std::cerr << "ARCENV-WARNING: Out-of-bounds array access caught: Index = "
8382
<< oi << ", Size = " << as << ", Base = " << base << std::endl;
8483
return base;
8584
}
86-
}
8785
#endif // ARC_NO_DEFAULT_ARRAY_GET_OOB_HANDLER
8886

8987
// ----------------

0 commit comments

Comments
 (0)