aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/ppc64/obj9.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/internal/obj/ppc64/obj9.go')
-rw-r--r--src/cmd/internal/obj/ppc64/obj9.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/internal/obj/ppc64/obj9.go b/src/cmd/internal/obj/ppc64/obj9.go
index a55c402c44..23196875a5 100644
--- a/src/cmd/internal/obj/ppc64/obj9.go
+++ b/src/cmd/internal/obj/ppc64/obj9.go
@@ -200,8 +200,8 @@ func progedit(ctxt *obj.Link, p *obj.Prog, newprog obj.ProgAlloc) {
// Is this a shifted 16b constant? If so, rewrite it to avoid a creating and loading a constant.
val := p.From.Offset
shift := bits.TrailingZeros64(uint64(val))
- mask := 0xFFFF << shift
- if val&int64(mask) == val || (val>>(shift+16) == -1 && (val>>shift)<<shift == val) {
+ mask := int64(0xFFFF) << shift
+ if val&mask == val || (val>>(shift+16) == -1 && (val>>shift)<<shift == val) {
// Rewrite this value into MOVD $const>>shift, Rto; SLD $shift, Rto
q := obj.Appendp(p, c.newprog)
q.As = ASLD