//#define DEBUG_UNALIGNED
//#define DEBUG_UNASSIGNED
//#define DEBUG_ASI
+//#define DEBUG_PCALL
#ifdef DEBUG_MMU
#define DPRINTF_MMU(fmt, args...) \
F_BINOP(div);
#undef F_BINOP
-void helper_fsmuld(void)
+void helper_fsmuld(float32 src1, float32 src2)
{
- DT0 = float64_mul(float32_to_float64(FT0, &env->fp_status),
- float32_to_float64(FT1, &env->fp_status),
+ DT0 = float64_mul(float32_to_float64(src1, &env->fp_status),
+ float32_to_float64(src2, &env->fp_status),
&env->fp_status);
}
return int32_to_float32(src, &env->fp_status);
}
-F_HELPER(ito, d)
+void helper_fitod(int32_t src)
{
- DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
+ DT0 = int32_to_float64(src, &env->fp_status);
}
void helper_fitoq(int32_t src)
}
#ifdef TARGET_SPARC64
-F_HELPER(xto, s)
+float32 helper_fxtos(void)
{
- FT0 = int64_to_float32(*((int64_t *)&DT1), &env->fp_status);
+ return int64_to_float32(*((int64_t *)&DT1), &env->fp_status);
}
F_HELPER(xto, d)
#undef F_HELPER
/* floating point conversion */
-void helper_fdtos(void)
+float32 helper_fdtos(void)
{
- FT0 = float64_to_float32(DT1, &env->fp_status);
+ return float64_to_float32(DT1, &env->fp_status);
}
-void helper_fstod(void)
+void helper_fstod(float32 src)
{
- DT0 = float32_to_float64(FT1, &env->fp_status);
+ DT0 = float32_to_float64(src, &env->fp_status);
}
float32 helper_fqtos(void)
return float32_to_int32_round_to_zero(src, &env->fp_status);
}
-void helper_fdtoi(void)
+int32_t helper_fdtoi(void)
{
- *((int32_t *)&FT0) = float64_to_int32_round_to_zero(DT1, &env->fp_status);
+ return float64_to_int32_round_to_zero(DT1, &env->fp_status);
}
int32_t helper_fqtoi(void)
}
#ifdef TARGET_SPARC64
-void helper_fstox(void)
+void helper_fstox(float32 src)
{
- *((int64_t *)&DT0) = float32_to_int64_round_to_zero(FT1, &env->fp_status);
+ *((int64_t *)&DT0) = float32_to_int64_round_to_zero(src, &env->fp_status);
}
void helper_fdtox(void)
break;
case 0x01c00a04: /* MXCC control register */
if (size == 4)
- env->mxccregs[3] = (env->mxccregs[0xa] & 0xffffffff00000000ULL)
+ env->mxccregs[3] = (env->mxccregs[3] & 0xffffffff00000000ULL)
| val;
else
DPRINTF_MXCC("%08x: unimplemented access size: %d\n", addr,
{
target_ulong ret;
- val1 &= 0xffffffffUL;
+ val2 &= 0xffffffffUL;
ret = helper_ld_asi(addr, asi, 4, 0);
ret &= 0xffffffffUL;
- if (val1 == ret)
- helper_st_asi(addr, val2 & 0xffffffffUL, asi, 4);
+ if (val2 == ret)
+ helper_st_asi(addr, val1 & 0xffffffffUL, asi, 4);
return ret;
}
target_ulong ret;
ret = helper_ld_asi(addr, asi, 8, 0);
- if (val1 == ret)
- helper_st_asi(addr, val2, asi, 8);
+ if (val2 == ret)
+ helper_st_asi(addr, val1, asi, 8);
return ret;
}
#endif /* TARGET_SPARC64 */
}
}
-uint64_t helper_pack64(target_ulong high, target_ulong low)
-{
- return ((uint64_t)high << 32) | (uint64_t)(low & 0xffffffff);
-}
-
void helper_stdf(target_ulong addr, int mem_idx)
{
helper_check_align(addr, 7);
env->tl--;
env->tsptr = &env->ts[env->tl & MAXTL_MASK];
}
+
+void helper_set_softint(uint64_t value)
+{
+ env->softint |= (uint32_t)value;
+}
+
+void helper_clear_softint(uint64_t value)
+{
+ env->softint &= (uint32_t)~value;
+}
+
+void helper_write_softint(uint64_t value)
+{
+ env->softint = (uint32_t)value;
+}
#endif
void helper_flush(target_ulong addr)