Re: [PATCH] scripts/decodecode: Make objdump always use operand-size suffix

From: Ammar Faizi
Date: Tue Mar 01 2022 - 04:17:01 EST


On 3/1/22 3:41 PM, Borislav Petkov wrote:
On Tue, Mar 01, 2022 at 11:11:19AM +0700, Ammar Faizi wrote:
For better reading, always use operand-size suffix for the generated

What does "better reading" mean here exactly?

See, there's a reason why -M suffix is not default in objdump. And in
my experience, I've never looked at objdump output and thought, "hm, so
the operand size insn mnemonic suffix is missing here". And if at all,
one usually wants to know the operand size of a single instruction - not
the whole bunch - and for that we tend to look at the vendor manuals
directly...

So I don't think this brings any improvement to the output but hey, I
could be missing a reason.


I am aware that for particular cases, we can deduce the operand-size from its
operand. So using operand-size is not always mandatory.

I would say always using operand-size is our habit in writing Assembly code.
Especially for the Linux kernel. Looking at entry_64.S, entry_32.S and many
Assembly files here, we always use the operand-size. It also helps to determine
the size quickly. It gives us extra information about the operand size when
sometimes it can be vague.

For me (and probably other people who always take care of the operand-size),
it is a convenience to have them in the objdump as well :)

I don't think it's that urgent to have, but having it should not bother people
who don't care with the operand-size suffix anyway.

--
Ammar Faizi