mirror of
https://github.com/golang/go
synced 2024-11-22 09:04:42 -07:00
cmd/asm: add position to PCALIGN directives
This allows PCALIGN to be used in the end-to-end assembly tests without causing an error due to missing file position. Change-Id: Iadea2875854ffd544a963acd21293dc9840da2d0 Reviewed-on: https://go-review.googlesource.com/c/go/+/620635 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
c0a126b8dc
commit
4d35dcfa21
@ -353,6 +353,7 @@ func (p *Parser) asmPCAlign(operands [][]lex.Token) {
|
||||
prog := &obj.Prog{
|
||||
Ctxt: p.ctxt,
|
||||
As: obj.APCALIGN,
|
||||
Pos: p.pos(),
|
||||
From: key,
|
||||
}
|
||||
p.append(prog, "", true)
|
||||
|
2
src/cmd/asm/internal/asm/testdata/ppc64.s
vendored
2
src/cmd/asm/internal/asm/testdata/ppc64.s
vendored
@ -1156,6 +1156,8 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
|
||||
MOVD 4(R1), SPR(3) // ebe100047fe303a6
|
||||
MOVD 4(R1), XER // ebe100047fe103a6
|
||||
OR $0, R0, R0 // 60000000
|
||||
|
||||
PCALIGN $16
|
||||
PNOP // 0700000000000000
|
||||
|
||||
SETB CR1,R3 // 7c640100
|
||||
|
Loading…
Reference in New Issue
Block a user