FILTER_OP_UNARY_BIT_NOT = 98,
+ FILTER_OP_RETURN_S64 = 99,
+
NR_FILTER_OPS,
};
[ FILTER_OP_LOAD_FIELD_DOUBLE ] = &&LABEL_FILTER_OP_LOAD_FIELD_DOUBLE,
[ FILTER_OP_UNARY_BIT_NOT ] = &&LABEL_FILTER_OP_UNARY_BIT_NOT,
+
+ [ FILTER_OP_RETURN_S64 ] = &&LABEL_FILTER_OP_RETURN_S64,
};
#endif /* #ifndef INTERPRETER_USE_SWITCH */
ret = 0;
goto end;
+ OP(FILTER_OP_RETURN_S64):
+ /* LTTNG_FILTER_DISCARD or LTTNG_FILTER_RECORD_FLAG */
+ retval = !!estack_ax_v;
+ ret = 0;
+ goto end;
+
/* binary */
OP(FILTER_OP_MUL):
OP(FILTER_OP_DIV):
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;
}
case FILTER_OP_RETURN:
+ case FILTER_OP_RETURN_S64:
{
if (unlikely(pc + sizeof(struct return_op)
> start_pc + bytecode->len)) {
}
case FILTER_OP_RETURN:
+ case FILTER_OP_RETURN_S64:
{
goto end;
}
ret = 0;
goto end;
}
+ case FILTER_OP_RETURN_S64:
+ {
+ if (!vstack_ax(stack)) {
+ ERR("Empty stack\n");
+ ret = -EINVAL;
+ goto end;
+ }
+ switch (vstack_ax(stack)->type) {
+ case REG_S64:
+ break;
+ default:
+ case REG_UNKNOWN:
+ ERR("Unexpected register type %d at end of bytecode\n",
+ (int) vstack_ax(stack)->type);
+ ret = -EINVAL;
+ goto end;
+ }
+
+ ret = 0;
+ goto end;
+ }
/* binary */
case FILTER_OP_MUL:
[ FILTER_OP_LOAD_FIELD_DOUBLE ] = "LOAD_FIELD_DOUBLE",
[ FILTER_OP_UNARY_BIT_NOT ] = "UNARY_BIT_NOT",
+
+ [ FILTER_OP_RETURN_S64 ] = "RETURN_S64",
};
const char *print_op(enum filter_op op)