On Tue, Oct 26, 2021 at 09:58:15AM -0700, Richard Henderson wrote:
On 10/26/21 7:33 AM, Matheus K. Ferst wrote:
It says that "if UIM is greater than N, the result is undefined." My
first read was also that the outcome is "boundedly undefined," but I
guess it can be understood as "the resulting value in VRT will be
undefined" (like when the pseudo-code uses "VRT <- 0xUUUU_..._UUUU"), in
which case this patch and Mambo are correct.
If the reference simulator is fine with it, I am too.
FYI, it appears that the hardware does a partial insert, per an experiment:
```
1: x/i $pc
=> 0x100006d4 <foo+4>: vinsw v2,r3,14
(gdb) p $v2.v4_int32
$1 = {0x1, 0x1, 0x1, 0x1}
(gdb) p $r3
$2 = 0x12345678
(gdb) nexti
(gdb) p $v2.v4_int32
$3 = {0x1234, 0x1, 0x1, 0x1}
````