projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Filter: cast double directly to s64
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
filter-visitor-generate-bytecode.c
diff --git
a/src/lib/lttng-ctl/filter-visitor-generate-bytecode.c
b/src/lib/lttng-ctl/filter-visitor-generate-bytecode.c
index 7ee35fded2ac91a7642aff6450d092f6504fed70..a9e741cd21ae2983dbb1ba28d949bbb6e01643e6 100644
(file)
--- a/
src/lib/lttng-ctl/filter-visitor-generate-bytecode.c
+++ b/
src/lib/lttng-ctl/filter-visitor-generate-bytecode.c
@@
-397,7
+397,11
@@
int visit_node_logical(struct filter_parser_ctx *ctx, struct ir_op *node)
|| node->u.binary.left->data_type == IR_DATA_FLOAT) {
struct cast_op cast_insn;
|| node->u.binary.left->data_type == IR_DATA_FLOAT) {
struct cast_op cast_insn;
- cast_insn.op = FILTER_OP_CAST_TO_S64;
+ if (node->u.binary.left->data_type == IR_DATA_FIELD_REF) {
+ cast_insn.op = FILTER_OP_CAST_TO_S64;
+ } else {
+ cast_insn.op = FILTER_OP_CAST_DOUBLE_TO_S64;
+ }
cast_insn.reg = REG_R0;
ret = bytecode_push(&ctx->bytecode, &cast_insn,
1, sizeof(cast_insn));
cast_insn.reg = REG_R0;
ret = bytecode_push(&ctx->bytecode, &cast_insn,
1, sizeof(cast_insn));
@@
-431,7
+435,11
@@
int visit_node_logical(struct filter_parser_ctx *ctx, struct ir_op *node)
|| node->u.binary.right->data_type == IR_DATA_FLOAT) {
struct cast_op cast_insn;
|| node->u.binary.right->data_type == IR_DATA_FLOAT) {
struct cast_op cast_insn;
- cast_insn.op = FILTER_OP_CAST_TO_S64;
+ if (node->u.binary.right->data_type == IR_DATA_FIELD_REF) {
+ cast_insn.op = FILTER_OP_CAST_TO_S64;
+ } else {
+ cast_insn.op = FILTER_OP_CAST_DOUBLE_TO_S64;
+ }
cast_insn.reg = REG_R0;
ret = bytecode_push(&ctx->bytecode, &cast_insn,
1, sizeof(cast_insn));
cast_insn.reg = REG_R0;
ret = bytecode_push(&ctx->bytecode, &cast_insn,
1, sizeof(cast_insn));
This page took
0.022971 seconds
and
4
git commands to generate.