mirror of
https://github.com/golang/go
synced 2024-11-19 07:04:43 -07:00
cmd/internal/obj/arm: fix arm build
Mishandled the mask for the arm instructions. TBR=rsc Change-Id: Idc596097c0fa61dcacdfb4aca5bc6d0b4fd40eeb Reviewed-on: https://go-review.googlesource.com/6641 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
ec7d8a6167
commit
527b478edb
@ -1361,17 +1361,18 @@ func buildop(ctxt *obj.Link) {
|
||||
|
||||
sort.Sort(ocmp(optab[:n]))
|
||||
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:]
|
||||
for optab[i].as&obj.AMask == r0 {
|
||||
for optab[i].as == r {
|
||||
i++
|
||||
}
|
||||
oprange[r0].stop = optab[i:]
|
||||
i--
|
||||
|
||||
switch r0 {
|
||||
switch r {
|
||||
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")
|
||||
|
||||
case AADD:
|
||||
|
Loading…
Reference in New Issue
Block a user