compiler: add support for complex add and sub

This is fairly trivial to add and follows the implementation of gc:
https://github.com/golang/go/blob/170b8b4b12be50eeccbcdadb8523fb4fc670ca72/src/cmd/compile/internal/gc/ssa.go#L2179-L2192
This commit is contained in:
Ayke van Laethem
2019-05-04 22:16:45 +02:00
committed by Ron Evans
parent 1113f9ec0c
commit 638bc17eeb
3 changed files with 28 additions and 0 deletions
+4
View File
@@ -23,3 +23,7 @@
(+2.000000e+000-2.000000e+000i)
(+6.666667e-001-2.000000e+000i)
(+6.666667e-001+1.200000e+000i)
complex64 add: (+2.000000e+000+1.000000e+001i)
complex64 sub: (+8.000000e+000+1.000000e+001i)
complex128 add: (-3.000000e+000+8.000000e+000i)
complex128 sub: (-7.000000e+000+8.000000e+000i)