]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement 'software completion' for floating point arithmetic. On the
authordfr <dfr@FreeBSD.org>
Fri, 4 Dec 1998 10:52:48 +0000 (10:52 +0000)
committerdfr <dfr@FreeBSD.org>
Fri, 4 Dec 1998 10:52:48 +0000 (10:52 +0000)
commit8f01fff32f94dc39467983f7207be602213d0730
tree008714999f57f4465bc9805f8d58777620fd1a81
parent20107e8f4764aa3175f409771cda14a671f81324
Implement 'software completion' for floating point arithmetic.  On the
alpha, operations involving non-finite numbers or denormalised numbers
or operations which should generate such numbers will cause an arithmetic
exception.  For programs which follow some strict code generation rules,
the kernel trap handler can then 'complete' the operation by emulating
the faulting instruction.

To use software completion, a program must be compiled with the arguments
'-mtrap-precision=i' and '-mfp-trap-mode=su' or '-mfp-trap-mode=sui'.
Programs compiled in this way can use non-finite and denormalised numbers
at the expense of slightly less efficient code generation of floating
point instructions.  Programs not compiled with these options will receive
a SIGFPE signal when non-finite or denormalised numbers are used or
generated.

Reviewed by: John Polstra <jdp@polstra.com>
13 files changed:
sys/alpha/alpha/fp_emulate.c [new file with mode: 0644]
sys/alpha/alpha/ieee_float.c [new file with mode: 0644]
sys/alpha/alpha/ieee_float.h [new file with mode: 0644]
sys/alpha/alpha/machdep.c
sys/alpha/alpha/trap.c
sys/alpha/alpha/vm_machdep.c
sys/alpha/conf/files.alpha
sys/alpha/include/fpu.h [new file with mode: 0644]
sys/alpha/include/inst.h [new file with mode: 0644]
sys/alpha/include/pcb.h
sys/conf/files.alpha
sys/powerpc/aim/vm_machdep.c
sys/powerpc/powerpc/vm_machdep.c