feat(asm): encode the amd64 x87 family

The x87 stack controls, the D8/DC arithmetic pair, the conditional moves,
the register compares, FADDDP, the memory loads and the FXSAVE pair, each
pinned byte for byte against go tool asm through every corpus line the
toolchain's own amd64enc.s carries for the family (78 lines).

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-06 23:59:47 +02:00
1 parent 1040739fbb
commit f0b08ccea0
5 files changed
+401

No files matched your search

+7
View File
@@ -16,6 +16,13 @@ import "strings"
func Encodable(mnemonic string) bool {
upper := strings.ToUpper(mnemonic)
// The corpus families first, mirroring encode()'s dispatch order: a
// family owning the name decides encodability whatever the suffix split
// would make of it.
if amd64FamilyEncodable(upper) {
return true
}
// Fixed-name instructions (no size suffix).
switch upper {
case "RET", "NOP", "CALL", "JMP",