mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
osdcomm.h: Remove a few unimportant 64-bit functions
This commit is contained in:
parent
699630ed16
commit
0acebba107
@ -1185,16 +1185,16 @@ void psxcpu_device::multiplier_update()
|
||||
case MULTIPLIER_OPERATION_MULT:
|
||||
{
|
||||
int64_t result = mul_32x32( (int32_t)m_multiplier_operand1, (int32_t)m_multiplier_operand2 );
|
||||
m_lo = extract_64lo( result );
|
||||
m_hi = extract_64hi( result );
|
||||
m_lo = result;
|
||||
m_hi = result >> 32;
|
||||
}
|
||||
break;
|
||||
|
||||
case MULTIPLIER_OPERATION_MULTU:
|
||||
{
|
||||
uint64_t result = mulu_32x32( m_multiplier_operand1, m_multiplier_operand2 );
|
||||
m_lo = extract_64lo( result );
|
||||
m_hi = extract_64hi( result );
|
||||
m_lo = result;
|
||||
m_hi = result >> 32;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -128,6 +128,8 @@ DEFINE_DEVICE_TYPE(SCUDSP, scudsp_cpu_device, "scudsp", "Sega SCUDSP")
|
||||
#define scudsp_readmem(A,MD) m_data->read_dword(A | (MD << 6))
|
||||
#define scudsp_writemem(A,MD,B) m_data->write_dword(A | (MD << 6), B)
|
||||
|
||||
constexpr uint64_t concat_64(uint32_t hi, uint32_t lo) { return (uint64_t(hi) << 32) | lo; }
|
||||
|
||||
uint32_t scudsp_cpu_device::scudsp_get_source_mem_reg_value( uint32_t mode )
|
||||
{
|
||||
if ( mode < 0x8 )
|
||||
|
@ -525,8 +525,7 @@ void tms340x0_device::dint(uint16_t op)
|
||||
int64_t dividend = ((uint64_t)*rd1 << 32) | (uint32_t)*rd2; \
|
||||
int64_t quotient = dividend / *rs; \
|
||||
int32_t remainder = dividend % *rs; \
|
||||
uint32_t signbits = (int32_t)quotient >> 31; \
|
||||
if (extract_64hi(quotient) != signbits) \
|
||||
if ((int64_t)(int32_t)quotient != quotient) \
|
||||
{ \
|
||||
SET_V_LOG(1); \
|
||||
} \
|
||||
@ -573,7 +572,7 @@ void tms340x0_device::divs_b(uint16_t op) { DIVS(B); }
|
||||
uint64_t dividend = ((uint64_t)*rd1 << 32) | (uint32_t)*rd2; \
|
||||
uint64_t quotient = dividend / (uint32_t)*rs; \
|
||||
uint32_t remainder = dividend % (uint32_t)*rs; \
|
||||
if (extract_64hi(quotient) != 0) \
|
||||
if (quotient > 0xffffffff) \
|
||||
{ \
|
||||
SET_V_LOG(1); \
|
||||
} \
|
||||
@ -740,8 +739,8 @@ void tms340x0_device::modu_b(uint16_t op) { MODU(B); }
|
||||
SET_Z_LOG(product == 0); \
|
||||
SET_N_BIT(product >> 32, 31); \
|
||||
\
|
||||
*rd1 = extract_64hi(product); \
|
||||
R##REG(DSTREG(op)|1) = extract_64lo(product); \
|
||||
*rd1 = (int32_t)(product >> 32); \
|
||||
R##REG(DSTREG(op)|1) = product & 0xffffffff; \
|
||||
\
|
||||
COUNT_CYCLES(20); \
|
||||
}
|
||||
@ -759,8 +758,8 @@ void tms340x0_device::mpys_b(uint16_t op) { MPYS(B); }
|
||||
product = mulu_32x32(m1, *rd1); \
|
||||
SET_Z_LOG(product == 0); \
|
||||
\
|
||||
*rd1 = extract_64hi(product); \
|
||||
R##REG(DSTREG(op)|1) = extract_64lo(product); \
|
||||
*rd1 = (int32_t)(product >> 32); \
|
||||
R##REG(DSTREG(op)|1) = product & 0xffffffff; \
|
||||
\
|
||||
COUNT_CYCLES(21); \
|
||||
}
|
||||
|
@ -75,11 +75,6 @@ using s64 = std::int64_t;
|
||||
FUNDAMENTAL MACROS
|
||||
***************************************************************************/
|
||||
|
||||
// Concatenate/extract 32-bit halves of 64-bit values
|
||||
constexpr uint64_t concat_64(uint32_t hi, uint32_t lo) { return (uint64_t(hi) << 32) | uint32_t(lo); }
|
||||
constexpr uint32_t extract_64hi(uint64_t val) { return uint32_t(val >> 32); }
|
||||
constexpr uint32_t extract_64lo(uint64_t val) { return uint32_t(val); }
|
||||
|
||||
// Macros for normalizing data into big or little endian formats
|
||||
constexpr uint16_t swapendian_int16(uint16_t val) { return (val << 8) | (val >> 8); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user