Package: golang-1.12 / 1.12.7-3

0003-arm64-arm64asm-recognise-new-ssbb-pssbb-mnemonics-fr.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Michael Hudson-Doyle <michael.hudson@canonical.com>
Date: Thu, 20 Sep 2018 09:20:31 +0200
Subject: arm64/arm64asm: recognise new ssbb/pssbb mnemonics from objdump

Fixes golang/go#27754

Change-Id: I8fcc3bc3c718cf0d93afbd1d383df48316b522d4
Reviewed-on: https://go-review.googlesource.com/136455
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
---
 .../vendor/golang.org/x/arch/arm64/arm64asm/objdump_test.go  | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/cmd/vendor/golang.org/x/arch/arm64/arm64asm/objdump_test.go b/src/cmd/vendor/golang.org/x/arch/arm64/arm64asm/objdump_test.go
index 261c7ca..3baf8a1 100644
--- a/src/cmd/vendor/golang.org/x/arch/arm64/arm64asm/objdump_test.go
+++ b/src/cmd/vendor/golang.org/x/arch/arm64/arm64asm/objdump_test.go
@@ -103,6 +103,13 @@ func allowedMismatchObjdump(text string, inst *Inst, dec ExtInst) bool {
 			return true
 		}
 	}
+	// New objdump supports some newer mnemonics than this package. This
+	// package should be updated to support the new mnemonics and the sense
+	// of this reversed to continue passing with older objdumps but that
+	// requires internal ARM tooling.
+	if newForm, ok := newMnemonics[text]; ok && newForm == dec.text {
+		return true
+	}
 	// GNU objdump misses spaces between operands for some instructions (e.g., "ld1 {v10.2s, v11.2s}, [x23],#16")
 	if strings.Replace(text, " ", "", -1) == strings.Replace(dec.text, " ", "", -1) {
 		return true
@@ -148,3 +155,8 @@ var oldObjdumpMismatch = map[string]string{
 	"strh":  "sturh",
 	"prfm":  "prfum",
 }
+
+var newMnemonics = map[string]string{
+	"dsb #0x00": "ssbb",
+	"dsb #0x04": "pssbb",
+}