Removed 32-bit related #if(n)def's

This commit is contained in:
Alexandro Sánchez Bach 2014-06-02 14:08:32 +02:00
parent 111da4d0fd
commit 82c6d8d68b
4 changed files with 8 additions and 92 deletions

View File

@ -2325,32 +2325,7 @@ private:
}
void MULHDU(u32 rd, u32 ra, u32 rb, bool rc)
{
#ifdef _M_X64
CPU.GPR[rd] = __umulh(CPU.GPR[ra], CPU.GPR[rb]);
#else
//ConLog.Warning("MULHDU");
const u64 RA = CPU.GPR[ra];
const u64 RB = CPU.GPR[rb];
u128 RD;
u64& lo = (u64&)((u32*)&RD)[0];
u64& mid = (u64&)((u32*)&RD)[1];
u64& hi = (u64&)((u32*)&RD)[2];
const u64 a0 = ((u32*)&RA)[0];
const u64 a1 = ((u32*)&RA)[1];
const u64 b0 = ((u32*)&RB)[0];
const u64 b1 = ((u32*)&RB)[1];
lo = a0 * b0;
hi = a1 * b1;
mid += (a0 + a1) * (b0 + b1) - (lo + hi);
CPU.GPR[rd] = RD._u64[1];
#endif
if(rc) CPU.UpdateCR0<s64>(CPU.GPR[rd]);
}
void MULHWU(u32 rd, u32 ra, u32 rb, bool rc)
@ -2535,32 +2510,7 @@ private:
}
void MULHD(u32 rd, u32 ra, u32 rb, bool rc)
{
#ifdef _M_X64
CPU.GPR[rd] = __mulh(CPU.GPR[ra], CPU.GPR[rb]);
#else
//ConLog.Warning("MULHD");
const s64 RA = CPU.GPR[ra];
const s64 RB = CPU.GPR[rb];
u128 RT;
s64& lo = (s64&)((s32*)&RT)[0];
s64& mid = (s64&)((s32*)&RT)[1];
s64& hi = (s64&)((s32*)&RT)[2];
const s64 a0 = ((s32*)&RA)[0];
const s64 a1 = ((s32*)&RA)[1];
const s64 b0 = ((s32*)&RB)[0];
const s64 b1 = ((s32*)&RB)[1];
lo = a0 * b0;
hi = a1 * b1;
mid += (a0 + a1) * (b0 + b1) - (lo + hi);
CPU.GPR[rd] = RT._u64[1];
#endif
if(rc) CPU.UpdateCR0<s64>(CPU.GPR[rd]);
}
void MULHW(u32 rd, u32 ra, u32 rb, bool rc)

View File

