https://bugs.kde.org/show_bug.cgi?id=406256

--- Comment #1 from Carl Love <c...@us.ibm.com> ---
Created attachment 119258
  --> https://bugs.kde.org/attachment.cgi?id=119258&action=edit
Proposed fix for making the subnormal results track the VSCR[NJ] bit

The attachment is a proposed fix for the issue.  The Iops to implement the
various vector floating point instructions map to a subset of the vector
floating point instructions.  The underlying host hardware needs to run with
the VSCR[NJ] bit set to zero to generate the subnormal results.  The guest
state needs to then adjust the arguments/results of the vector floating point
instructions as needed based on the guest setting of VSCR[NJ].  Hence the need
to setup the host with VSCR[NJ] = 0.  This was done in
VEX/priv/host_ppc_defs.c, function getRRegUniverse_PPC ().  The function is
actually setting up the guest register state.  The function is called once as
part of the initialization process.  That is the right time to set the host
configuration.  Ideally there would be a host initialization function that
would be called for doing this but I don't see one.  Given that there is not
host specific function, I had to put the code into the guest setup function.  I
don't consider this to be the ideal place for the code.  I would be interested
in ideas on a more appropriate location for this code. *******

The host setup code requires the addition of the -mvsx and -maltivec command
line options to be set for Power 7.  These options are on by default when
compiling for Power 8, 9.  Hence the Makefile.all.am change.

Finally, the current regression tests do not seem to cover the subnormal cases
well enough.  I created an explicit subnormal test which runs with the VSCR[NJ]
bit set to zero and one.

Again, would appreciate feedback on where best to do the host initialization.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to