Commit b0d54520 authored by Rob Pike's avatar Rob Pike

cmd/asm: fix (printing of) TEXT flags

With the new unificiation, the flag must be TYPE_CONST to print
properly.

Change-Id: I7cd1c56355724f08cbe9afc6ab7a66904031adc9
Reviewed-on: https://go-review.googlesource.com/6903Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 29f18f28
...@@ -141,6 +141,7 @@ func (p *Parser) asmText(word string, operands [][]lex.Token) { ...@@ -141,6 +141,7 @@ func (p *Parser) asmText(word string, operands [][]lex.Token) {
Lineno: p.histLineNum, Lineno: p.histLineNum,
From: nameAddr, From: nameAddr,
From3: obj.Addr{ From3: obj.Addr{
Type: obj.TYPE_CONST,
Offset: flag, Offset: flag,
}, },
To: obj.Addr{ To: obj.Addr{
......
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 8 00002 (testdata/386.s:8) SETCC AX
9 00003 (testdata/386.s:9) SETCC foo+4(SB) 9 00003 (testdata/386.s:9) SETCC foo+4(SB)
12 00004 (testdata/386.s:12) DIVB AX 12 00004 (testdata/386.s:12) DIVB AX
......
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 8 00002 (testdata/amd64.s:8) NEGQ R11
9 00003 (testdata/amd64.s:9) NEGQ 4(R11) 9 00003 (testdata/amd64.s:9) NEGQ 4(R11)
10 00004 (testdata/amd64.s:10) NEGQ foo+4(SB) 10 00004 (testdata/amd64.s:10) NEGQ foo+4(SB)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment