Skip to content
Snippets Groups Projects
Commit f1399c10 authored by rtoy's avatar rtoy
Browse files

Fix issue with complex contagion on sparc. The vops for complex+real

and complex-real didn't compute the imaginary part correctly; we need
to add (or subtract) 0 to get the correct signed zero.

(+ #c(1d0 -0d0) 1d0) -> #c(2d0 0d0), not #c(2d0 -0d0)

code/sparc-svr4-vm.lisp:
o Define *FP-CONSTANT-0F0* and *FP-CONSTANT-0D0*, floating point
  zeroes.

compiler/generic/new-genesis.lisp:
o Initialize *FP-CONSTANT-0F0* and *FP-CONSTANT-0D0* during genesis.

compiler/sparc/parms.lisp:
o Add *FP-CONSTANT-0F0* and *FP-CONSTANT-0D0* to the static symbols so
  vops can access them easily.  For bootstrapping purposes, we steal
  the spare-9 and sparc-8 symbols.

compiler/sparc/float.lisp:
o Update vops for complex + float and complex - float.  Need to add
  (or subtract) 0 to the imaginary part to get the correct signed
  zero.
o Update vop for float+complex as above.
parent 266512a4
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment