Use a 8 bit immediate when possible.

This fixes pr21529.