-
- Downloads
testsuite: Expand coverage for `__builtin_memset' with 0
Expand coverage for `__builtin_memset' for the special case of clearing a block, primarily for "setmemM" block set pattern, though with smaller sizes open-coded sequences may be produced instead. This verifies block sizes in bytes from 1 to 64 across byte alignments of 1, 2, 4, 8 and byte misalignments within from 0 up to 7 (there's some redundancy there for the sake of simplicity of the test case), making sure all the intended area is cleared and no data is changed outside it. These choice of the ranges for the parameters has come from the Alpha backend, whose "setmemM" pattern has various corner cases related to base alignment and the misalignment within. The test case has turned invaluable in verifying changes to the Alpha backend, but functionality covered is generic, so I have concluded this test qualifies for generic verification and does not have to be limited to the Alpha-specific subset of the testsuite. Just as with `__builtin_memcpy' tests this code turned out to require quite a lot of time to compile, although a bit less than the former. Example compilation times with reasonably fast POWER9@2.166GHz at `-O2' optimization and GCC built at `-O2' for various targets: mips-linux-gnu: 19s vax-netbsdelf: 27s alphaev56-linux-gnu: 30s alpha-linux-gnu: 31s powerpc64le-linux-gnu: 47s With GCC built at `-O0': alphaev56-linux-gnu: 2m59s alpha-linux-gnu: 3m06s I have therefore set the timeout factor accordingly so as to take slower test hosts into account. gcc/testsuite/ * gcc.c-torture/execute/memclr.c: New file.
Loading
Please register or sign in to comment