+void inst_end(Thread* thread, Argument argument) {
+}
+
+{% with name='eq', operation='==' %}
+ {% include "comparison_instruction.c" %}
+{% endwith %}
+
+{% with name='gt', operation='>' %}
+ {% include "comparison_instruction.c" %}
+{% endwith %}
+
+{% with name='gte', operation='>=' %}
+ {% include "comparison_instruction.c" %}
+{% endwith %}
+
+{% with name='idiv', operation='/' %}
+ {% include "arithmetic_instruction.c" %}
+{% endwith %}
+
+void inst_jump(Thread* thread, Argument argument) {
+ Thread_setProgramCounter(thread, argument.label - 1); // We will increment before running
+}
+
+void inst_jump_if_false(Thread* thread, Argument argument) {
+ assert(!Stack_isEmpty(&(thread->stack)));
+ Object result = Stack_pop(&(thread->stack));
+ assert(result.type == BOOLEAN);
+
+ if(!(result.value.boolean)) {
+ inst_jump(thread, argument);
+ }
+}
+
+{% with name='lt', operation='<' %}
+ {% include "comparison_instruction.c" %}
+{% endwith %}
+
+{% with name='lte', operation='<=' %}
+ {% include "comparison_instruction.c" %}
+{% endwith %}
+
+{% with name='mod', operation='%' %}
+ {% include "arithmetic_instruction.c" %}
+{% endwith %}
+
+{% with name='mul', operation='*' %}
+ {% include "arithmetic_instruction.c" %}
+{% endwith %}
+
+{% with name='neq', operation='!=' %}
+ {% include "comparison_instruction.c" %}
+{% endwith %}
+
+void inst_neg(Thread* thread, Argument argument) {
+ assert(!Stack_isEmpty(&(thread->stack)));
+ Object result = Stack_pop(&(thread->stack));
+ assert(result.type == INTEGER);
+
+ result.value.integer = -(result.value.integer);
+
+ Stack_push(&(thread->stack), result);