|
@@ -24,6 +24,7 @@
|
|
|
#include "qemu/qemu-print.h"
|
|
|
#include "cpu.h"
|
|
|
#include "exec/exec-all.h"
|
|
|
+#include "fpu/softfloat.h"
|
|
|
|
|
|
|
|
|
static void alpha_cpu_set_pc(CPUState *cs, vaddr value)
|
|
@@ -187,7 +188,17 @@ static void alpha_cpu_initfn(Object *obj)
|
|
|
{
|
|
|
CPUAlphaState *env = cpu_env(CPU(obj));
|
|
|
|
|
|
+ /* TODO all this should be done in reset, not init */
|
|
|
+
|
|
|
env->lock_addr = -1;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * TODO: this is incorrect. The Alpha Architecture Handbook version 4
|
|
|
+ * describes NaN propagation in section 4.7.10.4. We should prefer
|
|
|
+ * the operand in Fb (whether it is a QNaN or an SNaN), then the
|
|
|
+ * operand in Fa. That is float_2nan_prop_ba.
|
|
|
+ */
|
|
|
+ set_float_2nan_prop_rule(float_2nan_prop_x87, &env->fp_status);
|
|
|
#if defined(CONFIG_USER_ONLY)
|
|
|
env->flags = ENV_FLAG_PS_USER | ENV_FLAG_FEN;
|
|
|
cpu_alpha_store_fpcr(env, (uint64_t)(FPCR_INVD | FPCR_DZED | FPCR_OVFD
|