File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ struct xdummycsr_t : public extension_t {
3737 }
3838};
3939
40- REGISTER_EXTENSION (dummycsr, []() { return new xdummycsr_t ; })
40+ REGISTER_EXTENSION (dummycsr, []() { static xdummycsr_t ext; return &ext ; })
4141
4242// Copied from spike main.
4343// TODO: This should really be provided in libriscv
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ struct xslliuw_dummy_t : public extension_t {
4646 }
4747};
4848
49- REGISTER_EXTENSION (dummyslliuw, []() { return new xslliuw_dummy_t ; })
49+ REGISTER_EXTENSION (dummyslliuw, []() { static xslliuw_dummy_t ext; return &ext ; })
5050
5151// Copied from spike main.
5252// TODO: This should really be provided in libriscv
Original file line number Diff line number Diff line change @@ -40,4 +40,4 @@ class cflush_t : public extension_t
4040 }
4141};
4242
43- REGISTER_EXTENSION (cflush, []() { return new cflush_t ; })
43+ REGISTER_EXTENSION (cflush, []() { static cflush_t ext; return &ext ; })
Original file line number Diff line number Diff line change @@ -44,4 +44,4 @@ class dummy_rocc_t : public rocc_t
4444 reg_t acc[num_acc];
4545};
4646
47- REGISTER_EXTENSION (dummy_rocc, []() { return new dummy_rocc_t ; })
47+ REGISTER_EXTENSION (dummy_rocc, []() { static dummy_rocc_t ext; return &ext ; })
You can’t perform that action at this time.
0 commit comments