mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
SPU ASMJIT: move vzeroupper a bit
This commit is contained in:
parent
8deb20e928
commit
c1edae73c5
1 changed files with 19 additions and 5 deletions
|
@ -181,17 +181,31 @@ bool spu_recompiler::compile(u64 last_reset_count, const std::vector<u32>& func)
|
||||||
if (!g_cfg.core.spu_verification)
|
if (!g_cfg.core.spu_verification)
|
||||||
{
|
{
|
||||||
// Disable check (unsafe)
|
// Disable check (unsafe)
|
||||||
|
if (utils::has_avx())
|
||||||
|
{
|
||||||
|
c->vzeroupper();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (m_size == 4)
|
else if (m_size == 4)
|
||||||
{
|
{
|
||||||
c->cmp(x86::dword_ptr(*ls, start), func[1]);
|
c->cmp(x86::dword_ptr(*ls, start), func[1]);
|
||||||
c->jnz(label_diff);
|
c->jnz(label_diff);
|
||||||
|
|
||||||
|
if (utils::has_avx())
|
||||||
|
{
|
||||||
|
c->vzeroupper();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (m_size == 8)
|
else if (m_size == 8)
|
||||||
{
|
{
|
||||||
c->mov(*qw1, static_cast<u64>(func[2]) << 32 | func[1]);
|
c->mov(*qw1, static_cast<u64>(func[2]) << 32 | func[1]);
|
||||||
c->cmp(*qw1, x86::qword_ptr(*ls, start));
|
c->cmp(*qw1, x86::qword_ptr(*ls, start));
|
||||||
c->jnz(label_diff);
|
c->jnz(label_diff);
|
||||||
|
|
||||||
|
if (utils::has_avx())
|
||||||
|
{
|
||||||
|
c->vzeroupper();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (utils::has_512() && false)
|
else if (utils::has_512() && false)
|
||||||
{
|
{
|
||||||
|
@ -272,6 +286,7 @@ bool spu_recompiler::compile(u64 last_reset_count, const std::vector<u32>& func)
|
||||||
|
|
||||||
c->ktestw(x86::k1, x86::k1);
|
c->ktestw(x86::k1, x86::k1);
|
||||||
c->jnz(label_diff);
|
c->jnz(label_diff);
|
||||||
|
c->vzeroupper();
|
||||||
}
|
}
|
||||||
else if (utils::has_512())
|
else if (utils::has_512())
|
||||||
{
|
{
|
||||||
|
@ -392,6 +407,8 @@ bool spu_recompiler::compile(u64 last_reset_count, const std::vector<u32>& func)
|
||||||
c->vptest(x86::ymm0, x86::ymm0);
|
c->vptest(x86::ymm0, x86::ymm0);
|
||||||
c->jnz(label_diff);
|
c->jnz(label_diff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c->vzeroupper();
|
||||||
}
|
}
|
||||||
else if (utils::has_avx())
|
else if (utils::has_avx())
|
||||||
{
|
{
|
||||||
|
@ -531,6 +548,8 @@ bool spu_recompiler::compile(u64 last_reset_count, const std::vector<u32>& func)
|
||||||
c->vptest(x86::ymm0, x86::ymm0);
|
c->vptest(x86::ymm0, x86::ymm0);
|
||||||
c->jnz(label_diff);
|
c->jnz(label_diff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c->vzeroupper();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -661,11 +680,6 @@ bool spu_recompiler::compile(u64 last_reset_count, const std::vector<u32>& func)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (utils::has_avx())
|
|
||||||
{
|
|
||||||
c->vzeroupper();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Acknowledge success and add statistics
|
// Acknowledge success and add statistics
|
||||||
c->add(SPU_OFF_64(block_counter), ::size32(words) / (words_align / 4));
|
c->add(SPU_OFF_64(block_counter), ::size32(words) / (words_align / 4));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue