feat(disasm): name the arm64 words arm64asm refuses
arm64asm rejects three exception-space words the toolchain's corpus assembles: the hypervisor call HVC, the secure monitor call SMC and the speculation barrier SB. The supplementary naming table reads the raw word in the error branch and renders the corpus spellings; the corpus rows are pinned in the parity fixture and the boundary test holds the unallocated neighbours on the placeholder. Assisted-by: GLM 5.3
This commit is contained in:
1 parent
3f35b2a718
commit
0f6e008c9a
4 files changed
+114
No files matched your search
@@ -42,6 +42,12 @@ func Decode(a arch.Arch, code []byte, addr uint64) (Instruction, error) {
|
||||
}
|
||||
inst, err := arm64asm.Decode(code)
|
||||
if err != nil {
|
||||
// A few exception-space words the decoder refuses outright
|
||||
// (HVC, SMC, SB) live in the supplementary naming table;
|
||||
// anything else keeps the placeholder.
|
||||
if text, n, ok := nameARM64Rejected(code); ok {
|
||||
return Instruction{Addr: addr, Text: text, Len: n}, nil
|
||||
}
|
||||
return Instruction{Addr: addr, Text: "???", Len: 4}, nil
|
||||
}
|
||||
return Instruction{Addr: addr, Text: arm64asm.GoSyntax(inst, addr, nil, nil), Len: 4}, nil
|
||||
|
||||
Reference in new issue
Block a user