Simplify vector access code generation.

  The parser already checks for immediate offsets that would overflow
and the vector memory allocation code does not allow allocating non
addressable memory, so, offset can be just adjusted with a shift, and
unsigned comparison to trigger negative offset.

  Also correct the global flags (tmp_mask and reg_mask) logic to work
with more than 2 registers.