1
0
mirror of https://github.com/golang/go synced 2024-11-19 06:54:39 -07:00

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/6903
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Rob Pike 2015-03-04 21:58:20 -08:00
parent 29f18f2800
commit b0d545201e
3 changed files with 3 additions and 2 deletions

View 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{

View 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

View 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)