feat(disasm): name the CLDEMOTE encoding the decoder refuses

The hint NOP opcode 0F 1C /r with a memory operand is CLDEMOTE, a
memory-only instruction the toolchain's own table carries; the decoder
rejects the encoding instead of naming it.  The rejected-encoding side
of the supplementary table names it from the bytes, and the corpus row
0f1c03 pins the text in the unlisted fixture, round trip byte exact.

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-07 02:27:51 +02:00
1 parent dd356b9e6a
commit 458d981f31
4 files changed
+36 -3

No files matched your search

+6
View File
@@ -68,6 +68,12 @@ func Decode(a arch.Arch, code []byte, addr uint64) (Instruction, error) {
default: // amd64
inst, err := x86asm.Decode(code, 64)
if err != nil {
// A few named families the decoder refuses outright live in
// the same supplementary table; anything else keeps the
// placeholder.
if text, n, ok := nameAMD64Rejected(code); ok {
return Instruction{Addr: addr, Text: text, Len: n}, nil
}
return Instruction{Addr: addr, Text: "???", Len: 1}, nil
}
if inst.Op == 0 {