mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd: remove dead code
Fixes #74076 Change-Id: Icc67b3d4e342f329584433bd1250c56ae8f5a73d Reviewed-on: https://go-review.googlesource.com/c/go/+/690635 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Alan Donovan <adonovan@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
parent
a2c45f0eb1
commit
4ee0df8c46
52 changed files with 1 additions and 1033 deletions
|
|
@ -625,51 +625,16 @@ func truncate64Fto32F(f float64) float32 {
|
|||
return math.Float32frombits(r)
|
||||
}
|
||||
|
||||
// extend32Fto64F converts a float32 value to a float64 value preserving the bit
|
||||
// pattern of the mantissa.
|
||||
func extend32Fto64F(f float32) float64 {
|
||||
if !math.IsNaN(float64(f)) {
|
||||
return float64(f)
|
||||
}
|
||||
// NaN bit patterns aren't necessarily preserved across conversion
|
||||
// instructions so we need to do the conversion manually.
|
||||
b := uint64(math.Float32bits(f))
|
||||
// | sign | exponent | mantissa |
|
||||
r := ((b << 32) & (1 << 63)) | (0x7ff << 52) | ((b & 0x7fffff) << (52 - 23))
|
||||
return math.Float64frombits(r)
|
||||
}
|
||||
|
||||
// DivisionNeedsFixUp reports whether the division needs fix-up code.
|
||||
func DivisionNeedsFixUp(v *Value) bool {
|
||||
return v.AuxInt == 0
|
||||
}
|
||||
|
||||
// auxFrom64F encodes a float64 value so it can be stored in an AuxInt.
|
||||
func auxFrom64F(f float64) int64 {
|
||||
if f != f {
|
||||
panic("can't encode a NaN in AuxInt field")
|
||||
}
|
||||
return int64(math.Float64bits(f))
|
||||
}
|
||||
|
||||
// auxFrom32F encodes a float32 value so it can be stored in an AuxInt.
|
||||
func auxFrom32F(f float32) int64 {
|
||||
if f != f {
|
||||
panic("can't encode a NaN in AuxInt field")
|
||||
}
|
||||
return int64(math.Float64bits(extend32Fto64F(f)))
|
||||
}
|
||||
|
||||
// auxTo32F decodes a float32 from the AuxInt value provided.
|
||||
func auxTo32F(i int64) float32 {
|
||||
return truncate64Fto32F(math.Float64frombits(uint64(i)))
|
||||
}
|
||||
|
||||
// auxTo64F decodes a float64 from the AuxInt value provided.
|
||||
func auxTo64F(i int64) float64 {
|
||||
return math.Float64frombits(uint64(i))
|
||||
}
|
||||
|
||||
func auxIntToBool(i int64) bool {
|
||||
if i == 0 {
|
||||
return false
|
||||
|
|
@ -703,12 +668,6 @@ func auxIntToValAndOff(i int64) ValAndOff {
|
|||
func auxIntToArm64BitField(i int64) arm64BitField {
|
||||
return arm64BitField(i)
|
||||
}
|
||||
func auxIntToInt128(x int64) int128 {
|
||||
if x != 0 {
|
||||
panic("nonzero int128 not allowed")
|
||||
}
|
||||
return 0
|
||||
}
|
||||
func auxIntToFlagConstant(x int64) flagConstant {
|
||||
return flagConstant(x)
|
||||
}
|
||||
|
|
@ -750,12 +709,6 @@ func valAndOffToAuxInt(v ValAndOff) int64 {
|
|||
func arm64BitFieldToAuxInt(v arm64BitField) int64 {
|
||||
return int64(v)
|
||||
}
|
||||
func int128ToAuxInt(x int128) int64 {
|
||||
if x != 0 {
|
||||
panic("nonzero int128 not allowed")
|
||||
}
|
||||
return 0
|
||||
}
|
||||
func flagConstantToAuxInt(x flagConstant) int64 {
|
||||
return int64(x)
|
||||
}
|
||||
|
|
@ -826,23 +779,6 @@ func uaddOvf(a, b int64) bool {
|
|||
return uint64(a)+uint64(b) < uint64(a)
|
||||
}
|
||||
|
||||
// loadLSymOffset simulates reading a word at an offset into a
|
||||
// read-only symbol's runtime memory. If it would read a pointer to
|
||||
// another symbol, that symbol is returned. Otherwise, it returns nil.
|
||||
func loadLSymOffset(lsym *obj.LSym, offset int64) *obj.LSym {
|
||||
if lsym.Type != objabi.SRODATA {
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, r := range lsym.R {
|
||||
if int64(r.Off) == offset && r.Type&^objabi.R_WEAK == objabi.R_ADDR && r.Add == 0 {
|
||||
return r.Sym
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func devirtLECall(v *Value, sym *obj.LSym) *Value {
|
||||
v.Op = OpStaticLECall
|
||||
auxcall := v.Aux.(*AuxCall)
|
||||
|
|
@ -1564,10 +1500,6 @@ func GetPPC64Shiftmb(auxint int64) int64 {
|
|||
return int64(int8(auxint >> 8))
|
||||
}
|
||||
|
||||
func GetPPC64Shiftme(auxint int64) int64 {
|
||||
return int64(int8(auxint))
|
||||
}
|
||||
|
||||
// Test if this value can encoded as a mask for a rlwinm like
|
||||
// operation. Masks can also extend from the msb and wrap to
|
||||
// the lsb too. That is, the valid masks are 32 bit strings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue