Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: gdb/testsuite/gdb.reverse/i386-sse-reverse.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* This testcase is part of GDB, the GNU debugger. 1 /* This testcase is part of GDB, the GNU debugger.
2 2
3 Copyright 2009-2012 Free Software Foundation, Inc. 3 Copyright 2009-2012 Free Software Foundation, Inc.
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 asm ("divpd %xmm1, %xmm2"); 52 asm ("divpd %xmm1, %xmm2");
53 asm ("divps %xmm2, %xmm1"); 53 asm ("divps %xmm2, %xmm1");
54 asm ("divsd %xmm1, %xmm0"); 54 asm ("divsd %xmm1, %xmm0");
55 asm ("divss %xmm0, %xmm2"); 55 asm ("divss %xmm0, %xmm2");
56 asm ("mulpd %xmm0, %xmm1"); 56 asm ("mulpd %xmm0, %xmm1");
57 asm ("mulps %xmm1, %xmm2"); 57 asm ("mulps %xmm1, %xmm2");
58 asm ("mulsd %xmm2, %xmm1"); 58 asm ("mulsd %xmm2, %xmm1");
59 asm ("mulss %xmm1, %xmm0"); 59 asm ("mulss %xmm1, %xmm0");
60 asm ("orpd %xmm2, %xmm0"); 60 asm ("orpd %xmm2, %xmm0");
61 asm ("orps %xmm0, %xmm1"); 61 asm ("orps %xmm0, %xmm1");
62 asm ("pabsb %xmm1, %xmm2");
63 asm ("pabsw %xmm2, %xmm1");
64 asm ("pabsd %xmm1, %xmm0");
65 asm ("packsswb %xmm0, %xmm2"); 62 asm ("packsswb %xmm0, %xmm2");
66 asm ("packssdw %xmm0, %xmm1"); 63 asm ("packssdw %xmm0, %xmm1");
67 asm ("ucomisd %xmm1, %xmm2"); 64 asm ("ucomisd %xmm1, %xmm2");
68 asm ("ucomiss %xmm2, %xmm1"); 65 asm ("ucomiss %xmm2, %xmm1");
69 asm ("unpckhpd %xmm1, %xmm0"); 66 asm ("unpckhpd %xmm1, %xmm0");
70 asm ("unpckhps %xmm2, %xmm0"); 67 asm ("unpckhps %xmm2, %xmm0");
71 asm ("xorpd %xmm0, %xmm1"); 68 asm ("xorpd %xmm0, %xmm1");
72 asm ("xorps %xmm1, %xmm2"); 69 asm ("xorps %xmm1, %xmm2");
73 } /* end sse_test */ 70 } /* end sse_test */
74 71
75 void 72 void
73 ssse3_test (void)
74 {
75 char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,
76 9, 10, 11, 12, 13, 14, 15};
77 char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23,
78 24, 25, 26, 27, 28, 29, 30, 31};
79 char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39,
80 40, 41, 42, 43, 44, 45, 46, 47};
81
82 asm ("movupd %0, %%xmm0":"=m"(buf0));
83 asm ("movupd %0, %%xmm1":"=m"(buf1));
84 asm ("movupd %0, %%xmm2":"=m"(buf2));
85
86 asm ("pabsb %xmm1, %xmm2");
87 asm ("pabsw %xmm2, %xmm1");
88 asm ("pabsd %xmm1, %xmm0");
89 } /* end ssse3_test */
90
91 void
76 sse4_test (void) 92 sse4_test (void)
77 { 93 {
78 char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 94 char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,
79 9, 10, 11, 12, 13, 14, 15}; 95 9, 10, 11, 12, 13, 14, 15};
80 char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23, 96 char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23,
81 24, 25, 26, 27, 28, 29, 30, 31}; 97 24, 25, 26, 27, 28, 29, 30, 31};
82 char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39, 98 char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39,
83 40, 41, 42, 43, 44, 45, 46, 47}; 99 40, 41, 42, 43, 44, 45, 46, 47};
84 100
85 asm ("movupd %0, %%xmm0":"=m"(buf0)); 101 asm ("movupd %0, %%xmm0":"=m"(buf0));
86 asm ("movupd %0, %%xmm1":"=m"(buf1)); 102 asm ("movupd %0, %%xmm1":"=m"(buf1));
87 asm ("movupd %0, %%xmm2":"=m"(buf2)); 103 asm ("movupd %0, %%xmm2":"=m"(buf2));
88 104
89 asm ("blendpd $1, %xmm1, %xmm0"); 105 asm ("blendpd $1, %xmm1, %xmm0");
90 asm ("blendps $2, %xmm2, %xmm0"); 106 asm ("blendps $2, %xmm2, %xmm0");
91 asm ("blendvpd %xmm0, %xmm1, %xmm2"); 107 asm ("blendvpd %xmm0, %xmm1, %xmm2");
92 asm ("blendvps %xmm0, %xmm2, %xmm1"); 108 asm ("blendvps %xmm0, %xmm2, %xmm1");
93 } /* end sse4_test */ 109 } /* end sse4_test */
94 110
95 int 111 int
96 main () 112 main ()
97 { 113 {
98 sse_test (); 114 sse_test ();
115 ssse3_test ();
99 sse4_test (); 116 sse4_test ();
100 return 0; /* end of main */ 117 return 0; /* end of main */
101 } 118 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.reverse/i386-reverse.exp ('k') | gdb/testsuite/gdb.reverse/i386-sse-reverse.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698