Class SVM_COMPARE


public class SVM_COMPARE extends SVM_Instruction

SVM-INSTRUCTION: COMPARE relation

relation ::= ?lt | ?le | ?eq | ?ge | ?gt | ?ne

Runtime Stack
   ..., sos, tos →
   ..., result

The 'tos' and 'sos' are popped off the Runtime stack.
The 'result' is calculated as result = sos relation tos.
Then the boolean 'result' is pushed onto the Runtime Stack.

'tos' and 'sos' must be of the same arithmetic type, i.e. int, float or double,
or boolean, in which case: relation ::= ?eq | ?ne

Link to GitHub: Source File.

Author:
S-Port: Definition of S-code, Øystein Myhre Andersen