Closed troibe closed 9 months ago
Wrong statement on my side we have these lines above the example assembly that initialize the vector registers as they should:
800188b8: 84c50513 add a0,a0,-1972 # 8001a100 <testdata>
800188bc: 000037b7 lui a5,0x3
800188c0: a407879b addw a5,a5,-1472 # 2a40 <_start-0x7fffd5c0>
800188c4: 00f50533 add a0,a0,a5
800188c8: fff00293 li t0,-1
800188cc: 0db2f357 vsetvli t1,t0,e64,m8,ta,ma
800188d0: 02057407 vle64.v v8,(a0)
I guess then the memory region that it is loading from is unitialized which is also odd.
The simulator I'm working on currently marks unitialized (vector) registers with
baadf00d
. With this the test cases for vsext.vf4/8 and vzext.vf4/8 don't pass as they rely on unitialized vector registers:In the generated example assembly above
vsext.vf4
is executed withlmul=2
(max updated registers v8, v9). When checking the results withvse64.v
we then uselmul=8
which accesses vectors v8-v15. However only v8-v11 have been set by prior writes, v12-v15 are still set tobaadf00d
. (Spike seems to have zero initialized v12-v15) If I force all vector registers to be zero initialized for the tests, then the tests pass.Should the tests have a section that initializes all vector registers to zero? Or would it be better to not have tests that access vector registers that have not been written to yet? Or is zero initialization required by the spec anyways and I just missed it?