@@ -1033,6 +1033,7 @@ struct CPUPPCState {
float_status vec_status;
float_status fp_status; /* Floating point execution context */
target_ulong fpscr; /* Floating point status and control register */
+ bool hardfloat; /* use hardfloat (this breaks FPSCR[FI] bit) */
/* Internal devices resources */
ppc_tb_t *tb_env; /* Time base and decrementer */
@@ -1163,6 +1164,7 @@ struct PowerPCCPU {
void *machine_data;
int32_t node_id; /* NUMA node this CPU belongs to */
PPCHash64Options *hash64_opts;
+ bool hardfloat; /* pass on property to env */
/* Those resources are used only during code translation */
/* opcode handlers */
@@ -10736,6 +10736,7 @@ static void ppc_cpu_reset(CPUState *s)
/* tininess for underflow is detected before rounding */
set_float_detect_tininess(float_tininess_before_rounding,
&env->fp_status);
+ env->hardfloat = cpu->hardfloat;
for (i = 0; i < ARRAY_SIZE(env->spr_cb); i++) {
ppc_spr_t *spr = &env->spr_cb[i];
@@ -10868,6 +10869,7 @@ static Property ppc_cpu_properties[] = {
false),
DEFINE_PROP_BOOL("pre-3.0-migration", PowerPCCPU, pre_3_0_migration,
false),
+ DEFINE_PROP_BOOL("hardfloat", PowerPCCPU, hardfloat, false),
DEFINE_PROP_END_OF_LIST(),
};
Add a property to allow setting a flag in cpu env that will be used to control if hardfloat is used for floating point ops (i.e. speed is preferred over accuracy). Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> --- target/ppc/cpu.h | 2 ++ target/ppc/translate_init.inc.c | 2 ++ 2 files changed, 4 insertions(+)