X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Ffilter-bytecode.h;h=ce2dbc7394db17d37506bb7ed210adc1f06b172d;hb=649fb6b3dda80cf5e321e2e6f29cfc398701f78d;hp=1c51eb0935443cddb32f2655c29c8fddf7a97f20;hpb=226106c0ab0afe504a24c4d2f0112374a69f10c4;p=lttng-ust.git diff --git a/liblttng-ust/filter-bytecode.h b/liblttng-ust/filter-bytecode.h index 1c51eb09..ce2dbc73 100644 --- a/liblttng-ust/filter-bytecode.h +++ b/liblttng-ust/filter-bytecode.h @@ -28,12 +28,6 @@ * offsets are absolute from start of bytecode. */ -enum filter_register { - REG_R0 = 0, - REG_R1 = 1, - REG_ERROR, -}; - struct field_ref { /* Initially, symbol offset. After link, field offset. */ uint16_t offset; @@ -100,6 +94,21 @@ enum filter_op { FILTER_OP_GE_DOUBLE, FILTER_OP_LE_DOUBLE, + /* Mixed S64-double binary comparators */ + FILTER_OP_EQ_DOUBLE_S64, + FILTER_OP_NE_DOUBLE_S64, + FILTER_OP_GT_DOUBLE_S64, + FILTER_OP_LT_DOUBLE_S64, + FILTER_OP_GE_DOUBLE_S64, + FILTER_OP_LE_DOUBLE_S64, + + FILTER_OP_EQ_S64_DOUBLE, + FILTER_OP_NE_S64_DOUBLE, + FILTER_OP_GT_S64_DOUBLE, + FILTER_OP_LT_S64_DOUBLE, + FILTER_OP_GE_S64_DOUBLE, + FILTER_OP_LE_S64_DOUBLE, + /* unary */ FILTER_OP_UNARY_PLUS, FILTER_OP_UNARY_MINUS, @@ -115,17 +124,29 @@ enum filter_op { FILTER_OP_AND, FILTER_OP_OR, - /* load */ + /* load field ref */ FILTER_OP_LOAD_FIELD_REF, FILTER_OP_LOAD_FIELD_REF_STRING, FILTER_OP_LOAD_FIELD_REF_SEQUENCE, FILTER_OP_LOAD_FIELD_REF_S64, FILTER_OP_LOAD_FIELD_REF_DOUBLE, + /* load immediate from operand */ FILTER_OP_LOAD_STRING, FILTER_OP_LOAD_S64, FILTER_OP_LOAD_DOUBLE, + /* cast */ + FILTER_OP_CAST_TO_S64, + FILTER_OP_CAST_DOUBLE_TO_S64, + FILTER_OP_CAST_NOP, + + /* get context ref */ + FILTER_OP_GET_CONTEXT_REF, + FILTER_OP_GET_CONTEXT_REF_STRING, + FILTER_OP_GET_CONTEXT_REF_S64, + FILTER_OP_GET_CONTEXT_REF_DOUBLE, + NR_FILTER_OPS, }; @@ -133,7 +154,6 @@ typedef uint8_t filter_opcode_t; struct load_op { filter_opcode_t op; - uint8_t reg; /* enum filter_register */ char data[0]; /* data to load. Size known by enum filter_opcode and null-term char. */ } __attribute__((packed)); @@ -144,7 +164,6 @@ struct binary_op { struct unary_op { filter_opcode_t op; - uint8_t reg; /* enum filter_register */ } __attribute__((packed)); /* skip_offset is absolute from start of bytecode */ @@ -153,6 +172,10 @@ struct logical_op { uint16_t skip_offset; /* bytecode insn, if skip second test */ } __attribute__((packed)); +struct cast_op { + filter_opcode_t op; +} __attribute__((packed)); + struct return_op { filter_opcode_t op; } __attribute__((packed));