Skip to content

Commit

Permalink
Fix Clock Rescaling Bug (Introduced in #135)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PixelyIon committed Mar 10, 2021
1 parent 75b769c commit e90dd67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/cpp/skyline/nce/instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e90dd67

Please sign in to comment.