Skip to content

Commit

Permalink
cmd/internal/obj/arm: fix large stack offsets on nacl/arm
Browse files Browse the repository at this point in the history
The code already fixed large non-stack offsets
but explicitly excluded stack references.
Perhaps you could get away with that before,
but current versions of nacl reject such stack
references. Rewrite them the same as the others.

For golang#11956 but probably not the last problem.

Change-Id: I0db4e3a1ed4f88ccddf0d30228982960091d9fb7
Reviewed-on: https://go-review.googlesource.com/13010
Reviewed-by: Dave Cheney <[email protected]>
  • Loading branch information
rsc committed Jul 31, 2015
1 parent 108ec5f commit 782eea0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/internal/obj/arm/asm5.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ func asmoutnacl(ctxt *obj.Link, origPC int32, p *obj.Prog, o *Optab, out []uint3
break
}

if (p.To.Type == obj.TYPE_MEM && p.To.Reg != REG_R13 && p.To.Reg != REG_R9) || // MOVW Rx, X(Ry), y != 13 && y != 9
(p.From.Type == obj.TYPE_MEM && p.From.Reg != REG_R13 && p.From.Reg != REG_R9) { // MOVW X(Rx), Ry, x != 13 && x != 9
if (p.To.Type == obj.TYPE_MEM && p.To.Reg != REG_R9) || // MOVW Rx, X(Ry), y != 9
(p.From.Type == obj.TYPE_MEM && p.From.Reg != REG_R9) { // MOVW X(Rx), Ry, x != 9
var a *obj.Addr
if p.To.Type == obj.TYPE_MEM {
a = &p.To
Expand Down

0 comments on commit 782eea0

Please sign in to comment.