X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Flttng-filter-interpreter.c;h=7c05c24f97786127fbdd8fffc94ae83fcbcd8c80;hb=1242217a08db0fb08a4f8f7bb3a94b82647b17e4;hp=4aefb04ed50a43ed10b895091c5001c7cb59e4b5;hpb=4ac5fbb7966e7a6ee4a0cb68c49713bc8c05206c;p=lttng-modules.git diff --git a/src/lttng-filter-interpreter.c b/src/lttng-filter-interpreter.c index 4aefb04e..7c05c24f 100644 --- a/src/lttng-filter-interpreter.c +++ b/src/lttng-filter-interpreter.c @@ -262,7 +262,8 @@ LABEL_##name #endif -#define IS_INTEGER_REGISTER(reg_type) (reg_type == REG_S64) +#define IS_INTEGER_REGISTER(reg_type) \ + (reg_type == REG_S64 || reg_type == REG_U64) static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx, struct load_ptr *ptr, @@ -504,7 +505,7 @@ static int dynamic_load_field(struct estack_entry *stack_top) case OBJECT_TYPE_U8: dbg_printk("op load field u8\n"); stack_top->u.v = *(uint8_t *) stack_top->u.ptr.ptr; - stack_top->type = REG_S64; + stack_top->type = REG_U64; break; case OBJECT_TYPE_U16: { @@ -515,7 +516,7 @@ static int dynamic_load_field(struct estack_entry *stack_top) if (stack_top->u.ptr.rev_bo) __swab16s(&tmp); stack_top->u.v = tmp; - stack_top->type = REG_S64; + stack_top->type = REG_U64; break; } case OBJECT_TYPE_U32: @@ -527,7 +528,7 @@ static int dynamic_load_field(struct estack_entry *stack_top) if (stack_top->u.ptr.rev_bo) __swab32s(&tmp); stack_top->u.v = tmp; - stack_top->type = REG_S64; + stack_top->type = REG_U64; break; } case OBJECT_TYPE_U64: @@ -539,7 +540,7 @@ static int dynamic_load_field(struct estack_entry *stack_top) if (stack_top->u.ptr.rev_bo) __swab64s(&tmp); stack_top->u.v = tmp; - stack_top->type = REG_S64; + stack_top->type = REG_U64; break; } case OBJECT_TYPE_STRING: @@ -779,6 +780,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, /* LTTNG_FILTER_DISCARD or LTTNG_FILTER_RECORD_FLAG */ switch (estack_ax_t) { case REG_S64: + case REG_U64: retval = !!estack_ax_v; break; case REG_DOUBLE: @@ -1016,7 +1018,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, res = ((uint64_t) estack_bx_v >> (uint32_t) estack_ax_v); estack_pop(stack, top, ax, bx, ax_t, bx_t); estack_ax_v = res; - estack_ax_t = REG_S64; + estack_ax_t = REG_U64; next_pc += sizeof(struct binary_op); PO; } @@ -1037,7 +1039,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, res = ((uint64_t) estack_bx_v << (uint32_t) estack_ax_v); estack_pop(stack, top, ax, bx, ax_t, bx_t); estack_ax_v = res; - estack_ax_t = REG_S64; + estack_ax_t = REG_U64; next_pc += sizeof(struct binary_op); PO; } @@ -1053,7 +1055,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, res = ((uint64_t) estack_bx_v & (uint64_t) estack_ax_v); estack_pop(stack, top, ax, bx, ax_t, bx_t); estack_ax_v = res; - estack_ax_t = REG_S64; + estack_ax_t = REG_U64; next_pc += sizeof(struct binary_op); PO; } @@ -1069,7 +1071,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, res = ((uint64_t) estack_bx_v | (uint64_t) estack_ax_v); estack_pop(stack, top, ax, bx, ax_t, bx_t); estack_ax_v = res; - estack_ax_t = REG_S64; + estack_ax_t = REG_U64; next_pc += sizeof(struct binary_op); PO; } @@ -1085,7 +1087,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, res = ((uint64_t) estack_bx_v ^ (uint64_t) estack_ax_v); estack_pop(stack, top, ax, bx, ax_t, bx_t); estack_ax_v = res; - estack_ax_t = REG_S64; + estack_ax_t = REG_U64; next_pc += sizeof(struct binary_op); PO; }