mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge branch 'warnings' of https://github.com/unknownbrackets/ppsspp into unknownbrackets-warnings
Conflicts: Core/ELF/ElfReader.cpp
This commit is contained in:
commit
6be534ca18
3 changed files with 10 additions and 8 deletions
|
@ -38,7 +38,9 @@
|
||||||
|
|
||||||
// __FUNCTION__ is misused a lot below, it's no longer a string literal but a virtual
|
// __FUNCTION__ is misused a lot below, it's no longer a string literal but a virtual
|
||||||
// variable so this use fails in some compilers. Just define it away for now.
|
// variable so this use fails in some compilers. Just define it away for now.
|
||||||
|
#ifndef _MSC_VER
|
||||||
#define __FUNCTION__ "(n/a)"
|
#define __FUNCTION__ "(n/a)"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ArmGen
|
namespace ArmGen
|
||||||
{
|
{
|
||||||
|
@ -166,8 +168,8 @@ void ARMXEmitter::ADDI2R(ARMReg rd, ARMReg rs, u32 val, ARMReg scratch)
|
||||||
// Decompose into two additions.
|
// Decompose into two additions.
|
||||||
ADD(rd, rs, Operand2((u8)(val >> 8), 12)); // rotation right by 12*2 == rotation left by 8
|
ADD(rd, rs, Operand2((u8)(val >> 8), 12)); // rotation right by 12*2 == rotation left by 8
|
||||||
ADD(rd, rd, Operand2((u8)(val), 0));
|
ADD(rd, rd, Operand2((u8)(val), 0));
|
||||||
} else if (((-(u32)(s32)val) & 0xFFFF0000) == 0) {
|
} else if ((((u32)-(s32)val) & 0xFFFF0000) == 0) {
|
||||||
val = -(u32)(s32)val;
|
val = (u32)-(s32)val;
|
||||||
SUB(rd, rs, Operand2((u8)(val >> 8), 12));
|
SUB(rd, rs, Operand2((u8)(val >> 8), 12));
|
||||||
SUB(rd, rd, Operand2((u8)(val), 0));
|
SUB(rd, rd, Operand2((u8)(val), 0));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -69,9 +69,9 @@ bool ElfReader::LoadRelocations(Elf32_Rel *rels, int numRelocs)
|
||||||
//0 = code
|
//0 = code
|
||||||
//1 = data
|
//1 = data
|
||||||
|
|
||||||
if (readwrite >= ARRAY_SIZE(segmentVAddr)) {
|
if (readwrite >= (int)ARRAY_SIZE(segmentVAddr)) {
|
||||||
if (numErrors < 10) {
|
if (numErrors < 10) {
|
||||||
ERROR_LOG(LOADER, "Bad segment number %i", readwrite);
|
ERROR_LOG_REPORT(LOADER, "Bad segment number %i", readwrite);
|
||||||
}
|
}
|
||||||
numErrors++;
|
numErrors++;
|
||||||
continue;
|
continue;
|
||||||
|
@ -82,9 +82,9 @@ bool ElfReader::LoadRelocations(Elf32_Rel *rels, int numRelocs)
|
||||||
// It appears that misaligned relocations are allowed.
|
// It appears that misaligned relocations are allowed.
|
||||||
// Will they work correctly on big-endian?
|
// Will they work correctly on big-endian?
|
||||||
|
|
||||||
if (!Memory::IsValidAddress(addr)) {
|
if (((addr & 3) && type != R_MIPS_32) || !Memory::IsValidAddress(addr)) {
|
||||||
if (numErrors < 10) {
|
if (numErrors < 10) {
|
||||||
WARN_LOG(LOADER, "Suspicious address %08x, skipping reloc", addr);
|
WARN_LOG_REPORT(LOADER, "Suspicious address %08x, skipping reloc, type = %d", addr, type);
|
||||||
} else if (numErrors == 10) {
|
} else if (numErrors == 10) {
|
||||||
WARN_LOG(LOADER, "Too many bad relocations, skipping logging");
|
WARN_LOG(LOADER, "Too many bad relocations, skipping logging");
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,8 +169,8 @@ void MIPSState::DoState(PointerWrap &p) {
|
||||||
p.Do(lo);
|
p.Do(lo);
|
||||||
p.Do(fpcond);
|
p.Do(fpcond);
|
||||||
if (s <= 1) {
|
if (s <= 1) {
|
||||||
u32 fcr0_unusued = 0;
|
u32 fcr0_unused = 0;
|
||||||
p.Do(fcr0_unusued);
|
p.Do(fcr0_unused);
|
||||||
}
|
}
|
||||||
p.Do(fcr31);
|
p.Do(fcr31);
|
||||||
p.Do(rng.m_w);
|
p.Do(rng.m_w);
|
||||||
|
|
Loading…
Add table
Reference in a new issue