mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-25 12:45:46 +01:00
Added bitfield instead of manually checking if the bit is set
This commit is contained in:
parent
af3ba94b2a
commit
f5631e78d1
@ -301,19 +301,27 @@ static ResultCode ArbitrateUnlock(VAddr mutex_addr) {
|
|||||||
return Mutex::Release(mutex_addr);
|
return Mutex::Release(mutex_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct BreakReason {
|
||||||
|
union {
|
||||||
|
u64 raw;
|
||||||
|
BitField<31, 1, u64> dont_kill_application;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/// Break program execution
|
/// Break program execution
|
||||||
static void Break(u64 reason, u64 info1, u64 info2) {
|
static void Break(u64 reason, u64 info1, u64 info2) {
|
||||||
if ((reason & (1 << 31)) == 0) {
|
BreakReason break_reason{reason};
|
||||||
|
if (break_reason.dont_kill_application) {
|
||||||
|
LOG_ERROR(
|
||||||
|
Debug_Emulated,
|
||||||
|
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
|
||||||
|
reason, info1, info2);
|
||||||
|
} else {
|
||||||
LOG_CRITICAL(
|
LOG_CRITICAL(
|
||||||
Debug_Emulated,
|
Debug_Emulated,
|
||||||
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
|
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
|
||||||
reason, info1, info2);
|
reason, info1, info2);
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
} else {
|
|
||||||
LOG_ERROR(
|
|
||||||
Debug_Emulated,
|
|
||||||
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
|
|
||||||
reason, info1, info2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user