1. add multpily immediate; 2. reduce simulator function size to avoid
presubmit warning.