Use u32 in Type API (#4280)

Move from passing and returning u8 and u16 values to u32 in many of
the functions. This removes a number of type conversions and gives
a small compilation time speedup, around ~0.7% on my aarch64 machine.

Copyright (c) 2022, Arm Limited.
This commit is contained in:
Sam Parker
2022-06-30 20:43:36 +01:00
committed by GitHub
parent 95836ba114
commit a2d49ebf27
13 changed files with 27 additions and 28 deletions

View File

@@ -219,7 +219,8 @@ fn extend_input_to_reg<C: LowerCtx<I = Inst>>(
let ext_mode = match (input_size, requested_size) {
(a, b) if a == b => return put_input_in_reg(ctx, spec),
(1, 8) => return put_input_in_reg(ctx, spec),
(a, b) => ExtMode::new(a, b).unwrap_or_else(|| panic!("invalid extension: {} -> {}", a, b)),
(a, b) => ExtMode::new(a.try_into().unwrap(), b.try_into().unwrap())
.unwrap_or_else(|| panic!("invalid extension: {} -> {}", a, b)),
};
let src = input_to_reg_mem(ctx, spec);