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

Side by Side Diff: gcc/gcc/testsuite/gcc.dg/pr37544.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « gcc/gcc/testsuite/gcc.dg/pr36901.h ('k') | gcc/gcc/testsuite/gcc.dg/pr37561.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* { dg-do run } */ 1 /* { dg-do run } */
2 /* { dg-options "-O2" } */ 2 /* { dg-options "-O2" } */
3 /* { dg-options "-O2 -msse2 -mtune=core2 -mfpmath=387" { target { i?86-*-* x86_6 4-*-* } } } */ 3 /* { dg-options "-O2 -msse2 -mtune=core2 -mfpmath=387" { target { i?86-*-* x86_6 4-*-* } } } */
4 4 /* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */
5 #ifdef __i386__ 5 /* { dg-require-effective-target sse2_runtime { target { i?86-*-* x86_64-*-* } } } */
6 #include "cpuid.h"
7 #endif
8 6
9 extern void abort (void); 7 extern void abort (void);
10 8
11 int main(void) 9 int main(void)
12 { 10 {
13 double arr[1000]; 11 double arr[1000];
14 double a, b; 12 double a, b;
15 13
16 int i; 14 int i;
17 15
18 #ifdef __i386__
19 unsigned int eax, ebx, ecx, edx;
20
21 if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
22 return 0;
23
24 /* Run SSE2 test only if host has SSE2 support. */
25 if (!(edx & bit_SSE2))
26 return 0;
27 #endif
28
29 for (i = 0; i < 1000; i++) 16 for (i = 0; i < 1000; i++)
30 arr[i] = 4294967296.0 + (double)i; 17 arr[i] = 4294967296.0 + (double)i;
31 18
32 a = arr[0]; 19 a = arr[0];
33 b = (unsigned int)((unsigned long long int)a % 4294967296ULL); 20 b = (unsigned int)((unsigned long long int)a % 4294967296ULL);
34 21
35 if (b >= 4294967296.0) 22 if (b >= 4294967296.0)
36 abort (); 23 abort ();
37 24
38 return 0; 25 return 0;
39 } 26 }
OLDNEW
« no previous file with comments | « gcc/gcc/testsuite/gcc.dg/pr36901.h ('k') | gcc/gcc/testsuite/gcc.dg/pr37561.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698