2024-02-27 22:10:34 +00:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#include "common/assert.h"
|
|
|
|
#include "common/logging/backend.h"
|
|
|
|
|
|
|
|
#define Crash() __asm__ __volatile__("int $3")
|
|
|
|
|
|
|
|
void assert_fail_impl() {
|
|
|
|
Common::Log::Stop();
|
2024-05-16 12:55:50 +00:00
|
|
|
std::fflush(stdout);
|
2024-02-27 22:10:34 +00:00
|
|
|
Crash();
|
|
|
|
}
|
|
|
|
|
|
|
|
[[noreturn]] void unreachable_impl() {
|
|
|
|
Common::Log::Stop();
|
2024-05-21 22:35:12 +00:00
|
|
|
std::fflush(stdout);
|
2024-02-27 22:10:34 +00:00
|
|
|
Crash();
|
|
|
|
throw std::runtime_error("Unreachable code");
|
|
|
|
}
|