]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj/arm: fix large stack offsets on nacl/arm
authorRuss Cox <rsc@golang.org>
Fri, 31 Jul 2015 02:35:56 +0000 (22:35 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 31 Jul 2015 04:35:48 +0000 (04:35 +0000)
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 #11956 but probably not the last problem.

Change-Id: I0db4e3a1ed4f88ccddf0d30228982960091d9fb7
Reviewed-on: https://go-review.googlesource.com/13010
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/internal/obj/arm/asm5.go

index e50dcf56f89902764600993764f415e851209325..610637c42edea38388fdd2c2a4343ac5fe050331 100644 (file)
@@ -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