diff --git a/src/cmd/asm/internal/asm/asm.go b/src/cmd/asm/internal/asm/asm.go index 5cbf2232d1d..e8dee10d787 100644 --- a/src/cmd/asm/internal/asm/asm.go +++ b/src/cmd/asm/internal/asm/asm.go @@ -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{ diff --git a/src/cmd/asm/internal/asm/testdata/386.out b/src/cmd/asm/internal/asm/testdata/386.out index d88277d1aed..be43ccbfbb6 100644 --- a/src/cmd/asm/internal/asm/testdata/386.out +++ b/src/cmd/asm/internal/asm/testdata/386.out @@ -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 diff --git a/src/cmd/asm/internal/asm/testdata/amd64.out b/src/cmd/asm/internal/asm/testdata/amd64.out index 020a4229765..51932faff0d 100644 --- a/src/cmd/asm/internal/asm/testdata/amd64.out +++ b/src/cmd/asm/internal/asm/testdata/amd64.out @@ -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)