Commit 1708122b authored by Wei Xiao's avatar Wei Xiao Committed by Cherry Zhang

cmd/vendor/golang.org/x/arch: pull latest updates from x repo (commit edaf650)

Updates #21486

Change-Id: I78ca76490d8e9b52e055c1f0b8d10bdb227e3a80
Reviewed-on: https://go-review.googlesource.com/56331Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 9515610a
...@@ -92,6 +92,12 @@ func allowedMismatchObjdump(text string, inst *Inst, dec ExtInst) bool { ...@@ -92,6 +92,12 @@ func allowedMismatchObjdump(text string, inst *Inst, dec ExtInst) bool {
if strings.Contains(text, "unknown instruction") && hasPrefix(dec.text, "fmla", "fmul", "fmulx", "fcvtzs", "fcvtzu", "fmls", "fmov", "scvtf", "ucvtf") { if strings.Contains(text, "unknown instruction") && hasPrefix(dec.text, "fmla", "fmul", "fmulx", "fcvtzs", "fcvtzu", "fmls", "fmov", "scvtf", "ucvtf") {
return true return true
} }
// Some old objdump recognizes ldur*/stur*/prfum as ldr*/str*/prfm
for k, v := range oldObjdumpMismatch {
if strings.HasPrefix(dec.text, k) && strings.Replace(dec.text, k, v, 1) == text {
return true
}
}
// GNU objdump misses spaces between operands for some instructions (e.g., "ld1 {v10.2s, v11.2s}, [x23],#16") // 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) { if strings.Replace(text, " ", "", -1) == strings.Replace(dec.text, " ", "", -1) {
return true return true
...@@ -122,3 +128,18 @@ var Ncover = strings.Fields(` ...@@ -122,3 +128,18 @@ var Ncover = strings.Fields(`
ins ins
dup dup
`) `)
// Some old objdump wrongly decodes following instructions and allow their mismatches to avoid false alarm
var oldObjdumpMismatch = map[string]string{
//oldObjValue correctValue
"ldr": "ldur",
"ldrb": "ldurb",
"ldrh": "ldurh",
"ldrsb": "ldursb",
"ldrsh": "ldursh",
"ldrsw": "ldursw",
"str": "stur",
"strb": "sturb",
"strh": "sturh",
"prfm": "prfum",
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment