Your question does not make sense. The DIV instruction does nothing by itself. No matter how loud you shout at him, even if you try to bribe him, he is not responsible for anything
When you program in the programming language [X], the compiler [X] is responsible for creating a program that executes what you described in the source code.
If division is requested, the compiler decides how to do the division. This can happen by creating an opcode for a DIV instruction if your CPU has targeting. This can be by pre-subtracting the division at compile time and simply pasting the result directly into the program (assuming both operands are known at compile time), or it can be done by creating a sequence of instructions that together emulate the division.
But it is always up to the compiler. Your C ++ program has no effect if it is not interpreted in accordance with the C ++ standard. If you interpret it as a regular text file, it does nothing. If your compiler interprets it as a Java program, it will choke and reject it.
And the DIV instruction knows nothing about the C ++ standard. On the other hand, the C ++ compiler is written for the sole purpose of understanding the C ++ standard and transforming the code according to it.
The responsible compiler is always .
jalf
source share