mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 16:31:28 +12:00
Improve approximate xfloat
- Disable denormals for SPU threads - Add clamping helpers
This commit is contained in:
parent
3b46c9cb6a
commit
a36f0497ce
2 changed files with 59 additions and 35 deletions
|
@ -282,6 +282,21 @@ void cpu_thread::operator()()
|
|||
thread_ctrl::set_native_priority(-1);
|
||||
}
|
||||
|
||||
if (id_type() == 2)
|
||||
{
|
||||
// force input/output denormals to zero for SPU threads (FTZ/DAZ)
|
||||
_mm_setcsr( _mm_getcsr() | 0x8040 );
|
||||
|
||||
volatile u32 a = 0x1fc00000;
|
||||
__m128 b = _mm_castsi128_ps(_mm_set1_epi32(const_cast<u32 &>(a)));
|
||||
int c = _mm_cvtsi128_si32(_mm_castps_si128(_mm_mul_ps(b,b)));
|
||||
|
||||
if (c != 0)
|
||||
{
|
||||
LOG_FATAL(GENERAL,"could not disable denormals");
|
||||
}
|
||||
}
|
||||
|
||||
if (id_type() == 1 && false)
|
||||
{
|
||||
g_fxo->get<cpu_profiler>()->registered.push(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue