Split some parts of UpdateBoundingBox into multiple lines. Also,

fix issues causing failure on Lint.
This commit is contained in:
Rohit Nirmal committed 2014-09-06 09:49:27 -05:00
1 parent 1ecb318bcc
commit 629ceaf2b1
4 files changed
+131 -46

No files matched your search

+4 -3
View File
@@ -180,9 +180,10 @@ static void gdb_bp_remove(u32 type, u32 addr, u32 len)
{
gdb_bp_t *p;
do {
do
{
p = gdb_bp_find(type, addr, len);
if (p != nullptr)
if (p != nullptr)
{
DEBUG_LOG(GDB_STUB, "gdb: removed a breakpoint: %08x bytes at %08x\n", len, addr);
p->active = 0;
@@ -659,7 +660,7 @@ static void _gdb_add_bp()
u32 i, addr = 0, len = 0;
type = hex2char(cmd_bfr[1]);
switch (type)
switch (type)
{
case 0:
case 1:
+13 -13
View File
@@ -12,15 +12,15 @@
namespace PowerPC
{
const u32 plru_mask[8] = {11,11,19,19,37,37,69,69};
const u32 plru_value[8] = {11,3,17,1,36,4,64,0};
const u32 plru_mask[8] = {11, 11, 19, 19, 37, 37, 69, 69};
const u32 plru_value[8] = {11, 3, 17, 1, 36, 4, 64, 0};
InstructionCache::InstructionCache()
{
for (u32 m = 0; m < 0xff; m++)
{
u32 w = 0;
while (m & (1<<w))
while (m & (1 << w))
w++;
way_from_valid[m] = w;
}
@@ -29,7 +29,7 @@ namespace PowerPC
{
u32 b[7];
for (int i = 0; i < 7; i++)
b[i] = m & (1<<i);
b[i] = m & (1 << i);
u32 w;
if (b[0])
if (b[2])
@@ -84,7 +84,7 @@ namespace PowerPC
// invalidates the whole set
u32 set = (addr >> 5) & 0x7f;
for (int i = 0; i < 8; i++)
if (valid[set] & (1<<i))
if (valid[set] & (1 << i))
{
if (tags[set][i] & (ICACHE_VMEM_BIT >> 12))
lookup_table_vmem[((tags[set][i] << 7) | set) & 0xfffff] = 0xff;
@@ -107,15 +107,15 @@ namespace PowerPC
u32 t;
if (addr & ICACHE_VMEM_BIT)
{
t = lookup_table_vmem[(addr>>5) & 0xfffff];
t = lookup_table_vmem[(addr >> 5) & 0xfffff];
}
else if (addr & ICACHE_EXRAM_BIT)
{
t = lookup_table_ex[(addr>>5) & 0x1fffff];
t = lookup_table_ex[(addr >> 5) & 0x1fffff];
}
else
{
t = lookup_table[(addr>>5) & 0xfffff];
t = lookup_table[(addr >> 5) & 0xfffff];
}
if (t == 0xff) // load to the cache
@@ -130,7 +130,7 @@ namespace PowerPC
// load
u8 *p = Memory::GetPointer(addr & ~0x1f);
memcpy(data[set][t], p, 32);
if (valid[set] & (1<<t))
if (valid[set] & (1 << t))
{
if (tags[set][t] & (ICACHE_VMEM_BIT >> 12))
lookup_table_vmem[((tags[set][t] << 7) | set) & 0xfffff] = 0xff;
@@ -141,17 +141,17 @@ namespace PowerPC
}
if (addr & ICACHE_VMEM_BIT)
lookup_table_vmem[(addr>>5) & 0xfffff] = t;
lookup_table_vmem[(addr >> 5) & 0xfffff] = t;
else if (addr & ICACHE_EXRAM_BIT)
lookup_table_ex[(addr>>5) & 0x1fffff] = t;
lookup_table_ex[(addr >> 5) & 0x1fffff] = t;
else
lookup_table[(addr>>5) & 0xfffff] = t;
tags[set][t] = tag;
valid[set] |= 1<<t;
valid[set] |= (1 << t);
}
// update plru
plru[set] = (plru[set] & ~plru_mask[t]) | plru_value[t];
u32 res = Common::swap32(data[set][t][(addr>>2)&7]);
u32 res = Common::swap32(data[set][t][(addr >> 2) & 7]);
return res;
}