How to know if an instruction requires microcode
Moderator: agner
How to know if an instruction requires microcode
Hi Agner -- What determines if an instruction will require microcode? You had mentioned in the past that you didn't want to use microcode or wanted to minimize the amount of microcode. How is this done? How do you know in advance whether instructions will need microcode?
Re: How to know if an instruction requires microcode
Microprocessors generally use microcode for complex instructions that are doing complex things, or a sequence of multiple things. Typical examples are:
- Instructions that save or restore all registers on task switches
- Mathematical functions such as sin and cos
- Gather and scatter
Re: How to know if an instruction requires microcode
Thanks Agner. If it's inefficient on current architectures why do they do it? Do you expect ForwardCom to be faster than x86-64, or would you be using less energy or something?
This looks like RISC. You had said at some point that you were drawing from both RISC and CISC approaches? Where is the CISC influence?
This looks like RISC. You had said at some point that you were drawing from both RISC and CISC approaches? Where is the CISC influence?
Re: How to know if an instruction requires microcode
The x86 instruction set has developed through many years. What was optimal in the 1980s is not optimal today, but today's processors have to be backward compatible with everything that has been added through the years. For example, it is faster to calculate a sine using a function library, but you still have to support the old FSIN instruction that calculates the sine function using microcode, because a lot of legacy software uses the old instructions.
ForwardCom has a balance between RISC and CISC that I think is near optimal. The RISC principle gives a consistent instruction format that can be decoded fast. Decoding of instructions is a serioius bottleneck in x86. The CISC part is that you can calculate the address of a memory operand, load this operand, and do an arithmeting calculation with this operand in just one instruction where a true RISC design requires three or more instructions to do the same. I think this can make ForwardCom faster.
ForwardCom has a balance between RISC and CISC that I think is near optimal. The RISC principle gives a consistent instruction format that can be decoded fast. Decoding of instructions is a serioius bottleneck in x86. The CISC part is that you can calculate the address of a memory operand, load this operand, and do an arithmeting calculation with this operand in just one instruction where a true RISC design requires three or more instructions to do the same. I think this can make ForwardCom faster.