From e90dd672af1a3710bc16a773a5a9f800faa088d6 Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Wed, 10 Mar 2021 14:56:01 +0530 Subject: [PATCH] Fix Clock Rescaling Bug (Introduced in #135) There was a mistake in the code-style refactor where the signature in the instruction encoding of `MRS` was set to `0xD54` instead of `0xD53` which would cause a SIGILL (Illegal Instruction) for devices which had their HW timer frequency equivalent to the Switch (19.2MHz) as a modified `MRS` would be deployed there. This issue should not affect devices which perform clock rescaling as the `MRS` instruction there is encoded by the assembler. --- app/src/main/cpp/skyline/nce/instructions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/nce/instructions.h b/app/src/main/cpp/skyline/nce/instructions.h index 665a9cd1..605dbce6 100644 --- a/app/src/main/cpp/skyline/nce/instructions.h +++ b/app/src/main/cpp/skyline/nce/instructions.h @@ -60,7 +60,7 @@ namespace skyline::nce { * @url https://developer.arm.com/docs/ddi0596/latest/base-instructions-alphabetic-order/mrs-move-system-register */ struct Mrs { - constexpr Mrs(u32 srcReg, registers::X destReg) : srcReg(srcReg), destReg(destReg), sig(0xD54) {} + constexpr Mrs(u32 srcReg, registers::X destReg) : srcReg(srcReg), destReg(destReg), sig(0xD53) {} constexpr bool Verify() { return (sig == 0xD53);