mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
Add an excessively minimal testcase, from #279698, pertaining to the
propagation of V bits through saturated narrowing operations. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12194
This commit is contained in:
parent
7901e715e5
commit
b9b6742e1f
@ -12,6 +12,7 @@ EXTRA_DIST = \
|
||||
bt_everything.stderr.exp bt_everything.stdout.exp \
|
||||
bt_everything.vgtest \
|
||||
bug132146.vgtest bug132146.stderr.exp bug132146.stdout.exp \
|
||||
bug279698.vgtest bug279698.stderr.exp bug279698.stdout.exp \
|
||||
fxsave-amd64.vgtest fxsave-amd64.stdout.exp fxsave-amd64.stderr.exp \
|
||||
more_x87_fp.stderr.exp more_x87_fp.stdout.exp more_x87_fp.vgtest \
|
||||
sse_memory.stderr.exp sse_memory.stdout.exp sse_memory.vgtest \
|
||||
@ -21,6 +22,7 @@ EXTRA_DIST = \
|
||||
check_PROGRAMS = \
|
||||
bt_everything \
|
||||
bug132146 \
|
||||
bug279698 \
|
||||
fxsave-amd64 \
|
||||
more_x87_fp \
|
||||
sse_memory \
|
||||
|
||||
27
memcheck/tests/amd64/bug279698.c
Normal file
27
memcheck/tests/amd64/bug279698.c
Normal file
@ -0,0 +1,27 @@
|
||||
/* A very trivial test for undefinedness propagation through
|
||||
saturating narrowing. Obviously need a much more thorough test.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include "../../memcheck.h"
|
||||
int main()
|
||||
{
|
||||
unsigned char data[32], vbits[32];
|
||||
__asm__ __volatile__
|
||||
("movdqu (%0), %%xmm0 \n"
|
||||
"packuswb %%xmm0, %%xmm0 \n"
|
||||
"movdqu %%xmm0, 16(%0) \n"
|
||||
::"r"(data)
|
||||
:"memory","xmm0"
|
||||
);
|
||||
unsigned int res =
|
||||
VALGRIND_GET_VBITS( data, vbits, 32 );
|
||||
assert(res == 1); /* 1 == success */
|
||||
int i, j;
|
||||
for(i=0; i<2; i++) {
|
||||
for(j=0; j<16; j++)
|
||||
printf("%02x ", vbits[i*16+j]);
|
||||
printf("\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
0
memcheck/tests/amd64/bug279698.stderr.exp
Normal file
0
memcheck/tests/amd64/bug279698.stderr.exp
Normal file
2
memcheck/tests/amd64/bug279698.stdout.exp
Normal file
2
memcheck/tests/amd64/bug279698.stdout.exp
Normal file
@ -0,0 +1,2 @@
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
2
memcheck/tests/amd64/bug279698.vgtest
Normal file
2
memcheck/tests/amd64/bug279698.vgtest
Normal file
@ -0,0 +1,2 @@
|
||||
prog: bug279698
|
||||
vgopts: -q
|
||||
Loading…
x
Reference in New Issue
Block a user