>That's not really true. When you emulate a processor,
>you handle each instruction separately, and so you can
>have a "special case" for each instruction. However,
>writing a disassembler that way would be maddening..
You could just about do it for a small system (having worked on the source
code of a Z80 emulator, I can visualise the magnitude of a disassembler
written this way for the Z80, and we'd only be talking 2-3000 lines of
code...) but for the ix86 you'd just have to forget it!
>> You need to access the sizes of the single operands: op[i].size.
>> The problem is that for some opcodes it's not clear *which* operand
>> to use, e.g for 'in' you need to use the size of the source operand
>> and ignore the one of the destination operand, while for 'out' it's
>> just the opposite. Then again, there are some opcodes *without*
>> operands, for which you do need to fall back to the default operand_size.
>
>Most of those should have no suffix at all...
>"clil" or "cliw" is ridiculous :)
But some of course do; 'xlatb' etc being an ideal example.