mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 23:29:55 -06:00
remove some UB
- savestates used to read a four bytes from a single byte value - a few unassigned variables - some other things - also make the ROR macro an inline function
This commit is contained in:
@ -1631,7 +1631,7 @@ void ARM64XEmitter::ASR(ARM64Reg Rd, ARM64Reg Rm, int shift)
|
||||
int bits = Is64Bit(Rd) ? 64 : 32;
|
||||
SBFM(Rd, Rm, shift, bits - 1);
|
||||
}
|
||||
void ARM64XEmitter::ROR_(ARM64Reg Rd, ARM64Reg Rm, int shift)
|
||||
void ARM64XEmitter::ROR(ARM64Reg Rd, ARM64Reg Rm, int shift)
|
||||
{
|
||||
EXTR(Rd, Rm, Rm, shift);
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ public:
|
||||
void LSR(ARM64Reg Rd, ARM64Reg Rm, int shift);
|
||||
void LSL(ARM64Reg Rd, ARM64Reg Rm, int shift);
|
||||
void ASR(ARM64Reg Rd, ARM64Reg Rm, int shift);
|
||||
void ROR_(ARM64Reg Rd, ARM64Reg Rm, int shift);
|
||||
void ROR(ARM64Reg Rd, ARM64Reg Rm, int shift);
|
||||
|
||||
// Logical (immediate)
|
||||
void AND(ARM64Reg Rd, ARM64Reg Rn, u32 immr, u32 imms, bool invert = false);
|
||||
|
@ -1214,7 +1214,7 @@ void XEmitter::ROL(int bits, const OpArg& dest, const OpArg& shift)
|
||||
{
|
||||
WriteShift(bits, dest, shift, 0);
|
||||
}
|
||||
void XEmitter::ROR_(int bits, const OpArg& dest, const OpArg& shift)
|
||||
void XEmitter::ROR(int bits, const OpArg& dest, const OpArg& shift)
|
||||
{
|
||||
WriteShift(bits, dest, shift, 1);
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ public:
|
||||
|
||||
// Shift
|
||||
void ROL(int bits, const OpArg& dest, const OpArg& shift);
|
||||
void ROR_(int bits, const OpArg& dest, const OpArg& shift);
|
||||
void ROR(int bits, const OpArg& dest, const OpArg& shift);
|
||||
void RCL(int bits, const OpArg& dest, const OpArg& shift);
|
||||
void RCR(int bits, const OpArg& dest, const OpArg& shift);
|
||||
void SHL(int bits, const OpArg& dest, const OpArg& shift);
|
||||
|
Reference in New Issue
Block a user