Issue was found during compilation of V8 code inside android project with clang-3.9.
The folowing messages was shown:
/tmp/preprocessor-v8-msa-repro-f130c4.s: Assembler messages: /tmp/preprocessor-v8-msa-repro-f130c4.s:33112: Error: operand 2 out of range `st.d $w0,23($16)' clang-3.9: error: assembler command failed with exit code 1 (use -v to see invocation)
This issue is also manifesting on the latest upstream clang. More information here.
This patch implements checks for unaligned and out of range offsets for ST.* and LD.* Mips MSA instructions.
One last naming nit: We ought to switch out the mention of MSA for a mention of the immediate size and shift amount (e.g. selectAddrSimm10Lsl2) since these can be re-used for non-MSA purposes too. Removing the reference to 'MSA' should prevent people thinking it has MSA-specific special cases in the future.