mirror of
https://github.com/golang/go.git
synced 2025-11-11 14:11:04 +00: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
2 changed files with 3 additions and 0 deletions
|
|
@ -353,6 +353,7 @@ func (p *Parser) asmPCAlign(operands [][]lex.Token) {
|
||||||
prog := &obj.Prog{
|
prog := &obj.Prog{
|
||||||
Ctxt: p.ctxt,
|
Ctxt: p.ctxt,
|
||||||
As: obj.APCALIGN,
|
As: obj.APCALIGN,
|
||||||
|
Pos: p.pos(),
|
||||||
From: key,
|
From: key,
|
||||||
}
|
}
|
||||||
p.append(prog, "", true)
|
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), SPR(3) // ebe100047fe303a6
|
||||||
MOVD 4(R1), XER // ebe100047fe103a6
|
MOVD 4(R1), XER // ebe100047fe103a6
|
||||||
OR $0, R0, R0 // 60000000
|
OR $0, R0, R0 // 60000000
|
||||||
|
|
||||||
|
PCALIGN $16
|
||||||
PNOP // 0700000000000000
|
PNOP // 0700000000000000
|
||||||
|
|
||||||
SETB CR1,R3 // 7c640100
|
SETB CR1,R3 // 7c640100
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue