]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm: add position to PCALIGN directives
authorPaul E. Murphy <murp@ibm.com>
Wed, 16 Oct 2024 15:55:39 +0000 (10:55 -0500)
committerPaul Murphy <murp@ibm.com>
Mon, 21 Oct 2024 14:11:44 +0000 (14:11 +0000)
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>
src/cmd/asm/internal/asm/asm.go
src/cmd/asm/internal/asm/testdata/ppc64.s

index b960d8f022e19647b7aee5b3bf57d916ae4818c8..9fc7fa559816cbfd09c2b1a7e9748dbcf90225fc 100644 (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)
index 918c2e1681104a3c0c235a06d304648a1f6da77b..e2c1000e0b92f08dcf5b724efa24453aeaefead9 100644 (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