On Tue, 19 Sep 2017, James Hogan wrote: > Avoid modifying the input by using a temporary variable as an output > which is modified instead of the input and not otherwise used. The asm > is always __volatile__ so GCC shouldn't optimise it out. The low > register of the temporary output is written before the high register of > the input is read, so we have two constraint alternatives, one where > both use the same registers (for when the input value isn't subsequently > used), and one with an early clobber on the output in case the low > output uses the same register as the high input. This allows the > resulting assembly to remain mostly unchanged. Clever and well-spotted! Reviewed-by: Maciej W. Rozycki <macro@xxxxxxxxxx> NB you could use DINS on MIPS64r2+ (and `__read_64bit_c0_split' could use one instruction less; patch posted separately). Maciej