| OLD | NEW |
| 1 /* Test program for SSE registers. | 1 /* Test program for SSE registers. |
| 2 | 2 |
| 3 Copyright 2004, 2007-2012 Free Software Foundation, Inc. | 3 Copyright 2004-2013 Free Software Foundation, Inc. |
| 4 | 4 |
| 5 This file is part of GDB. | 5 This file is part of GDB. |
| 6 | 6 |
| 7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
| 8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
| 9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
| 10 (at your option) any later version. | 10 (at your option) any later version. |
| 11 | 11 |
| 12 This program is distributed in the hope that it will be useful, | 12 This program is distributed in the hope that it will be useful, |
| 13 but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 30 matching lines...) Expand all Loading... |
| 44 { { 13.0, 13.25, 13.50, 13.75 } }, | 44 { { 13.0, 13.25, 13.50, 13.75 } }, |
| 45 { { 14.0, 14.25, 14.50, 14.75 } }, | 45 { { 14.0, 14.25, 14.50, 14.75 } }, |
| 46 { { 15.0, 15.25, 15.50, 15.75 } }, | 46 { { 15.0, 15.25, 15.50, 15.75 } }, |
| 47 #endif | 47 #endif |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 | 50 |
| 51 int | 51 int |
| 52 have_sse (void) | 52 have_sse (void) |
| 53 { | 53 { |
| 54 int edx = i386_cpuid (); | 54 int edx; |
| 55 |
| 56 if (!i386_cpuid (1, NULL, NULL, NULL, &edx)) |
| 57 return 0; |
| 55 | 58 |
| 56 if (edx & bit_SSE) | 59 if (edx & bit_SSE) |
| 57 return 1; | 60 return 1; |
| 58 else | 61 else |
| 59 return 0; | 62 return 0; |
| 60 } | 63 } |
| 61 | 64 |
| 62 int | 65 int |
| 63 main (int argc, char **argv) | 66 main (int argc, char **argv) |
| 64 { | 67 { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 : /* no output operands */ | 119 : /* no output operands */ |
| 117 : "r" (data) | 120 : "r" (data) |
| 118 : "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15
"); | 121 : "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15
"); |
| 119 #endif | 122 #endif |
| 120 | 123 |
| 121 puts ("Bye!"); /* second breakpoint here */ | 124 puts ("Bye!"); /* second breakpoint here */ |
| 122 } | 125 } |
| 123 | 126 |
| 124 return 0; | 127 return 0; |
| 125 } | 128 } |
| OLD | NEW |