File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,16 @@ void __abort_message(const char *message) {
2020 abort ();
2121}
2222
23- void __libcpp_verbose_abort (char const * format, ...) {
23+ #if 0
24+ // Assembly version is used instead so we can avoid calling vsprintf
25+ void __libcpp_verbose_abort(const char *format, ...) {
2426 va_list list;
2527 va_start(list, format);
2628 std::vsprintf(dbgerr, format, list);
2729 va_end(list);
2830
2931 abort();
3032}
33+ #endif
3134
3235_LIBCPP_END_NAMESPACE_STD
Original file line number Diff line number Diff line change 1+ .assume adl=1
2+
3+ .section .text
4+
5+ .global __ZNSt3__122__libcpp_verbose_abortEPKcz
6+ .type __ZNSt3__122__libcpp_verbose_abortEPKcz,@function
7+
8+ ; void __libcpp_verbose_abort(const char *format, ...)
9+ __ZNSt3__122__libcpp_verbose_abortEPKcz:
10+ ; sp + 6 : args...
11+ ; sp + 3 : format
12+ ; sp + 0 : ret
13+ ld hl, $FC0000 ; dbgerr
14+ ex (sp), hl ; destroys previous return address
15+
16+ ; _boot_sprintf will return to _abort
17+ ld hl, _abort
18+ push hl
19+ ; sp + 9 : args...
20+ ; sp + 6 : format
21+ ; sp + 3 : dbgerr
22+ ; sp + 0 : _abort
23+ jp _boot_sprintf
24+
25+ .extern _abort
26+ .extern _boot_sprintf
You can’t perform that action at this time.
0 commit comments