mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-20 09:55:07 -04:00
thermosphere: fix various vgic bugs; fix register access OOB bug (xzr)
This commit is contained in:
parent
27859a7541
commit
f3ad62d1b8
3 changed files with 27 additions and 10 deletions
|
@ -102,6 +102,19 @@ static inline void spsrSetT32ItFlags(u64 *spsr, u32 itFlags)
|
|||
*spsr |= ((itFlags >> 2) & 0x3F) << 10;
|
||||
}
|
||||
|
||||
static inline u64 readFrameRegisterZ(ExceptionStackFrame *frame, u32 id)
|
||||
{
|
||||
return id == 31 ? 0 /* xzr */ : frame->x[id];
|
||||
}
|
||||
|
||||
static inline void writeFrameRegisterZ(ExceptionStackFrame *frame, u32 id, u64 val)
|
||||
{
|
||||
if (id != 31) {
|
||||
// If not xzr
|
||||
frame->x[id] = val;
|
||||
}
|
||||
}
|
||||
|
||||
bool spsrEvaluateConditionCode(u64 spsr, u32 conditionCode);
|
||||
void skipFaultingInstruction(ExceptionStackFrame *frame, u32 size);
|
||||
void dumpStackFrame(const ExceptionStackFrame *frame, bool sameEl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue