Update atomics patch for ARM (thanks to Jon Masters)

This commit is contained in:
Peter Robinson 2012-11-18 16:36:37 +00:00
parent ef98c8d527
commit b44370fe2d
2 changed files with 54 additions and 61 deletions

View File

@ -1,4 +1,3 @@
Binary files openmpi-1.6.3_orig/opal/asm/.asm-data.txt.swp and openmpi-1.6.3/opal/asm/.asm-data.txt.swp differ
diff -urNp openmpi-1.6.3_orig/opal/asm/base/ARM.asm openmpi-1.6.3/opal/asm/base/ARM.asm diff -urNp openmpi-1.6.3_orig/opal/asm/base/ARM.asm openmpi-1.6.3/opal/asm/base/ARM.asm
--- openmpi-1.6.3_orig/opal/asm/base/ARM.asm 2012-04-03 10:29:44.000000000 -0400 --- openmpi-1.6.3_orig/opal/asm/base/ARM.asm 2012-04-03 10:29:44.000000000 -0400
+++ openmpi-1.6.3/opal/asm/base/ARM.asm 1969-12-31 19:00:00.000000000 -0500 +++ openmpi-1.6.3/opal/asm/base/ARM.asm 1969-12-31 19:00:00.000000000 -0500
@ -158,8 +157,8 @@ diff -urNp openmpi-1.6.3_orig/opal/asm/base/ARM.asm openmpi-1.6.3/opal/asm/base/
-END_FUNC(opal_atomic_sub_32) -END_FUNC(opal_atomic_sub_32)
diff -urNp openmpi-1.6.3_orig/opal/asm/base/ARMV5.asm openmpi-1.6.3/opal/asm/base/ARMV5.asm diff -urNp openmpi-1.6.3_orig/opal/asm/base/ARMV5.asm openmpi-1.6.3/opal/asm/base/ARMV5.asm
--- openmpi-1.6.3_orig/opal/asm/base/ARMV5.asm 1969-12-31 19:00:00.000000000 -0500 --- openmpi-1.6.3_orig/opal/asm/base/ARMV5.asm 1969-12-31 19:00:00.000000000 -0500
+++ openmpi-1.6.3/opal/asm/base/ARMV5.asm 2012-11-11 00:04:19.340576499 -0500 +++ openmpi-1.6.3/opal/asm/base/ARMV5.asm 2012-11-13 14:43:17.018685692 -0500
@@ -0,0 +1,120 @@ @@ -0,0 +1,109 @@
+START_FILE +START_FILE
+ TEXT + TEXT
+ +
@ -183,102 +182,91 @@ diff -urNp openmpi-1.6.3_orig/opal/asm/base/ARMV5.asm openmpi-1.6.3/opal/asm/bas
+ +
+ +
+START_FUNC(opal_atomic_cmpset_32) +START_FUNC(opal_atomic_cmpset_32)
+ push {r4, lr}
+ mov r3, r0 + mov r3, r0
+ mov r0, r1 + mov r0, r1
+ mov r1, r2 + mov r1, r2
+ mov r2, r3 + mov r2, r3
+ mov r12, lr
+ ldr r3, REFLSYM(1) + ldr r3, REFLSYM(1)
+ blx r3 + blx r3
+ cmp r0, #0 + movcc r0, #0
+ movne r0, #0 + movcs r0, #1
+ moveq r0, #1 + pop {r4, lr}
+ mov lr, r12
+ bx lr + bx lr
+ LSYM(1)
+ .align 2 + .align 2
+ .word -61504 + LSYM(1)
+ .word 0xffff0fc0
+END_FUNC(opal_atomic_cmpset_32) +END_FUNC(opal_atomic_cmpset_32)
+ +
+ +
+START_FUNC(opal_atomic_cmpset_acq_32) +START_FUNC(opal_atomic_cmpset_acq_32)
+ push {r4, lr}
+ mov r3, r0 + mov r3, r0
+ mov r0, r1 + mov r0, r1
+ mov r1, r2 + mov r1, r2
+ mov r2, r3 + mov r2, r3
+ mov r12, lr
+ ldr r3, REFLSYM(2) + ldr r3, REFLSYM(2)
+ blx r3 + blx r3
+ cmp r0, #0 + movcc r0, #0
+ movne r0, #0 + movcs r0, #1
+ moveq r0, #1 + pop {r4, lr}
+ mov lr, r12
+ bx lr + bx lr
+ LSYM(2)
+ .align 2 + .align 2
+ .word -61504 + LSYM(2)
+ .word 0xffff0fc0
+END_FUNC(opal_atomic_cmpset_acq_32) +END_FUNC(opal_atomic_cmpset_acq_32)
+ +
+ +
+START_FUNC(opal_atomic_cmpset_rel_32) +START_FUNC(opal_atomic_cmpset_rel_32)
+ push {r4, lr}
+ mov r3, r0 + mov r3, r0
+ mov r0, r1 + mov r0, r1
+ mov r1, r2 + mov r1, r2
+ mov r2, r3 + mov r2, r3
+ mov r12, lr
+ ldr r3, REFLSYM(3) + ldr r3, REFLSYM(3)
+ blx r3 + blx r3
+ cmp r0, #0 + movcc r0, #0
+ movne r0, #0 + movcs r0, #1
+ moveq r0, #1 + pop {r4, lr}
+ mov lr, r12
+ bx lr + bx lr
+ LSYM(3)
+ .align 2 + .align 2
+ .word -61504 + LSYM(3)
+ .word 0xffff0fc0
+END_FUNC(opal_atomic_cmpset_rel_32) +END_FUNC(opal_atomic_cmpset_rel_32)
+ +
+START_FUNC(opal_atomic_add_32) +START_FUNC(opal_atomic_add_32)
+ push {r4-r7} + push {r4, lr}
+ mov r4, r1 + mov r4, r1
+ mov r2, r0 + mov r2, r0
+ mov r12, lr + LSYM(4)
+ ldr r3, REFLSYM(5) + ldr r0, [r2]
+ LSYM(4) + ldr r3, REFLSYM(5)
+ ldr r0, [r2] + add r1, r0, r4
+ add r1, r0, r4 + blx r3
+ blx r3 + bcc REFLSYM(4)
+ cmp r0, #0 + pop {r4, lr}
+ movne r0, #1 + bx lr
+ bne REFLSYM(4) + .align 2
+ mov lr, r12 + LSYM(5)
+ pop {r4-r7} + .word 0xffff0fc0
+ bx lr
+ LSYM(5)
+ .align 2
+ .word -61504
+END_FUNC(opal_atomic_add_32) +END_FUNC(opal_atomic_add_32)
+ +
+ +
+START_FUNC(opal_atomic_sub_32) +START_FUNC(opal_atomic_sub_32)
+ push {r4-r7} + push {r4, lr}
+ mov r4, r1 + mov r4, r1
+ mov r2, r0 + mov r2, r0
+ mov r12, lr + LSYM(6)
+ ldr r3, REFLSYM(5) + ldr r0, [r2]
+ LSYM(6) + ldr r3, REFLSYM(7)
+ ldr r0, [r2] + sub r1, r0, r4
+ sub r1, r0, r4 + blx r3
+ blx r3 + bcc REFLSYM(6)
+ cmp r0, #0 + pop {r4, lr}
+ movne r0, #1 + bx lr
+ bne REFLSYM(4) + .align 2
+ mov lr, r12 + LSYM(7)
+ pop {r4-r7} + .word 0xffff0fc0
+ bx lr
+ LSYM(7)
+ .align 2
+ .word -61504
+END_FUNC(opal_atomic_sub_32) +END_FUNC(opal_atomic_sub_32)
diff -urNp openmpi-1.6.3_orig/opal/asm/base/ARMV6.asm openmpi-1.6.3/opal/asm/base/ARMV6.asm diff -urNp openmpi-1.6.3_orig/opal/asm/base/ARMV6.asm openmpi-1.6.3/opal/asm/base/ARMV6.asm
--- openmpi-1.6.3_orig/opal/asm/base/ARMV6.asm 1969-12-31 19:00:00.000000000 -0500 --- openmpi-1.6.3_orig/opal/asm/base/ARMV6.asm 1969-12-31 19:00:00.000000000 -0500
@ -649,3 +637,5 @@ diff -urNp openmpi-1.6.3_orig/opal/config/opal_config_asm.m4 openmpi-1.6.3/opal/
AC_DEFINE_UNQUOTED([OPAL_ASM_ARM_VERSION], [$OPAL_ASM_ARM_VERSION], AC_DEFINE_UNQUOTED([OPAL_ASM_ARM_VERSION], [$OPAL_ASM_ARM_VERSION],
[What ARM assembly version to use]) [What ARM assembly version to use])
OMPI_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)' OMPI_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
Binary files openmpi-1.6.3_orig/opal/include/opal/sys/arm/.atomic.h.swp and openmpi-1.6.3/opal/include/opal/sys/arm/.atomic.h.swp differ

View File

@ -19,7 +19,7 @@
Name: openmpi%{?_cc_name_suffix} Name: openmpi%{?_cc_name_suffix}
Version: 1.6.3 Version: 1.6.3
Release: 5%{?dist} Release: 6%{?dist}
Summary: Open Message Passing Interface Summary: Open Message Passing Interface
Group: Development/Libraries Group: Development/Libraries
License: BSD, MIT and Romio License: BSD, MIT and Romio
@ -243,6 +243,9 @@ make check
%{_sysconfdir}/rpm/macros.%{namearch} %{_sysconfdir}/rpm/macros.%{namearch}
%changelog %changelog
* Sun Nov 18 2012 Peter Robinson <pbrobinson@fedoraproject.org> 1.6.3-6
- Update atomics patch for ARM (thanks to Jon Masters)
* Sun Nov 11 2012 Peter Robinson <pbrobinson@fedoraproject.org> 1.6.3-5 * Sun Nov 11 2012 Peter Robinson <pbrobinson@fedoraproject.org> 1.6.3-5
- Atomics patch to fix building on ARM (thanks to Jon Masters) - Atomics patch to fix building on ARM (thanks to Jon Masters)