comparison libgomp/testsuite/libgomp.c/sort-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents a06113de4d67
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Test and benchmark of a couple of parallel sorting algorithms. 1 /* Test and benchmark of a couple of parallel sorting algorithms.
2 Copyright (C) 2008 Free Software Foundation, Inc. 2 Copyright (C) 2008-2017 Free Software Foundation, Inc.
3 3
4 GCC is free software; you can redistribute it and/or modify it under 4 GCC is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free 5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 3, or (at your option) any later 6 Software Foundation; either version 3, or (at your option) any later
7 version. 7 version.
98 98
99 static inline void 99 static inline void
100 busy_wait (void) 100 busy_wait (void)
101 { 101 {
102 #if defined __i386__ || defined __x86_64__ 102 #if defined __i386__ || defined __x86_64__
103 __asm volatile ("rep; nop" : : : "memory"); 103 __builtin_ia32_pause ();
104 #elif defined __ia64__ 104 #elif defined __ia64__
105 __asm volatile ("hint @pause" : : : "memory"); 105 __asm volatile ("hint @pause" : : : "memory");
106 #elif defined __sparc__ && (defined __arch64__ || defined __sparc_v9__) 106 #elif defined __sparc__ && (defined __arch64__ || defined __sparc_v9__)
107 __asm volatile ("membar #LoadLoad" : : : "memory"); 107 __asm volatile ("membar #LoadLoad" : : : "memory");
108 #else 108 #else