Filter: add FILTER_OP_RETURN_S64 instruction
[lttng-ust.git] / liblttng-ust / lttng-filter-specialize.c
index 6de25047787d2b09954d1ce88815f53988463cea..1ade2883005bdc93f4f7b33abeb1bcad4c5a02ee 100644 (file)
@@ -621,6 +621,17 @@ int lttng_filter_specialize_bytecode(struct lttng_event *event,
                        goto end;
 
                case FILTER_OP_RETURN:
+                       if (vstack_ax(stack)->type == REG_S64)
+                               *(filter_opcode_t *) pc = FILTER_OP_RETURN_S64;
+                       ret = 0;
+                       goto end;
+
+               case FILTER_OP_RETURN_S64:
+                       if (vstack_ax(stack)->type != REG_S64) {
+                               ERR("Unexpected register type\n");
+                               ret = -EINVAL;
+                               goto end;
+                       }
                        ret = 0;
                        goto end;
 
This page took 0.022563 seconds and 4 git commands to generate.