diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2016-04-13 18:41:59 -0700 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2016-04-14 02:11:17 +0000 |
| commit | babfb4ec3ba3e4e36b1003d6efbaeddf2e975240 (patch) | |
| tree | 6ead4f750aff147e63df65f7c54b73289a4dd49d /src/cmd/internal/obj/ppc64 | |
| parent | 980ab12ade53e70d037ab2ab475148b216d84a14 (diff) | |
| download | go-babfb4ec3ba3e4e36b1003d6efbaeddf2e975240.tar.xz | |
cmd/internal/obj: change Link.Flag_shared to bool
Change-Id: I9bda2ce6f45fb8292503f86d8f9f161601f222b7
Reviewed-on: https://go-review.googlesource.com/22053
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Diffstat (limited to 'src/cmd/internal/obj/ppc64')
| -rw-r--r-- | src/cmd/internal/obj/ppc64/asm9.go | 10 | ||||
| -rw-r--r-- | src/cmd/internal/obj/ppc64/obj9.go | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/internal/obj/ppc64/asm9.go b/src/cmd/internal/obj/ppc64/asm9.go index 0497d3b678..e793f26803 100644 --- a/src/cmd/internal/obj/ppc64/asm9.go +++ b/src/cmd/internal/obj/ppc64/asm9.go @@ -585,7 +585,7 @@ func aclass(ctxt *obj.Link, a *obj.Addr) int { ctxt.Instoffset = a.Offset if a.Sym != nil { // use relocation if a.Sym.Type == obj.STLSBSS { - if ctxt.Flag_shared != 0 { + if ctxt.Flag_shared { return C_TLS_IE } else { return C_TLS_LE @@ -1413,7 +1413,7 @@ func opform(ctxt *obj.Link, insn uint32) int { func symbolAccess(ctxt *obj.Link, s *obj.LSym, d int64, reg int16, op uint32) (o1, o2 uint32) { var base uint32 form := opform(ctxt, op) - if ctxt.Flag_shared != 0 { + if ctxt.Flag_shared { base = REG_R2 } else { base = REG_R0 @@ -1425,7 +1425,7 @@ func symbolAccess(ctxt *obj.Link, s *obj.LSym, d int64, reg int16, op uint32) (o rel.Siz = 8 rel.Sym = s rel.Add = d - if ctxt.Flag_shared != 0 { + if ctxt.Flag_shared { switch form { case D_FORM: rel.Type = obj.R_ADDRPOWER_TOCREL @@ -1646,7 +1646,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) { if v != 0 { ctxt.Diag("illegal indexed instruction\n%v", p) } - if ctxt.Flag_shared != 0 && r == REG_R13 { + if ctxt.Flag_shared && r == REG_R13 { rel := obj.Addrel(ctxt.Cursym) rel.Off = int32(ctxt.Pc) rel.Siz = 4 @@ -1677,7 +1677,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) { if v != 0 { ctxt.Diag("illegal indexed instruction\n%v", p) } - if ctxt.Flag_shared != 0 && r == REG_R13 { + if ctxt.Flag_shared && r == REG_R13 { rel := obj.Addrel(ctxt.Cursym) rel.Off = int32(ctxt.Pc) rel.Siz = 4 diff --git a/src/cmd/internal/obj/ppc64/obj9.go b/src/cmd/internal/obj/ppc64/obj9.go index 7a24d1d1bf..4f9b3943cf 100644 --- a/src/cmd/internal/obj/ppc64/obj9.go +++ b/src/cmd/internal/obj/ppc64/obj9.go @@ -470,7 +470,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) { q = p - if ctxt.Flag_shared != 0 && cursym.Name != "runtime.duffzero" && cursym.Name != "runtime.duffcopy" && cursym.Name != "runtime.stackBarrier" { + if ctxt.Flag_shared && cursym.Name != "runtime.duffzero" && cursym.Name != "runtime.duffcopy" && cursym.Name != "runtime.stackBarrier" { // When compiling Go into PIC, all functions must start // with instructions to load the TOC pointer into r2: // @@ -558,7 +558,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) { q.Spadj = int32(-aoffset) } - if ctxt.Flag_shared != 0 { + if ctxt.Flag_shared { q = obj.Appendp(ctxt, q) q.As = AMOVD q.Lineno = p.Lineno |
