[ Sorry for resurrecting an old thread! And please CC me in replies, I'm not subscribed. ] Am Dienstag, den 03.02.2009, 21:23 +0100 schrieb Oliver Falk: > Le me know the patch you (might) produce, so I can check on Fedora/Alpha > :-) If you like... Well, I finally succeeded in developing a patch, and you can find the result attached. It would be really great if you could test and/or review it, since I do not know if the assembly is correct; I tried to teach myself Alpha assembly and have no idea if I got it. ;) I'm very intersted in your feedback, especially if it works on Fedora. I was able to build Debian packages on Albeniz and am quite confident that the patch works. You can either reply to me or send a message to the corresponding bug. (510845@bugs.debian.org) Thanks in advance! Best regards Manuel
--- a/ompi/contrib/vt/vt/vtlib/vt_pform_linux.c
+++ b/ompi/contrib/vt/vt/vtlib/vt_pform_linux.c
@@ -170,6 +170,8 @@
# elif defined(__ia64__)
/* ... ITC */
clock_value = __getReg(_IA64_REG_AR_ITC);
+# elif defined(__alpha__)
+ asm volatile ("rpcc %0" : "=r" (clock_value));
# else
/* ... TSC */
{
--- a/opal/asm/base/ALPHA.asm
+++ b/opal/asm/base/ALPHA.asm
@@ -197,3 +197,28 @@
addl $31,$0,$0
ret $31,($26),1
.end opal_atomic_cmpset_rel_64
+ .align 2
+ .align 4
+ .globl opal_sys_timer_get_cycles
+ .ent opal_sys_timer_get_cycles
+$opal_sys_timer_get_cycles..ng:
+opal_sys_timer_get_cycles:
+ .eflag 48
+ .frame $30,0,$26,0
+ .prologue 0
+ .set macro
+ wmb
+ 1: ldq_l $0, 0($16)
+ cmpeq $0, $17, $0
+ beq $0, 2f
+ mov $18, $0
+ stq_c $0, 0($16)
+ beq $0, 1b
+ jmp 3f
+2: mov $31, $0
+3:
+
+ .set nomacro
+ rpcc $0
+ ret
+ .end opal_sys_timer_get_cycles
--- a/opal/asm/generated/atomic-alpha-linux.s
+++ b/opal/asm/generated/atomic-alpha-linux.s
@@ -197,5 +197,30 @@
addl $31,$0,$0
ret $31,($26),1
.end opal_atomic_cmpset_rel_64
+ .align 2
+ .align 4
+ .globl opal_sys_timer_get_cycles
+ .ent opal_sys_timer_get_cycles
+$opal_sys_timer_get_cycles..ng:
+opal_sys_timer_get_cycles:
+ .eflag 48
+ .frame $30,0,$26,0
+ .prologue 0
+ .set macro
+ wmb
+ 1: ldq_l $0, 0($16)
+ cmpeq $0, $17, $0
+ beq $0, 2f
+ mov $18, $0
+ stq_c $0, 0($16)
+ beq $0, 1b
+ jmp 3f
+2: mov $31, $0
+3:
+
+ .set nomacro
+ rpcc $0
+ ret
+ .end opal_sys_timer_get_cycles
.section .note.GNU-stack,"",@progbits
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil