* IA32 high-res timer support for compilers without GCC-style inline
assembly This commit was SVN r6992.
Этот коммит содержится в:
родитель
53a0b37946
Коммит
adf92d6237
@ -107,3 +107,14 @@ START_FUNC(opal_atomic_sub_32)
|
||||
leave
|
||||
ret
|
||||
END_FUNC(opal_atomic_sub_32)
|
||||
|
||||
|
||||
START_FUNC(opal_sys_timer_get_cycles)
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
#APP
|
||||
rdtsc
|
||||
#NO_APP
|
||||
popl %ebp
|
||||
ret
|
||||
END_FUNC(opal_sys_timer_get_cycles)
|
||||
|
@ -37,7 +37,9 @@ opal_sys_timer_get_cycles(void)
|
||||
|
||||
#else
|
||||
|
||||
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 0
|
||||
opal_timer_t opal_sys_timer_get_cycles(void);
|
||||
|
||||
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
|
||||
|
||||
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
|
||||
|
||||
|
@ -15,11 +15,11 @@
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
CFILE=/tmp/opal_atomic_$$.c
|
||||
CFILE=/tmp/opal_asm_$$.c
|
||||
|
||||
trap "/bin/rm -f $CFILE; exit 0" 0 1 2 15
|
||||
|
||||
echo Updating atomic.s from atomic.h using gcc
|
||||
echo Updating asm.s from atomic.h and timer.h using gcc
|
||||
|
||||
cat > $CFILE<<EOF
|
||||
#include <stdlib.h>
|
||||
@ -29,6 +29,7 @@ cat > $CFILE<<EOF
|
||||
#define OMPI_GCC_INLINE_ASSEMBLY 1
|
||||
#define OMPI_WANT_SMP_LOCKS 1
|
||||
#include "atomic.h"
|
||||
#include "timer.h"
|
||||
EOF
|
||||
|
||||
gcc -O1 -I. -S $CFILE -o atomic.s
|
||||
gcc -O3 -I. -S $CFILE -o asm.s
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user