mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Turn the ifs inside out
This commit is contained in:
parent
f21523ff74
commit
60a304f29b
1 changed files with 11 additions and 13 deletions
|
@ -204,29 +204,27 @@ void WriteVector(const float *rd, VectorSize size, int reg) {
|
|||
const int mtx = reg & (7 << 2);
|
||||
const int col = reg & 3;
|
||||
bool transpose = (reg >> 5) & 1;
|
||||
if (currentMIPS->VfpuWriteMask() == 0) {
|
||||
if (transpose) {
|
||||
const int base = mtx + col * 32;
|
||||
if (transpose) {
|
||||
const int base = mtx + col * 32;
|
||||
if (currentMIPS->VfpuWriteMask() == 0) {
|
||||
for (int i = 0; i < length; i++)
|
||||
V(base + ((row+i)&3)) = rd[i];
|
||||
} else {
|
||||
const int base = mtx + col;
|
||||
for (int i = 0; i < length; i++)
|
||||
V(base + ((row+i)&3)*32) = rd[i];
|
||||
}
|
||||
} else {
|
||||
if (transpose) {
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (!currentMIPS->VfpuWriteMask(i)) {
|
||||
int index = mtx + ((row + i) & 3) + col * 32;
|
||||
V(index) = rd[i];
|
||||
V(base + ((row + i) & 3)) = rd[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const int base = mtx + col;
|
||||
if (currentMIPS->VfpuWriteMask() == 0) {
|
||||
for (int i = 0; i < length; i++)
|
||||
V(base + ((row + i) & 3) * 32) = rd[i];
|
||||
} else {
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (!currentMIPS->VfpuWriteMask(i)) {
|
||||
int index = mtx + col + ((row + i) & 3) * 32;
|
||||
V(index) = rd[i];
|
||||
V(base + ((row + i) & 3) * 32) = rd[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue