FreeBSD: add file descriptor tracking for _umtx_op
[valgrind.git] / none / tests / x86-solaris / coredump_single_thread_sse.c
blob2d8c8831841d360676caa880c4968c8a48f10df8
1 /* Tests that Valgrind coredump support for SSE registers works correctly
2 by producing a core dump analyzable by mdb.
3 Basic register set is tested in coredump_single_thread. */
5 #include <stdio.h>
6 #include <sys/types.h>
8 __attribute__((noinline))
9 static void inner(void)
11 /* Set XMM registers to apriori known values.
12 Unfortunately there is no instruction to load
13 an immediate value directly into xmm register. */
14 __asm__ __volatile__("\n"
15 "pushl $0x12345678\n"
16 "pushl $0x9abcdef0\n"
17 "pushl $0xfedbca98\n"
18 "pushl $0x76543210\n"
19 "movups (%%esp), %%xmm0\n"
20 "pushl $0x23456789\n"
21 "pushl $0x09876543\n"
22 "pushl $0x21fedcba\n"
23 "pushl $0x9467feca\n"
24 "movups (%%esp), %%xmm1\n"
25 "pushl $0xabcdabcd\n"
26 "pushl $0xcedecede\n"
27 "pushl $0xfabafaba\n"
28 "pushl $0x50656754\n"
29 "movups (%%esp), %%xmm2\n"
30 "pushl $0x03050608\n"
31 "pushl $0x1d1b4b15\n"
32 "pushl $0x25272120\n"
33 "pushl $0x373a3d35\n"
34 "movups (%%esp), %%xmm3\n"
35 "pushl $0x9abcdef0\n"
36 "pushl $0x76543210\n"
37 "pushl $0x12345678\n"
38 "pushl $0xfedbca98\n"
39 "movups (%%esp), %%xmm4\n"
40 "pushl $0x9467feca\n"
41 "pushl $0x23456789\n"
42 "pushl $0x21fedcba\n"
43 "pushl $0x09876543\n"
44 "movups (%%esp), %%xmm5\n"
45 "pushl $0x50656754\n"
46 "pushl $0xcedecede\n"
47 "pushl $0xabcdabcd\n"
48 "pushl $0xfabafaba\n"
49 "movups (%%esp), %%xmm6\n"
50 "pushl $0x373a3d35\n"
51 "pushl $0x1d1b4b15\n"
52 "pushl $0x03050608\n"
53 "pushl $0x25272120\n"
54 "movups (%%esp), %%xmm7\n"
55 "movl $0x1, %%eax\n"
56 "movl $0x1234, (%%eax)\n" // should cause SEGV here
57 : // no output registers
58 : // no input registers
59 : "memory", "%xmm0", "%xmm1", "%xmm2", "%xmm3",
60 "%xmm4", "%xmm5", "%xmm6", "%xmm7");
63 __attribute__((noinline))
64 static void outer(void)
66 inner();
69 int main(int argc, const char *argv[])
71 outer();
72 return 0;