aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/ppc64/obj9.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-03-16 15:54:44 -0400
committerRuss Cox <rsc@golang.org>2015-03-20 04:47:08 +0000
commit532ccae1547580e572cf5cd0f687f4508ceeddb9 (patch)
tree0bf2149cc9ed14425e7cc6f83dd597372597aad2 /src/cmd/internal/obj/ppc64/obj9.go
parent631d6a33bf2889c5c648555ab993687a48f9c287 (diff)
downloadgo-532ccae1547580e572cf5cd0f687f4508ceeddb9.tar.xz
cmd/internal/obj: replace Addr.U struct {...} with Val interface{}
An interface{} is more in the spirit of the original union. By my calculations, on 64-bit systems this reduces Addr from 120 to 80 bytes, and Prog from 592 to 424 bytes. Change-Id: I0d7b0981513c2a3c94c9ac76bb4f8816485b5a3c Reviewed-on: https://go-review.googlesource.com/7744 Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/ppc64/obj9.go')
-rw-r--r--src/cmd/internal/obj/ppc64/obj9.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/internal/obj/ppc64/obj9.go b/src/cmd/internal/obj/ppc64/obj9.go
index f47d81d77e..90fa725239 100644
--- a/src/cmd/internal/obj/ppc64/obj9.go
+++ b/src/cmd/internal/obj/ppc64/obj9.go
@@ -56,7 +56,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog) {
switch p.As {
case AFMOVS:
if p.From.Type == obj.TYPE_FCONST {
- f32 := float32(p.From.U.Dval)
+ f32 := float32(p.From.Val.(float64))
i32 := math.Float32bits(f32)
literal := fmt.Sprintf("$f32.%08x", i32)
s := obj.Linklookup(ctxt, literal, 0)
@@ -69,7 +69,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog) {
case AFMOVD:
if p.From.Type == obj.TYPE_FCONST {
- i64 := math.Float64bits(p.From.U.Dval)
+ i64 := math.Float64bits(p.From.Val.(float64))
literal := fmt.Sprintf("$f64.%016x", i64)
s := obj.Linklookup(ctxt, literal, 0)
s.Size = 8
@@ -130,7 +130,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
p := cursym.Text
textstksiz := p.To.Offset
- cursym.Args = p.To.U.Argsize
+ cursym.Args = p.To.Val.(int32)
cursym.Locals = int32(textstksiz)
/*