diff options
author | Maria Matejka <mq@ucw.cz> | 2022-03-25 19:15:11 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-04 15:37:41 +0200 |
commit | d4bcef0e0bfee911d403c0cf830de3e3007eeb38 (patch) | |
tree | 50bff8f853eab7efb6b6a6ad718449d5758b5be1 /filter/f-inst.c | |
parent | cd9550b24487ac7327b0234fd825f4214fdf7b16 (diff) |
Filter operations: bitwise AND and OR
Diffstat (limited to 'filter/f-inst.c')
-rw-r--r-- | filter/f-inst.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/filter/f-inst.c b/filter/f-inst.c index 8e20dc74..0050c237 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -240,6 +240,16 @@ if (v2.val.i == 0) runtime( "Mother told me not to divide by 0" ); RESULT(T_INT, i, v1.val.i / v2.val.i); } + INST(FI_BITOR, 2, 1) { + ARG(1,T_INT); + ARG(2,T_INT); + RESULT(T_INT, i, v1.val.i | v2.val.i); + } + INST(FI_BITAND, 2, 1) { + ARG(1,T_INT); + ARG(2,T_INT); + RESULT(T_INT, i, v1.val.i & v2.val.i); + } INST(FI_AND, 1, 1) { ARG(1,T_BOOL); ARG_TYPE_STATIC(2,T_BOOL); |