File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ const IO = struct {
298298 .sp_l = > @truncate (io .sp >> 0 ),
299299 .sp_h = > @truncate (io .sp >> 8 ),
300300
301- _ = > 0xFF , // Unimplemented I/O: return 0xFF and let CPU/reporting handle it
301+ _ = > std . debug . panic ( "illegal i/o read from undefined register 0x{X:0>2}" , .{ addr }),
302302 };
303303 }
304304
@@ -341,9 +341,10 @@ const IO = struct {
341341 .sp_h = > write_masked (high_byte (& io .sp ), mask , value ),
342342 .sreg = > write_masked (@ptrCast (io .sreg ), mask , value ),
343343
344- _ = > {
345- // Unimplemented I/O: ignore (no panic). Could log if desired.
346- },
344+ _ = > std .debug .panic (
345+ "illegal i/o write to undefined register 0x{X:0>2} with value=0x{X:0>2}, mask=0x{X:0>2}" ,
346+ .{ addr , value , mask },
347+ ),
347348 }
348349 }
349350
You can’t perform that action at this time.
0 commit comments