1
0
mirror of https://github.com/golang/go synced 2024-11-19 07:14:45 -07:00

cmd/internal/obj/ppc64: fix ppc64 build

Apply mask fix from 527b478 to ppc64.

Change-Id: Iac62228f0f04fa8b138e21d82786026158267aaf
Reviewed-on: https://go-review.googlesource.com/6582
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Dave Cheney 2015-03-04 08:54:16 +11:00 committed by Rob Pike
parent 1b9049b554
commit cd277e28f2

View File

@ -905,17 +905,18 @@ func buildop(ctxt *obj.Link) {
} }
sort.Sort(ocmp(optab[:n])) sort.Sort(ocmp(optab[:n]))
for i := 0; i < n; i++ { for i := 0; i < n; i++ {
r0 := optab[i].as & obj.AMask r := optab[i].as
r0 := r & obj.AMask
oprange[r0].start = optab[i:] oprange[r0].start = optab[i:]
for optab[i].as&obj.AMask == r0 { for optab[i].as == r {
i++ i++
} }
oprange[r0].stop = optab[i:] oprange[r0].stop = optab[i:]
i-- i--
switch r0 { switch r {
default: default:
ctxt.Diag("unknown op in build: %v", obj.Aconv(int(optab[i].as))) ctxt.Diag("unknown op in build: %v", obj.Aconv(int(r)))
log.Fatalf("bad code") log.Fatalf("bad code")
case ADCBF: /* unary indexed: op (b+a); op (b) */ case ADCBF: /* unary indexed: op (b+a); op (b) */