summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorGravatar David Marcec2018-10-09 12:11:14 +1100
committerGravatar David Marcec2018-10-09 12:11:14 +1100
commitf5631e78d146146dad15607d94ca5d1623ae6696 (patch)
tree114f1b881f7e2008d6a2d9cd67ef50e7f0103fc8 /src/core/hle/kernel
parentActual kill execution when the bit isn't set, not the other way around (diff)
downloadyuzu-f5631e78d146146dad15607d94ca5d1623ae6696.tar.gz
yuzu-f5631e78d146146dad15607d94ca5d1623ae6696.tar.xz
yuzu-f5631e78d146146dad15607d94ca5d1623ae6696.zip
Added bitfield instead of manually checking if the bit is set
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/svc.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 2cae5c8f0..b488b508d 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -301,19 +301,27 @@ static ResultCode ArbitrateUnlock(VAddr mutex_addr) {
301 return Mutex::Release(mutex_addr); 301 return Mutex::Release(mutex_addr);
302} 302}
303 303
304struct BreakReason {
305 union {
306 u64 raw;
307 BitField<31, 1, u64> dont_kill_application;
308 };
309};
310
304/// Break program execution 311/// Break program execution
305static void Break(u64 reason, u64 info1, u64 info2) { 312static void Break(u64 reason, u64 info1, u64 info2) {
306 if ((reason & (1 << 31)) == 0) { 313 BreakReason break_reason{reason};
307 LOG_CRITICAL( 314 if (break_reason.dont_kill_application) {
315 LOG_ERROR(
308 Debug_Emulated, 316 Debug_Emulated,
309 "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}", 317 "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
310 reason, info1, info2); 318 reason, info1, info2);
311 ASSERT(false);
312 } else { 319 } else {
313 LOG_ERROR( 320 LOG_CRITICAL(
314 Debug_Emulated, 321 Debug_Emulated,
315 "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}", 322 "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
316 reason, info1, info2); 323 reason, info1, info2);
324 ASSERT(false);
317 } 325 }
318} 326}
319 327