]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm: fix (printing of) TEXT flags
authorRob Pike <r@golang.org>
Thu, 5 Mar 2015 05:58:20 +0000 (21:58 -0800)
committerRob Pike <r@golang.org>
Thu, 5 Mar 2015 06:09:14 +0000 (06:09 +0000)
With the new unificiation, the flag must be TYPE_CONST to print
properly.

Change-Id: I7cd1c56355724f08cbe9afc6ab7a66904031adc9
Reviewed-on: https://go-review.googlesource.com/6903
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/asm/internal/asm/asm.go
src/cmd/asm/internal/asm/testdata/386.out
src/cmd/asm/internal/asm/testdata/amd64.out

index 5cbf2232d1d8096d68d64860b750da8efd48dbf2..e8dee10d7875db5d4f2ba61498fd7217ed17f3fa 100644 (file)
@@ -141,6 +141,7 @@ func (p *Parser) asmText(word string, operands [][]lex.Token) {
                Lineno: p.histLineNum,
                From:   nameAddr,
                From3: obj.Addr{
+                       Type:   obj.TYPE_CONST,
                        Offset: flag,
                },
                To: obj.Addr{
index d88277d1aedf4215776d551b1ffb34bb43f8c69c..be43ccbfbb695b984ddfd6461d47bbe1b3810a9e 100644 (file)
@@ -1,4 +1,4 @@
-5 00001 (testdata/386.s:5)     TEXT    foo(SB), $0
+5 00001 (testdata/386.s:5)     TEXT    foo(SB), 0, $0
 8 00002 (testdata/386.s:8)     SETCC   AX
 9 00003 (testdata/386.s:9)     SETCC   foo+4(SB)
 12 00004 (testdata/386.s:12)   DIVB    AX
index 020a422976530b58c5bca68a6570401aebec6287..51932faff0de7a82bde1fc7d3044f900412af3e3 100644 (file)
@@ -1,4 +1,4 @@
-5 00001 (testdata/amd64.s:5)   TEXT    foo(SB), $0
+5 00001 (testdata/amd64.s:5)   TEXT    foo(SB), 0, $0
 8 00002 (testdata/amd64.s:8)   NEGQ    R11
 9 00003 (testdata/amd64.s:9)   NEGQ    4(R11)
 10 00004 (testdata/amd64.s:10) NEGQ    foo+4(SB)