Skip to content

cmd/vendor/golang.org/x/arch/arm64/arm64asm: test zero register mismatch #23478

@prattmic

Description

@prattmic

I got this when testing near HEAD:

--- FAIL: TestObjdumpARM64Testdata (2.20s)
	ext_test.go:195: decode(744bbf38) = "ldrsb x20, [x27,wzr,uxtw]", 4, want "ldrsb x20, [x27,w31,uxtw]", 4
		
	ext_test.go:195: decode(29493fbc) = "str s9, [x9,wzr,uxtw]", 4, want "str s9, [x9,w31,uxtw]", 4
		
	ext_test.go:195: decode(225bff38) = "ldrsb w2, [x25,wzr,uxtw #0]", 4, want "ldrsb w2, [x25,w31,uxtw #0]", 4
		
	ext_test.go:195: decode(cad8bf78) = "ldrsh x10, [x6,wzr,sxtw #1]", 4, want "ldrsh x10, [x6,w31,sxtw #1]", 4
		
	ext_test.go:195: decode(a278ff3c) = "ldr q2, [x5,xzr,lsl #4]", 4, want "ldr q2, [x5,x31,lsl #4]", 4
		
	ext_test.go:195: decode(a278ff3c) = "ldr q2, [x5,xzr,lsl #4]", 4, want "ldr q2, [x5,x31,lsl #4]", 4
		
	ext_test.go:201: 9203 test cases, 686 expected mismatches, 6 failures; 5781 cases/second
	ext_test.go:202: decoder coverage: 95.5%;
	ext_test.go:201: 9203 test cases, 0 expected mismatches, 0 failures; 17619 cases/second
	ext_test.go:202: decoder coverage: 95.5%;
FAIL
FAIL	cmd/vendor/golang.org/x/arch/arm64/arm64asm	10.074s

From ARMv8 ARM: "In instruction encodings, the value 0b11111 (31) is used to indicate the ZR (zero register)."

So this appears to be a disagreement with objdump about whether to call registers w/xzr or w/x31.

I'm not sure exactly which version of objdump was running on this machine. I can dig around to find it if it would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions