1
0
mirror of https://github.com/golang/go synced 2024-11-22 14:34:45 -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:
Paul E. Murphy 2024-10-16 10:55:39 -05:00 committed by Paul Murphy
parent c0a126b8dc
commit 4d35dcfa21
2 changed files with 3 additions and 0 deletions

View File

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

View File

@ -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