SPU MFC: Clamp tag and size (#3803)

This commit is contained in:
elad 2017-11-29 14:28:41 +02:00 committed by Ivan
parent a4de495093
commit 91fd1465f2
2 changed files with 4 additions and 4 deletions

View File

@ -141,8 +141,8 @@ bool RawSPUThread::write_reg(const u32 addr, const u32 value)
case MFC_Size_Tag_offs: case MFC_Size_Tag_offs:
{ {
g_tls_mfc[index].tag = value & 0xff; g_tls_mfc[index].tag = value & 0x1f;
g_tls_mfc[index].size = value >> 16; g_tls_mfc[index].size = (value >> 16) & 0x7fff;
return true; return true;
} }

View File

@ -1422,13 +1422,13 @@ bool SPUThread::set_ch_value(u32 ch, u32 value)
case MFC_Size: case MFC_Size:
{ {
ch_mfc_cmd.size = value & 0xffff; ch_mfc_cmd.size = value & 0x7fff;
return true; return true;
} }
case MFC_TagID: case MFC_TagID:
{ {
ch_mfc_cmd.tag = value & 0xff; ch_mfc_cmd.tag = value & 0x1f;
return true; return true;
} }