The CPU emulation use over 128 opcodes.
It will be a large switch.
How to use jump table instead of if - else - if - else - if - else.
Is there any compile option of VC6?
Who can help me?
Use switch, case and break. I believe that will compile into a jump table.
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/1.6.html#switch
I don't think there is any way you can force it to use a jump table, it's one of those decisions the compiler will make on it's own. There are a couple of things that seem to affect this that you have control over, however. A very large switch statement will usually compile into a jump table, and there are optimization flags you can use which may affect this. In gcc it's the -O2 and -O3 etc. flags, I don't know about VC as I can't stand using that environment but I'm sure there are similar options.
Make sure you look at the disassembly and verify the compiler is doing what you expect.
I don't use switch/case statements, but blocks. Two jumping tables - one for the addressing mode, other for the opcode.
If you intend to use a switch then make sure to keep the cases in order and without gaps (this improves performance on VC6 at least). Hopefully the compiler will be intelligent to skip the range check (default case) if you cover all possible byte patterns..
And study the generated assembly code if you can, at least I wouldn't blindly trust the optimizer on vital decisions like this.