ZAM support for bit-shifting

This commit is contained in:
Vern Paxson 2022-07-30 18:33:57 -07:00
parent 99e265bf87
commit f535a7c3a7

View file

@ -543,6 +543,19 @@ op-type U
vector
eval $1 ^ $2
binary-expr-op Lshift
op-type I U
vector
eval-type I if ( $1 < 0 )
ZAM_run_time_error(z.loc, "left shifting a negative number is undefined");
$$ = $1 << $2;
eval $1 << $2
binary-expr-op Rshift
op-type I U
vector
eval $1 >> $2
########## Relationals ##########
rel-expr-op LT