CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 09:42:43 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
Now, FPU emulation for booke and ibm4xx works fine at a level where
all the related ATF tests pass correctly. However, there still remain
problems:

- FEX and VX bits for FPSCR cannot be modified by mcrfs, mtfsf{,i},
  and mtfsb[01].
- Invalid operations should be treated differently depending on
  FPSCR[VE].

Therefore, comment them in order not to be forgotten.

No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 09:36:35 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
Try to fix FPSCR bits in the end of emulation:

- FPSCR[FEX] is not a sticky bit.
- Turn on FPSCR[FEX] if the emulated instruction causes invalid operation,
  and invalid operation exception is not masked out.
- FPSCR[VX] is not a sticky bit, however it should be set when at least
  one of FPSCR[VXfoo] bits (they are sticky!) is set.
- FPSCR[FX] is a sticky bit, and it should be set if FPSCR is modified by
  instructions other than mtfsf{,i}.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 09:22:26 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
Set ksi_code correctly via fpu_get_fault_code() for SIGFPE.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 09:16:35 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
Do not raise SIGFPE unless MSR[FE0] or MSR[FE1] is set via fenv(3).


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 08:29:07 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
FPSCR[FEX] is not a sticky bit; it is always cleared when read from
userland via mffs on real hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 08:10:41 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
PR port-powerpc/55425

Fix emulation for mtfsf; source register is frB here.

Now, userland processes successfully change rounding mode, by which
FPU-optimized code in OpenSSL works just fine as far as I can see.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 07:54:25 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
For trap instruction, ksi_code should be TRAP_BRKPT not TRAP_TRACE.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 07:52:58 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
Do not set ksi->ksi_addr twice. No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 07:47:27 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_div.c

Log Message:
Do not raise divide-by-zero exception when dividend is zero.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/fpu/fpu_div.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 07:37:25 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
Remove old workaround foe cache problem on ibm4xx.
The problem seems gone already.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 04:31:06 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
fpu_dumpfpn(): Add KASSERT to check argument != NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 04:29:27 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_sqrt.c

Log Message:
Return +INF without exception for +INF, as required by the architecture.
Also, avoid NULL dereference for fpu_dumpfpn() aka DUMPFPN().

Taken from (remaining part of) FreeBSD Revision 343078:
https://svnweb.freebsd.org/base?view=revision&revision=343078


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/fpu/fpu_sqrt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 04:24:08 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_explode.c

Log Message:
Remove extra newline in DPRINTF().


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/fpu/fpu_explode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 04:18:57 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
fpu_dumpfpn(): Add missing \n in printf() format.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 04:17:51 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_sqrt.c

Log Message:
Fix typo in DPRINTF.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/fpu/fpu_sqrt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 03:25:28 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_sqrt.c

Log Message:
Set FPSCR[VXSQRT] for non-zero negative operand.

Taken from (a part of) FreeBSD Revision 343078:
https://svnweb.freebsd.org/base?view=revision&revision=343078


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/fpu/fpu_sqrt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2020-06-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 27 03:07:57 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_add.c fpu_compare.c fpu_div.c fpu_emu.c
fpu_explode.c fpu_implode.c fpu_mul.c fpu_sqrt.c fpu_subr.c

Log Message:
Sort headers. No functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/fpu/fpu_add.c \
src/sys/arch/powerpc/fpu/fpu_compare.c src/sys/arch/powerpc/fpu/fpu_div.c \
src/sys/arch/powerpc/fpu/fpu_mul.c src/sys/arch/powerpc/fpu/fpu_subr.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/fpu/fpu_emu.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/fpu/fpu_explode.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/fpu/fpu_implode.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/fpu/fpu_sqrt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2016-12-28 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Dec 28 10:52:30 UTC 2016

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
PR port-powerpc/51368: powerpc FPU emulation fails for single precision
floating point arithmetic

For single precision instruction, calculate first in double precision,
and then round it. With this fix, single precision arithmetic gets sane
on ibm4xx and booke.

Taken from FreeBSD commit r258250:
  https://svnweb.freebsd.org/base?view=revision&revision=258250

Ok matt and simonb.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2016-12-28 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Dec 28 10:30:04 UTC 2016

Modified Files:
src/sys/arch/powerpc/fpu: fpu_explode.c

Log Message:
- add missing default from FreeBSD
- remove duplicate panic pointed out by matt


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/fpu/fpu_explode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2016-12-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 15 11:32:03 UTC 2016

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c

Log Message:
Fix build without DDB.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/fpu/fpu_emu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/fpu

2014-02-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 25 14:16:25 UTC 2014

Modified Files:
src/sys/arch/powerpc/fpu: fpu_sqrt.c

Log Message:
Mark a temporary as __USEd


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/fpu/fpu_sqrt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.