Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
mpich-CVS
Commits
806c4c19
Commit
806c4c19
authored
Sep 25, 2007
by
buntinas
Browse files
fixed rdtscp assembly
parent
4263e656
Changes
5
Hide whitespace changes
Inline
Side-by-side
configure.in
View file @
806c4c19
...
...
@@ -4740,7 +4740,7 @@ pac_cv_posix_clock_realtime=no)
pac_cv_linux86_cycle,[
AC_TRY_COMPILE(,[
long long var, *var_ptr=&var;
__asm__ __volatile__("rdtscp" : "=
A
" (*var_ptr));
__asm__ __volatile__("rdtscp
; shl $32, %%rdx; or %%rdx, %%rax
" : "=
a
" (*var_ptr)
: : "ecx", "rdx"
);
],pac_cv_linux86_cycle=rdtscp,
AC_TRY_COMPILE(,[
long long var, *var_ptr=&var;
...
...
src/mpid/ch3/channels/sshm/configure.in
View file @
806c4c19
...
...
@@ -135,7 +135,7 @@ dnl gcc checking
pac_cv_linux86_cycle,[
AC_TRY_COMPILE(,[
long long var, *var_ptr=&var;
__asm__ __volatile__("rdtscp" : "=
A
" (*var_ptr));
__asm__ __volatile__("rdtscp
; shl $32, %%rdx; or %%rdx, %%rax
" : "=
a
" (*var_ptr)
: : "ecx", "rdx"
);
],pac_cv_linux86_cycle=rdtscp,
AC_TRY_COMPILE(,[
long long var, *var_ptr=&var;
...
...
src/mpid/ch3/channels/sshm/src/ch3i_progress.h
View file @
806c4c19
...
...
@@ -18,7 +18,8 @@
the rdtscp instruction which is synchronizing, we use this when we
can. */
#ifdef GCC_X86_CYCLE_RDTSCP
#define MPID_CPU_TICK(var_ptr) __asm__ __volatile__("rdtscp" : "=A" (*var_ptr))
#define MPID_CPU_TICK(var_ptr) \
__asm__ __volatile__("rdtscp; shl $32, %%rdx; or %%rdx, %%rax" : "=a" (*var_ptr) : : "ecx", "rdx")
#elif defined(GCC_X86_CYCLE_CPUID_RDTSC)
/* Here we have to save the ebx register for when the compiler is
generating position independent code (e.g., when it's generating
...
...
src/mpid/ch3/channels/ssm/configure.in
View file @
806c4c19
...
...
@@ -176,7 +176,7 @@ dnl gcc checking
pac_cv_linux86_cycle,[
AC_TRY_COMPILE(,[
long long var, *var_ptr=&var;
__asm__ __volatile__("rdtscp" : "=
A
" (*var_ptr));
__asm__ __volatile__("rdtscp
; shl $32, %%rdx; or %%rdx, %%rax
" : "=
a
" (*var_ptr)
: : "ecx", "rdx"
);
],pac_cv_linux86_cycle=rdtscp,
AC_TRY_COMPILE(,[
long long var, *var_ptr=&var;
...
...
src/mpid/ch3/channels/ssm/include/ch3i_progress.h
View file @
806c4c19
...
...
@@ -30,7 +30,8 @@
the rdtscp instruction which is synchronizing, we use this when we
can. */
#ifdef GCC_X86_CYCLE_RDTSCP
#define MPID_CPU_TICK(var_ptr) __asm__ __volatile__("rdtscp" : "=A" (*var_ptr))
#define MPID_CPU_TICK(var_ptr) \
__asm__ __volatile__("rdtscp; shl $32, %%rdx; or %%rdx, %%rax" : "=a" (*var_ptr) : : "ecx", "rdx")
#elif defined(GCC_X86_CYCLE_CPUID_RDTSC)
/* Here we have to save the ebx register for when the compiler is
generating position independent code (e.g., when it's generating
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment