I found a little bit weird to see nasm generate "FF 14 25 xx xx xx xx" for
call qword [__imp_SomeExternalFunction]
where cl (from MSVC) gives "FF 15 xx xx xx xx", which is one byte shorter than what nasm generates, and also is what I am expecting.
I looked them up in Intel's manual, and found "14 25" is the "[scaled_index]+disp32" version with scaled_index = 0, while "15" stands for just "+disp32". I believe they are semantically the same. By my intuition, I think the shorter form should be better so I am some how curious why nasm generates the longer form.
Now the question is, is there any intention of generating the 1-byte longer instruction? or it is just a defect?
Another question, how can I force nasm to generate the 2-byte version of indirect near call?
I know you can do this by "db ff 15 xx xx xx xx", but what I want is a more general solution, like telling nasm to choose a specific form of an instruction (opcode, addressing mode, etc).
Note: the example given is obtained on Windows 10 x64, with nasm targeting win64.