[dev.ssa] cmd/compile: first unoptimized cut at adding FP support

Added F32 and F64 load, store, and addition.
Added F32 and F64 multiply.
Added F32 and F64 subtraction and division.
Added X15 to "clobber" for FP sub/div
Added FP constants
Added separate FP test in gc/testdata

Change-Id: Ifa60dbad948a40011b478d9605862c4b0cc9134c
Reviewed-on: https://go-review.googlesource.com/13612
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
David Chase 2015-08-12 16:38:11 -04:00
parent 270e2152c4
commit 997a9f32b0
10 changed files with 1443 additions and 77 deletions

View file

@ -76,6 +76,14 @@ func applyRewrite(f *Func, rb func(*Block) bool, rv func(*Value, *Config) bool)
// Common functions called from rewriting rules
func is64BitFloat(t Type) bool {
return t.Size() == 8 && t.IsFloat()
}
func is32BitFloat(t Type) bool {
return t.Size() == 4 && t.IsFloat()
}
func is64BitInt(t Type) bool {
return t.Size() == 8 && t.IsInteger()
}