Skip to content

Fix missing AT&T mnemonic size suffixes - #640

Open
Nitr0-G wants to merge 1 commit into
zyantific:masterfrom
Nitr0-G:fix-att-size-suffixes
Open

Fix missing AT&T mnemonic size suffixes#640
Nitr0-G wants to merge 1 commit into
zyantific:masterfrom
Nitr0-G:fix-att-size-suffixes

Conversation

@Nitr0-G

@Nitr0-G Nitr0-G commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Fixes #625

All affected instructions:

CALL, JMP, POP, PUSH,
DEC, DIV, IDIV, IMUL, INC, MUL, NEG, NOP, NOT, PTWRITE,

FADD, FCOM, FCOMP, FDIV, FDIVR, FLD, FMUL, FST, FSTP, FSUB, FSUBR,

FIADD, FICOM, FICOMP, FIDIV, FIDIVR, FILD, FIMUL,
FIST, FISTP, FISTTP, FISUB, FISUBR,

FLDENV, FNSAVE, FNSTENV, FRSTOR,

LGDT, LIDT, SGDT, SIDT

@mappzor

mappzor commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This code looks very brittle, we generally try to avoid hardcoding based on mnemonics, especially when it'd be used so extensively. Another thing we don't like to rely on is meta information e.g. instruction->meta.category.

I didn't review this in full but I can already tell based on existing tests this produces invalid outputs like calll. I believe we need a better approach here and most importantly extensive validation effort to compare against binutils to solve this and other pending AT&T issues like some instructions with interfixes, something formatter isn't ready to support right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AT&T] Size suffix is missing for certain instructions

2 participants