@ -677,7 +677,6 @@ private:
}
void ROTMA(u32 rt, u32 ra, u32 rb)
{
#ifdef _M_X64
XmmInvalidate(rt);
for (u32 i = 0; i < 4; i++)
{
@ -688,14 +687,6 @@ private:
c.mov(cpu_dword(GPR[rt]._u32[i]), qw0->r32());
}
LOG_OPCODE();
#else
WRAPPER_BEGIN(rt, ra, rb, zz);
CPU.GPR[rt]._i32[0] = ((0 - CPU.GPR[rb]._u32[0]) & 0x3f) < 32 ? CPU.GPR[ra]._i32[0] >> ((0 - CPU.GPR[rb]._u32[0]) & 0x3f) : CPU.GPR[ra]._i32[0] >> 31;
CPU.GPR[rt]._i32[1] = ((0 - CPU.GPR[rb]._u32[1]) & 0x3f) < 32 ? CPU.GPR[ra]._i32[1] >> ((0 - CPU.GPR[rb]._u32[1]) & 0x3f) : CPU.GPR[ra]._i32[1] >> 31;
CPU.GPR[rt]._i32[2] = ((0 - CPU.GPR[rb]._u32[2]) & 0x3f) < 32 ? CPU.GPR[ra]._i32[2] >> ((0 - CPU.GPR[rb]._u32[2]) & 0x3f) : CPU.GPR[ra]._i32[2] >> 31;
CPU.GPR[rt]._i32[3] = ((0 - CPU.GPR[rb]._u32[3]) & 0x3f) < 32 ? CPU.GPR[ra]._i32[3] >> ((0 - CPU.GPR[rb]._u32[3]) & 0x3f) : CPU.GPR[ra]._i32[3] >> 31;
WRAPPER_END(rt, ra, rb, 0);
#endif
}
void SHL(u32 rt, u32 ra, u32 rb)
{
@ -1948,19 +1939,12 @@ private:
}
void XSWD(u32 rt, u32 ra)
{
#ifdef _M_X64
c.movsxd(*qw0, cpu_dword(GPR[ra]._i32[0]));
c.movsxd(*qw1, cpu_dword(GPR[ra]._i32[2]));
c.mov(cpu_qword(GPR[rt]._i64[0]), *qw0);
c.mov(cpu_qword(GPR[rt]._i64[1]), *qw1);
XmmInvalidate(rt);
LOG_OPCODE();
#else
WRAPPER_BEGIN(rt, ra, yy, zz);
CPU.GPR[rt]._i64[0] = (s64)CPU.GPR[ra]._i32[0];
CPU.GPR[rt]._i64[1] = (s64)CPU.GPR[ra]._i32[2];
WRAPPER_END(rt, ra, 0, 0);
#endif
}
void XSHW(u32 rt, u32 ra)
{

View File

@ -299,11 +299,7 @@ public:
{
public:
static const size_t max_count = _max_count;
#ifdef _M_X64
static const bool x86 = false;
#else
static const bool x86 = true;
#endif
private:
union _CRT_ALIGN(8) {
struct {
@ -327,7 +323,7 @@ public:
__forceinline bool Pop(u32& res)
{
if (max_count > 1 || x86)
if (max_count > 1)
{
std::lock_guard<std::mutex> lock(m_lock);
if(!m_index)
@ -358,7 +354,7 @@ public:
__forceinline bool Push(u32 value)
{
if (max_count > 1 || x86)
if (max_count > 1)
{
std::lock_guard<std::mutex> lock(m_lock);
if(m_index >= max_count)
@ -383,7 +379,7 @@ public:
__forceinline void PushUncond(u32 value)
{
if (max_count > 1 || x86)
if (max_count > 1)
{
std::lock_guard<std::mutex> lock(m_lock);
if(m_index >= max_count)
@ -400,7 +396,7 @@ public:
__forceinline void PushUncond_OR(u32 value)
{
if (max_count > 1 || x86)
if (max_count > 1)
{
std::lock_guard<std::mutex> lock(m_lock);
if(m_index >= max_count)
@ -410,17 +406,13 @@ public:
}
else
{
#ifdef _M_X64
InterlockedOr64((volatile __int64*)m_indval, ((u64)value << 32) | 1);
#else
ConLog.Error("PushUncond_OR(): no code compiled");
#endif
}
}
__forceinline void PopUncond(u32& res)
{
if (max_count > 1 || x86)
if (max_count > 1)
{
std::lock_guard<std::mutex> lock(m_lock);
if(!m_index)
@ -445,7 +437,7 @@ public:
__forceinline u32 GetCount()
{
if (max_count > 1 || x86)
if (max_count > 1)
{
std::lock_guard<std::mutex> lock(m_lock);
return m_index;
@ -458,7 +450,7 @@ public:
__forceinline u32 GetFreeCount()
{
if (max_count > 1 || x86)
if (max_count > 1)
{
std::lock_guard<std::mutex> lock(m_lock);
return max_count - m_index;

View File

@ -339,15 +339,6 @@ int cellAudioInit()
// convert the data from float to u16 with clipping:
if (!first_mix)
{
#ifndef _M_X64
for (u32 i = 0; i < (sizeof(buf2ch) / sizeof(float)); i++)
{
if (g_is_u16)
oal_buffer[oal_pos][oal_buffer_offset + i] = (s16)(min<float>(max<float>(buf2ch[i] * 0x8000, -0x8000), 0x7fff));
oal_buffer_float[oal_pos_float][oal_buffer_offset + i] = buf2ch[i];
}
#else
// 2x MULPS
// 2x MAXPS (optional)
// 2x MINPS (optional)
@ -369,7 +360,6 @@ int cellAudioInit()
{
oal_buffer_float[oal_pos_float][oal_buffer_offset + i] = buf2ch[i];
}
#endif
}
const u64 stamp1 = get_system_time();