[PATCH]: Allow left and right shift operators
Gianni Tedesco
gianni@scaramanga.co.uk
Tue Jan 1 00:00:00 GMT 2013
Woops :)
--
Gianni Tedesco
diff --git a/gcc/jit/internal-api.c b/gcc/jit/internal-api.c
index b21aaa6..1140699 100644
--- a/gcc/jit/internal-api.c
+++ b/gcc/jit/internal-api.c
@@ -510,6 +510,14 @@ new_binary_op (location *loc,
node_b = as_truth_value (node_b, loc);
inner_op = TRUTH_ORIF_EXPR;
break;
+
+ case GCC_JIT_BINARY_OP_LSHIFT:
+ inner_op = LSHIFT_EXPR;
+ break;
+
+ case GCC_JIT_BINARY_OP_RSHIFT:
+ inner_op = RSHIFT_EXPR;
+ break;
}
tree inner_expr = build2 (inner_op,
diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h
index 0712533..365e28d 100644
--- a/gcc/jit/libgccjit.h
+++ b/gcc/jit/libgccjit.h
@@ -525,7 +525,10 @@ enum gcc_jit_binary_op
/* Logical OR; analogous to:
(EXPR_A) || (EXPR_B)
in C. */
- GCC_JIT_BINARY_OP_LOGICAL_OR
+ GCC_JIT_BINARY_OP_LOGICAL_OR,
+
+ GCC_JIT_BINARY_OP_LSHIFT,
+ GCC_JIT_BINARY_OP_RSHIFT
};
extern gcc_jit_rvalue *
More information about the Jit
mailing list