Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
{
int64_t res;
+ /* Catch undefined behavior. */
+ if (unlikely(estack_ax_v < 0 || estack_ax_v >= 64)) {
+ ret = -EINVAL;
+ goto end;
+ }
res = (estack_bx_v >> estack_ax_v);
estack_pop(stack, top, ax, bx);
estack_ax_v = res;
{
int64_t res;
+ /* Catch undefined behavior. */
+ if (unlikely(estack_ax_v < 0 || estack_ax_v >= 64)) {
+ ret = -EINVAL;
+ goto end;
+ }
res = (estack_bx_v << estack_ax_v);
estack_pop(stack, top, ax, bx);
estack_ax_v = res;