On 5/5/19 2:52 AM, Mark Cave-Ayland wrote: > Right, it looks like VSX_CMP is the culprit here. Am I right in thinking that > it's > best to remove the opc parameter from GEN_VSX_HELPER_X3 above, and then have a > separate gen and helper function for just the VSX_CMP instructions? > Presumably this > reduces of the overhead at both translation and execution time for the > instructions > that don't require it.
Yep. I think the best fix for VSX_CMP is to return the value that is to be assigned to cr[6], and let it assign like so: gen_helper_foo(cpu_crf[6], other, arguments); (Or if the opcode bit is unset, TCGv_i32 ignored = tcg_temp_new_i32(); gen_helper_foo(ignored, other arguments); tcg_temp_free_i32(ignored); ) at which point these functions do not modify tcg globals, so the decl can be improved to DEF_HELPER_FLAGS_2(xvcmpeqdp, TCG_CALL_NO_RWG, i32, ptr, ptr, ptr) To keep the assignment vs exception order, you remove the direct call to do_float_check_status and use gen_helper_float_check_status. r~