toDex: Limit the number of registers for immediate constants