mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[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:
parent
270e2152c4
commit
997a9f32b0
10 changed files with 1443 additions and 77 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue