*am33
*am33_2
{
- unsigned32 sp, next_pc;
+ uint32_t sp, next_pc;
PC = cia;
sp = State.regs[REG_SP];
*am33
*am33_2
{
- unsigned32 usp = State.regs[REG_USP];
- unsigned32 mask;
+ uint32_t usp = State.regs[REG_USP];
+ uint32_t mask;
PC = cia;
mask = REGS;
*am33
*am33_2
{
- unsigned32 usp = State.regs[REG_USP];
- unsigned32 mask;
+ uint32_t usp = State.regs[REG_USP];
+ uint32_t mask;
PC = cia;
mask = REGS;
{
int srcreg, dstreg;
int z, c, n, v;
- unsigned32 reg1, reg2, sum;
+ uint32_t reg1, reg2, sum;
PC = cia;
srcreg = translate_rreg (SD_, RM2);
{
int srcreg, dstreg;
int z, c, n, v;
- unsigned32 reg1, reg2, difference;
+ uint32_t reg1, reg2, difference;
PC = cia;
srcreg = translate_rreg (SD_, RM2);
*am33_2
{
int srcreg, dstreg;
- signed32 temp;
+ int32_t temp;
int c, z, n;
PC = cia;
{
int dstreg;
int c, n, z;
- unsigned32 value;
+ uint32_t value;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
{
int dstreg;
int c, n, z;
- unsigned32 value;
+ uint32_t value;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
*am33_2
{
int srcreg, dstreg;
- unsigned64 temp;
+ uint64_t temp;
int n, z;
PC = cia;
srcreg = translate_rreg (SD_, RM2);
dstreg = translate_rreg (SD_, RN0);
- temp = ((signed64)(signed32)State.regs[dstreg]
- * (signed64)(signed32)State.regs[srcreg]);
+ temp = ((int64_t)(int32_t)State.regs[dstreg]
+ * (int64_t)(int32_t)State.regs[srcreg]);
State.regs[dstreg] = temp & 0xffffffff;
State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
z = (State.regs[dstreg] == 0);
*am33_2
{
int srcreg, dstreg;
- unsigned64 temp;
+ uint64_t temp;
int n, z;
PC = cia;
srcreg = translate_rreg (SD_, RM2);
dstreg = translate_rreg (SD_, RN0);
- temp = ((unsigned64)State.regs[dstreg]
- * (unsigned64)State.regs[srcreg]);
+ temp = ((uint64_t)State.regs[dstreg]
+ * (uint64_t)State.regs[srcreg]);
State.regs[dstreg] = temp & 0xffffffff;
State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
z = (State.regs[dstreg] == 0);
*am33_2
{
int srcreg, dstreg;
- signed64 temp;
+ int64_t temp;
int n, z;
PC = cia;
temp = State.regs[REG_MDR];
temp <<= 32;
temp |= State.regs[dstreg];
- State.regs[REG_MDR] = temp % (signed32)State.regs[srcreg];
- temp /= (signed32)State.regs[srcreg];
+ State.regs[REG_MDR] = temp % (int32_t)State.regs[srcreg];
+ temp /= (int32_t)State.regs[srcreg];
State.regs[dstreg] = temp & 0xffffffff;
z = (State.regs[dstreg] == 0);
n = (State.regs[dstreg] & 0x80000000) != 0;
*am33_2
{
int srcreg, dstreg;
- unsigned64 temp;
+ uint64_t temp;
int n, z;
PC = cia;
*am33_2
{
int srcreg1, srcreg2;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
srcreg2 = translate_rreg (SD_, RN0);
- temp = ((signed64)(signed32)State.regs[srcreg2]
- * (signed64)(signed32)State.regs[srcreg1]);
+ temp = ((int64_t)(int32_t)State.regs[srcreg2]
+ * (int64_t)(int32_t)State.regs[srcreg1]);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg1, srcreg2;
- unsigned64 temp, sum;
+ uint64_t temp, sum;
int c, v;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
srcreg2 = translate_rreg (SD_, RN0);
- temp = ((unsigned64)State.regs[srcreg2]
- * (unsigned64)State.regs[srcreg1]);
+ temp = ((uint64_t)State.regs[srcreg2]
+ * (uint64_t)State.regs[srcreg1]);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg1, srcreg2;
- signed32 temp, sum;
+ int32_t temp, sum;
int v;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
srcreg2 = translate_rreg (SD_, RN0);
- temp = ((signed32)(signed8)(State.regs[srcreg2] & 0xff)
- * (signed32)(signed8)(State.regs[srcreg1] & 0xff));
+ temp = ((int32_t)(int8_t)(State.regs[srcreg2] & 0xff)
+ * (int32_t)(int8_t)(State.regs[srcreg1] & 0xff));
sum = State.regs[REG_MCRL] + temp;
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg1, srcreg2;
- signed64 temp, sum;
+ int64_t temp, sum;
int v;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
srcreg2 = translate_rreg (SD_, RN0);
- temp = ((unsigned32)(State.regs[srcreg2] & 0xff)
- * (unsigned32)(State.regs[srcreg1] & 0xff));
+ temp = ((uint32_t)(State.regs[srcreg2] & 0xff)
+ * (uint32_t)(State.regs[srcreg1] & 0xff));
sum = State.regs[REG_MCRL] + temp;
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg1, srcreg2;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
srcreg2 = translate_rreg (SD_, RN0);
- temp = ((unsigned64)(signed16)(State.regs[srcreg2] & 0xffff)
- * (unsigned64)(signed16)(State.regs[srcreg1] & 0xffff));
+ temp = ((uint64_t)(int16_t)(State.regs[srcreg2] & 0xffff)
+ * (uint64_t)(int16_t)(State.regs[srcreg1] & 0xffff));
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg1, srcreg2;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
srcreg2 = translate_rreg (SD_, RN0);
- temp = ((unsigned64)(State.regs[srcreg2] & 0xffff)
- * (unsigned64)(State.regs[srcreg1] & 0xffff));
+ temp = ((uint64_t)(State.regs[srcreg2] & 0xffff)
+ * (uint64_t)(State.regs[srcreg1] & 0xffff));
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg1, srcreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
int v;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
srcreg2 = translate_rreg (SD_, RN0);
- temp = ((signed32)(signed16)(State.regs[srcreg2] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[srcreg2] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[srcreg2] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[srcreg2] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg1, srcreg2;
- unsigned32 temp, temp2, sum;
+ uint32_t temp, temp2, sum;
int v;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
srcreg2 = translate_rreg (SD_, RN0);
- temp = ((unsigned32)(State.regs[srcreg2] & 0xffff)
- * (unsigned32)(State.regs[srcreg1] & 0xffff));
- temp2 = ((unsigned32)((State.regs[srcreg1] >> 16) & 0xffff)
- * (unsigned32)((State.regs[srcreg2] >> 16) & 0xffff));
+ temp = ((uint32_t)(State.regs[srcreg2] & 0xffff)
+ * (uint32_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((uint32_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (uint32_t)((State.regs[srcreg2] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg, dstreg;
- signed32 temp;
+ int32_t temp;
PC = cia;
srcreg = translate_rreg (SD_, RM2);
dstreg = translate_rreg (SD_, RN0);
- temp = ((signed32)(signed16)(State.regs[dstreg] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg] & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg] & 0xffff));
State.regs[REG_MDRQ] = temp;
- temp = ((signed32)(signed16)((State.regs[dstreg] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[srcreg] >>16) & 0xffff));
+ temp = ((int32_t)(int16_t)((State.regs[dstreg] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[srcreg] >>16) & 0xffff));
State.regs[dstreg] = temp;
}
*am33_2
{
int srcreg, dstreg;
- unsigned32 temp;
+ uint32_t temp;
PC = cia;
srcreg = translate_rreg (SD_, RM2);
dstreg = translate_rreg (SD_, RN0);
- temp = ((unsigned32)(State.regs[dstreg] & 0xffff)
- * (unsigned32)(State.regs[srcreg] & 0xffff));
+ temp = ((uint32_t)(State.regs[dstreg] & 0xffff)
+ * (uint32_t)(State.regs[srcreg] & 0xffff));
State.regs[REG_MDRQ] = temp;
- temp = ((unsigned32)((State.regs[dstreg] >> 16) & 0xffff)
- * (unsigned32)((State.regs[srcreg] >>16) & 0xffff));
+ temp = ((uint32_t)((State.regs[dstreg] >> 16) & 0xffff)
+ * (uint32_t)((State.regs[srcreg] >>16) & 0xffff));
State.regs[dstreg] = temp;
}
/* 32bit saturation. */
if (State.regs[srcreg] == 0x20)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
/* 16bit saturation */
else if (State.regs[srcreg] == 0x10)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
/* 8 bit saturation */
else if (State.regs[srcreg] == 0x8)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
/* 9 bit saturation */
else if (State.regs[srcreg] == 0x9)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
/* 9 bit saturation */
else if (State.regs[srcreg] == 0x30)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
{
int dstreg, imm;
int z, c, n, v;
- unsigned32 reg2, sum;
+ uint32_t reg2, sum;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
{
int imm, dstreg;
int z, c, n, v;
- unsigned32 reg2, difference;
+ uint32_t reg2, difference;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
*am33_2
{
int dstreg;
- signed32 temp;
+ int32_t temp;
int c, z, n;
PC = cia;
*am33_2
{
int dstreg;
- unsigned64 temp;
+ uint64_t temp;
int z, n;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
- temp = ((signed64)(signed32)State.regs[dstreg]
- * (signed64)(signed32)EXTEND8 (IMM8));
+ temp = ((int64_t)(int32_t)State.regs[dstreg]
+ * (int64_t)(int32_t)EXTEND8 (IMM8));
State.regs[dstreg] = temp & 0xffffffff;
State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
z = (State.regs[dstreg] == 0);
*am33_2
{
int dstreg;
- unsigned64 temp;
+ uint64_t temp;
int z, n;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
- temp = ((unsigned64)State.regs[dstreg]
- * (unsigned64)(IMM8 & 0xff));
+ temp = ((uint64_t)State.regs[dstreg]
+ * (uint64_t)(IMM8 & 0xff));
State.regs[dstreg] = temp & 0xffffffff;
State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
z = (State.regs[dstreg] == 0);
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((signed64)(signed32)EXTEND8 (IMM8)
- * (signed64)(signed32)State.regs[srcreg]);
+ temp = ((int64_t)(int32_t)EXTEND8 (IMM8)
+ * (int64_t)(int32_t)State.regs[srcreg]);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((unsigned64) (IMM8)
- * (unsigned64)State.regs[srcreg]);
+ temp = ((uint64_t) (IMM8)
+ * (uint64_t)State.regs[srcreg]);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((signed64)(signed8)EXTEND8 (IMM8)
- * (signed64)(signed8)State.regs[srcreg] & 0xff);
+ temp = ((int64_t)(int8_t)EXTEND8 (IMM8)
+ * (int64_t)(int8_t)State.regs[srcreg] & 0xff);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((unsigned64) (IMM8)
- * (unsigned64)State.regs[srcreg] & 0xff);
+ temp = ((uint64_t) (IMM8)
+ * (uint64_t)State.regs[srcreg] & 0xff);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((signed64)(signed16)EXTEND8 (IMM8)
- * (signed64)(signed16)State.regs[srcreg] & 0xffff);
+ temp = ((int64_t)(int16_t)EXTEND8 (IMM8)
+ * (int64_t)(int16_t)State.regs[srcreg] & 0xffff);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((unsigned64) (IMM8)
- * (unsigned64)State.regs[srcreg] & 0xffff);
+ temp = ((uint64_t) (IMM8)
+ * (uint64_t)State.regs[srcreg] & 0xffff);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
/* 32bit saturation. */
if (IMM8 == 0x20)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
/* 16bit saturation */
else if (IMM8 == 0x10)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
/* 8 bit saturation */
else if (IMM8 == 0x8)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
/* 9 bit saturation */
else if (IMM8 == 0x9)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
/* 9 bit saturation */
else if (IMM8 == 0x30)
{
- signed64 tmp;
+ int64_t tmp;
tmp = State.regs[REG_MCRH];
tmp <<= 32;
*am33_2
{
int z, c, n, v;
- unsigned32 sum, source1, source2;
+ uint32_t sum, source1, source2;
int srcreg1, srcreg2, dstreg;
PC = cia;
*am33_2
{
int z, c, n, v;
- unsigned32 sum, source1, source2;
+ uint32_t sum, source1, source2;
int srcreg1, srcreg2, dstreg;
PC = cia;
*am33_2
{
int z, c, n, v;
- unsigned32 difference, source1, source2;
+ uint32_t difference, source1, source2;
int srcreg1, srcreg2, dstreg;
PC = cia;
*am33_2
{
int z, c, n, v;
- unsigned32 difference, source1, source2;
+ uint32_t difference, source1, source2;
int srcreg1, srcreg2, dstreg;
PC = cia;
*am33_2
{
int z, c, n;
- signed32 temp;
+ int32_t temp;
int srcreg1, srcreg2, dstreg;
PC = cia;
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed64 temp;
+ int64_t temp;
int n, z;
PC = cia;
dstreg1 = translate_rreg (SD_, RD0);
dstreg2 = translate_rreg (SD_, RD2);
- temp = ((signed64)(signed32)State.regs[srcreg1]
- * (signed64)(signed32)State.regs[srcreg2]);
+ temp = ((int64_t)(int32_t)State.regs[srcreg1]
+ * (int64_t)(int32_t)State.regs[srcreg2]);
State.regs[dstreg2] = temp & 0xffffffff;
State.regs[dstreg1] = (temp & 0xffffffff00000000LL) >> 32;
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed64 temp;
+ int64_t temp;
int n, z;
PC = cia;
dstreg1 = translate_rreg (SD_, RD0);
dstreg2 = translate_rreg (SD_, RD2);
- temp = ((unsigned64)State.regs[srcreg1]
- * (unsigned64)State.regs[srcreg2]);
+ temp = ((uint64_t)State.regs[srcreg1]
+ * (uint64_t)State.regs[srcreg2]);
State.regs[dstreg2] = temp & 0xffffffff;
State.regs[dstreg1] = (temp & 0xffffffff00000000LL) >> 32;
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed64 temp;
- unsigned32 sum;
+ int64_t temp;
+ uint32_t sum;
int c, v;
PC = cia;
dstreg1 = translate_rreg (SD_, RD0);
dstreg2 = translate_rreg (SD_, RD2);
- temp = ((signed64)(signed32)State.regs[srcreg1]
- * (signed64)(signed32)State.regs[srcreg2]);
+ temp = ((int64_t)(int32_t)State.regs[srcreg1]
+ * (int64_t)(int32_t)State.regs[srcreg2]);
sum = State.regs[dstreg2] + (temp & 0xffffffff);
c = (sum < State.regs[dstreg2]) || (sum < (temp & 0xffffffff));
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed64 temp;
- unsigned32 sum;
+ int64_t temp;
+ uint32_t sum;
int c, v;
PC = cia;
dstreg1 = translate_rreg (SD_, RD0);
dstreg2 = translate_rreg (SD_, RD2);
- temp = ((unsigned64)State.regs[srcreg1]
- * (unsigned64)State.regs[srcreg2]);
+ temp = ((uint64_t)State.regs[srcreg1]
+ * (uint64_t)State.regs[srcreg2]);
sum = State.regs[dstreg2] + (temp & 0xffffffff);
c = (sum < State.regs[dstreg2]) || (sum < (temp & 0xffffffff));
*am33_2
{
int srcreg1, srcreg2, dstreg;
- signed32 temp, sum;
+ int32_t temp, sum;
int v;
PC = cia;
srcreg2 = translate_rreg (SD_, RN0);
dstreg = translate_rreg (SD_, RD0);
- temp = ((signed32)(State.regs[srcreg2] & 0xff)
- * (signed32)(State.regs[srcreg1] & 0xff));
+ temp = ((int32_t)(State.regs[srcreg2] & 0xff)
+ * (int32_t)(State.regs[srcreg1] & 0xff));
sum = State.regs[dstreg] + temp;
v = ((State.regs[dstreg] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg1, srcreg2, dstreg;
- signed32 temp, sum;
+ int32_t temp, sum;
int v;
PC = cia;
srcreg2 = translate_rreg (SD_, RN0);
dstreg = translate_rreg (SD_, RD0);
- temp = ((unsigned32)(State.regs[srcreg2] & 0xff)
- * (unsigned32)(State.regs[srcreg1] & 0xff));
+ temp = ((uint32_t)(State.regs[srcreg2] & 0xff)
+ * (uint32_t)(State.regs[srcreg1] & 0xff));
sum = State.regs[dstreg] + temp;
v = ((State.regs[dstreg] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed64 temp, sum;
+ int64_t temp, sum;
int v;
PC = cia;
dstreg1 = translate_rreg (SD_, RD0);
dstreg2 = translate_rreg (SD_, RD0);
- temp = ((signed32)(State.regs[srcreg2] & 0xffff)
- * (signed32)(State.regs[srcreg1] & 0xffff));
+ temp = ((int32_t)(State.regs[srcreg2] & 0xffff)
+ * (int32_t)(State.regs[srcreg1] & 0xffff));
State.regs[dstreg2] += (temp & 0xffffffff);
sum = State.regs[dstreg1] + ((temp >> 32) & 0xffffffff);
v = ((State.regs[dstreg1] & 0x80000000) == (temp & 0x80000000)
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed64 temp, sum;
+ int64_t temp, sum;
int v;
PC = cia;
dstreg1 = translate_rreg (SD_, RD0);
dstreg2 = translate_rreg (SD_, RD0);
- temp = ((unsigned32)(State.regs[srcreg2] & 0xffff)
- * (unsigned32)(State.regs[srcreg1] & 0xffff));
+ temp = ((uint32_t)(State.regs[srcreg2] & 0xffff)
+ * (uint32_t)(State.regs[srcreg1] & 0xffff));
State.regs[dstreg2] += (temp & 0xffffffff);
sum = State.regs[dstreg1] + ((temp >> 32) & 0xffffffff);
v = ((State.regs[dstreg1] & 0x80000000) == (temp & 0x80000000)
*am33_2
{
int srcreg1, srcreg2, dstreg;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
int v;
PC = cia;
srcreg2 = translate_rreg (SD_, RN0);
dstreg = translate_rreg (SD_, RD0);
- temp = ((signed32)(State.regs[srcreg2] & 0xffff)
- * (signed32)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)((State.regs[srcreg2] >> 16) & 0xffff));
+ temp = ((int32_t)(State.regs[srcreg2] & 0xffff)
+ * (int32_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)((State.regs[srcreg2] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[dstreg];
v = ((State.regs[dstreg] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg1, srcreg2, dstreg;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
int v;
PC = cia;
srcreg2 = translate_rreg (SD_, RN0);
dstreg = translate_rreg (SD_, RD0);
- temp = ((unsigned32)(State.regs[srcreg2] & 0xffff)
- * (unsigned32)(State.regs[srcreg1] & 0xffff));
- temp2 = ((unsigned32)((State.regs[srcreg1] >> 16) & 0xffff)
- * (unsigned32)((State.regs[srcreg2] >> 16) & 0xffff));
+ temp = ((uint32_t)(State.regs[srcreg2] & 0xffff)
+ * (uint32_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((uint32_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (uint32_t)((State.regs[srcreg2] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[dstreg];
v = ((State.regs[dstreg] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed64 temp;
+ int64_t temp;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
dstreg1 = translate_rreg (SD_, RD0);
dstreg2 = translate_rreg (SD_, RD2);
- temp = ((signed32)(State.regs[srcreg1] & 0xffff)
- * (signed32)(State.regs[srcreg1] & 0xffff));
+ temp = ((int32_t)(State.regs[srcreg1] & 0xffff)
+ * (int32_t)(State.regs[srcreg1] & 0xffff));
State.regs[dstreg2] = temp;
- temp = ((signed32)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)((State.regs[srcreg1] >>16) & 0xffff));
+ temp = ((int32_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)((State.regs[srcreg1] >>16) & 0xffff));
State.regs[dstreg1] = temp;
}
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed64 temp;
+ int64_t temp;
PC = cia;
srcreg1 = translate_rreg (SD_, RM2);
dstreg1 = translate_rreg (SD_, RD0);
dstreg2 = translate_rreg (SD_, RD2);
- temp = ((unsigned32)(State.regs[srcreg1] & 0xffff)
- * (unsigned32)(State.regs[srcreg1] & 0xffff));
+ temp = ((uint32_t)(State.regs[srcreg1] & 0xffff)
+ * (uint32_t)(State.regs[srcreg1] & 0xffff));
State.regs[dstreg2] = temp;
- temp = ((unsigned32)((State.regs[srcreg1] >> 16) & 0xffff)
- * (unsigned32)((State.regs[srcreg1] >>16) & 0xffff));
+ temp = ((uint32_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (uint32_t)((State.regs[srcreg1] >>16) & 0xffff));
State.regs[dstreg1] = temp;
}
*am33_2
{
int dstreg, z, n, c, v;
- unsigned32 sum, imm, reg2;
+ uint32_t sum, imm, reg2;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
*am33_2
{
int dstreg, z, n, c, v;
- unsigned32 difference, imm, reg2;
+ uint32_t difference, imm, reg2;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
*am33_2
{
int dstreg;
- signed32 temp;
+ int32_t temp;
int c, z, n;
PC = cia;
*am33_2
{
int dstreg;
- unsigned64 temp;
+ uint64_t temp;
int z, n;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
- temp = ((signed64)(signed32)State.regs[dstreg]
- * (signed64)(signed32)EXTEND24 (FETCH24 (IMM24A, IMM24B, IMM24C)));
+ temp = ((int64_t)(int32_t)State.regs[dstreg]
+ * (int64_t)(int32_t)EXTEND24 (FETCH24 (IMM24A, IMM24B, IMM24C)));
State.regs[dstreg] = temp & 0xffffffff;
State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
z = (State.regs[dstreg] == 0);
*am33_2
{
int dstreg;
- unsigned64 temp;
+ uint64_t temp;
int z, n;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
- temp = ((unsigned64)State.regs[dstreg]
- * (unsigned64)EXTEND24 (FETCH24 (IMM24A, IMM24B, IMM24C)));
+ temp = ((uint64_t)State.regs[dstreg]
+ * (uint64_t)EXTEND24 (FETCH24 (IMM24A, IMM24B, IMM24C)));
State.regs[dstreg] = temp & 0xffffffff;
State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
z = (State.regs[dstreg] == 0);
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((signed64)EXTEND24 (FETCH24 (IMM24A, IMM24B, IMM24C))
- * (signed64)State.regs[srcreg]);
+ temp = ((int64_t)EXTEND24 (FETCH24 (IMM24A, IMM24B, IMM24C))
+ * (int64_t)State.regs[srcreg]);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((unsigned64) (FETCH24 (IMM24A, IMM24B, IMM24C))
- * (unsigned64)State.regs[srcreg]);
+ temp = ((uint64_t) (FETCH24 (IMM24A, IMM24B, IMM24C))
+ * (uint64_t)State.regs[srcreg]);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((signed64)EXTEND8 (FETCH24 (IMM24A, IMM24B, IMM24C))
- * (signed64)State.regs[srcreg] & 0xff);
+ temp = ((int64_t)EXTEND8 (FETCH24 (IMM24A, IMM24B, IMM24C))
+ * (int64_t)State.regs[srcreg] & 0xff);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((unsigned64) (FETCH24 (IMM24A, IMM24B, IMM24C))
- * (unsigned64)State.regs[srcreg] & 0xff);
+ temp = ((uint64_t) (FETCH24 (IMM24A, IMM24B, IMM24C))
+ * (uint64_t)State.regs[srcreg] & 0xff);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((signed64)EXTEND16 (FETCH24 (IMM24A, IMM24B, IMM24C))
- * (signed64)State.regs[srcreg] & 0xffff);
+ temp = ((int64_t)EXTEND16 (FETCH24 (IMM24A, IMM24B, IMM24C))
+ * (int64_t)State.regs[srcreg] & 0xffff);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN2);
- temp = ((unsigned64) (FETCH24 (IMM24A, IMM24B, IMM24C) & 0xffff)
- * (unsigned64)State.regs[srcreg] & 0xffff);
+ temp = ((uint64_t) (FETCH24 (IMM24A, IMM24B, IMM24C) & 0xffff)
+ * (uint64_t)State.regs[srcreg] & 0xffff);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int dstreg;
- unsigned32 imm, reg2, sum;
+ uint32_t imm, reg2, sum;
int z, n, c, v;
PC = cia;
*am33_2
{
int dstreg;
- unsigned32 imm, reg2, difference;
+ uint32_t imm, reg2, difference;
int z, n, c, v;
PC = cia;
*am33_2
{
int dstreg;
- signed32 temp;
+ int32_t temp;
int c, z, n;
PC = cia;
*am33_2
{
int dstreg;
- unsigned64 temp;
+ uint64_t temp;
int z, n;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
- temp = ((signed64)(signed32)State.regs[dstreg]
- * (signed64)(signed32)(FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D)));
+ temp = ((int64_t)(int32_t)State.regs[dstreg]
+ * (int64_t)(int32_t)(FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D)));
State.regs[dstreg] = temp & 0xffffffff;
State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
z = (State.regs[dstreg] == 0);
*am33_2
{
int dstreg;
- unsigned64 temp;
+ uint64_t temp;
int z, n;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
- temp = ((unsigned64)State.regs[dstreg]
- * (unsigned64) (FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D)));
+ temp = ((uint64_t)State.regs[dstreg]
+ * (uint64_t) (FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D)));
State.regs[dstreg] = temp & 0xffffffff;
State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
z = (State.regs[dstreg] == 0);
*am33_2
{
int srcreg, imm;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((signed64)(signed32)State.regs[srcreg]
- * (signed64)(signed32)imm);
+ temp = ((int64_t)(int32_t)State.regs[srcreg]
+ * (int64_t)(int32_t)imm);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg, imm;
- signed64 temp, sum;
+ int64_t temp, sum;
int c, v;
PC = cia;
srcreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((unsigned64)State.regs[srcreg]
- * (unsigned64)imm);
+ temp = ((uint64_t)State.regs[srcreg]
+ * (uint64_t)imm);
sum = State.regs[REG_MCRL] + (temp & 0xffffffff);
c = (sum < State.regs[REG_MCRL]) || (sum < (temp & 0xffffffff));
State.regs[REG_MCRL] = sum;
*am33_2
{
int srcreg, imm;
- signed32 temp, sum;
+ int32_t temp, sum;
int v;
PC = cia;
srcreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((signed32)(signed8)(State.regs[srcreg] & 0xff)
- * (signed32)(signed8)(imm & 0xff));
+ temp = ((int32_t)(int8_t)(State.regs[srcreg] & 0xff)
+ * (int32_t)(int8_t)(imm & 0xff));
sum = State.regs[REG_MCRL] + temp;
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg, imm;
- signed32 temp, sum;
+ int32_t temp, sum;
int v;
PC = cia;
srcreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((unsigned32)(State.regs[srcreg] & 0xff)
- * (unsigned32)(imm & 0xff));
+ temp = ((uint32_t)(State.regs[srcreg] & 0xff)
+ * (uint32_t)(imm & 0xff));
sum = State.regs[REG_MCRL] + temp;
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg, imm;
- signed32 temp, sum;
+ int32_t temp, sum;
int v;
PC = cia;
srcreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((signed32)(signed16)(State.regs[srcreg] & 0xffff)
- * (signed32)(signed16)(imm & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[srcreg] & 0xffff)
+ * (int32_t)(int16_t)(imm & 0xffff));
sum = State.regs[REG_MCRL] + temp;
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg, imm;
- signed32 temp, sum;
+ int32_t temp, sum;
int v;
PC = cia;
srcreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((unsigned32)(State.regs[srcreg] & 0xffff)
- * (unsigned32)(imm & 0xffff));
+ temp = ((uint32_t)(State.regs[srcreg] & 0xffff)
+ * (uint32_t)(imm & 0xffff));
sum = State.regs[REG_MCRL] + temp;
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg, imm;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
int v;
PC = cia;
srcreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((signed32)(signed16)(State.regs[srcreg] & 0xffff)
- * (signed32)(signed16)(imm & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg] >> 16) & 0xffff)
- * (signed32)(signed16)((imm >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[srcreg] & 0xffff)
+ * (int32_t)(int16_t)(imm & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((imm >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int srcreg, imm;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
int v;
PC = cia;
srcreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((unsigned32)(State.regs[srcreg] & 0xffff)
- * (unsigned32)(imm & 0xffff));
- temp2 = ((unsigned32)((State.regs[srcreg] >> 16) & 0xffff)
- * (unsigned32)((imm >> 16) & 0xffff));
+ temp = ((uint32_t)(State.regs[srcreg] & 0xffff)
+ * (uint32_t)(imm & 0xffff));
+ temp2 = ((uint32_t)((State.regs[srcreg] >> 16) & 0xffff)
+ * (uint32_t)((imm >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
v = ((State.regs[REG_MCRL] & 0x80000000) == (temp & 0x80000000)
&& (temp & 0x80000000) != (sum & 0x80000000));
*am33_2
{
int imm, dstreg;
- signed32 temp;
+ int32_t temp;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((signed32)(signed16)(State.regs[dstreg] & 0xffff)
- * (signed32)(signed16)(imm & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg] & 0xffff)
+ * (int32_t)(int16_t)(imm & 0xffff));
State.regs[REG_MDRQ] = temp;
- temp = ((signed32)(signed16)((State.regs[dstreg] >> 16) & 0xffff)
- * (signed32)(signed16)((imm>>16) & 0xffff));
+ temp = ((int32_t)(int16_t)((State.regs[dstreg] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((imm>>16) & 0xffff));
State.regs[dstreg] = temp;
}
*am33_2
{
int imm, dstreg;
- signed32 temp;
+ int32_t temp;
PC = cia;
dstreg = translate_rreg (SD_, RN0);
imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
- temp = ((unsigned32)(State.regs[dstreg] & 0xffff)
- * (unsigned32)(imm & 0xffff));
+ temp = ((uint32_t)(State.regs[dstreg] & 0xffff)
+ * (uint32_t)(imm & 0xffff));
State.regs[REG_MDRQ] = temp;
- temp = ((unsigned32)((State.regs[dstreg] >> 16) & 0xffff)
- * (unsigned32)((imm >>16) & 0xffff));
+ temp = ((uint32_t)((State.regs[dstreg] >> 16) & 0xffff)
+ * (uint32_t)((imm >>16) & 0xffff));
State.regs[dstreg] = temp;
}
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] += State.regs[srcreg2];
*am33_2
{
int srcreg1, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] += EXTEND4 (IMM4);
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] -= State.regs[srcreg2];
*am33_2
{
int srcreg1, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] -= EXTEND4 (IMM4);
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
genericCmp (State.regs[srcreg2], State.regs[dstreg2]);
*am33_2
{
int srcreg1, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
genericCmp (EXTEND4 (IMM4), State.regs[dstreg2]);
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] = State.regs[srcreg2];
*am33_2
{
int srcreg1, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] = EXTEND4 (IMM4);
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
temp = State.regs[dstreg2];
*am33_2
{
int srcreg1, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
temp = State.regs[dstreg2];
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] >>= State.regs[srcreg2];
*am33_2
{
int srcreg1, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] >>= IMM4;
*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] <<= State.regs[srcreg2];
*am33_2
{
int srcreg1, dstreg1, dstreg2;
- signed32 temp, temp2, sum;
+ int32_t temp, temp2, sum;
PC = cia;
srcreg1 = translate_rreg (SD_, RM1);
dstreg1 = translate_rreg (SD_, RN1);
dstreg2 = translate_rreg (SD_, RN2);
- temp = ((signed32)(signed16)(State.regs[dstreg1] & 0xffff)
- * (signed32)(signed16)(State.regs[srcreg1] & 0xffff));
- temp2 = ((signed32)(signed16)((State.regs[srcreg1] >> 16) & 0xffff)
- * (signed32)(signed16)((State.regs[dstreg1] >> 16) & 0xffff));
+ temp = ((int32_t)(int16_t)(State.regs[dstreg1] & 0xffff)
+ * (int32_t)(int16_t)(State.regs[srcreg1] & 0xffff));
+ temp2 = ((int32_t)(int16_t)((State.regs[srcreg1] >> 16) & 0xffff)
+ * (int32_t)(int16_t)((State.regs[dstreg1] >> 16) & 0xffff));
sum = temp + temp2 + State.regs[REG_MCRL];
State.regs[dstreg2] <<= IMM4;