}
case FILTER_OP_RETURN:
+ case FILTER_OP_RETURN_S64:
{
if (unlikely(pc + sizeof(struct return_op)
> start_pc + bytecode->len)) {
if (unlikely(pc + sizeof(struct load_op) + sizeof(struct get_symbol)
> start_pc + bytecode->len)) {
ret = -ERANGE;
+ break;
}
ret = validate_get_symbol(bytecode, sym);
break;
}
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: