Here is a “snippet,” a few lines, taken from a C language program.
int a, b, c;
float d, e, f;
c = a + b;
d = e + f;
How many distinct opcodes will appear in the machine code compiled from this C snippet and why?
for different architecture the values are different.
2 for mov. From memory to cpu reg.
1 to add the cpu reg nd save result to Accumulator.
1 for store from cpu reg 'Accumulator' to memory .
4 for integer addition.
So there are 4 distinct opcodes will appear in the machine code compiled from this C snippet.
basically it also depends on architecture of machine for which you are compiling the program because if there Floating point register support it will be more.
Get Answers For Free
Most questions answered within 1 hours.