In the Linaro 11.05 Linux metadistribution, and hence most likely in Ubuntu 11.04, the GNU assembler no longer defaults to -mimplicit-it=thumb, causing the build to fail when compiling on this platform.

The attached trivial patch adds explicit IT instructions where required, permitting a successful build. Patch created against r24936, but validated also against subsequent ones up to and including r24961.

/
        Leif

p.s.
In case someone is curious about what I'm talking about above, there is a pretty decent description of the IT instruction here:
http://infocenter.arm.com/help/topic/com.arm.doc.dui0489d/Cjabicci.html
Index: opal/asm/base/ARM.asm
===================================================================
--- opal/asm/base/ARM.asm	(revision 24936)
+++ opal/asm/base/ARM.asm	(working copy)
@@ -73,6 +73,7 @@
        LSYM(7)
        ldrexd  r4, r5, [r0]
        cmp     r4, r2
+       it      eq
        cmpeq   r5, r3
        bne     REFLSYM(8)
        strexd  r1, r6, r7, [r0]
@@ -91,6 +92,7 @@
        LSYM(9)
        ldrexd  r4, r5, [r0]
        cmp     r4, r2
+       it      eq
        cmpeq   r5, r3
        bne     REFLSYM(10)
        strexd  r1, r6, r7, [r0]
@@ -111,6 +113,7 @@
        LSYM(11)
        ldrexd  r4, r5, [r0]
        cmp     r4, r2
+       it      eq
        cmpeq   r5, r3
        bne     REFLSYM(12)
        dmb
Index: opal/include/opal/sys/arm/atomic.h
===================================================================
--- opal/include/opal/sys/arm/atomic.h	(revision 24936)
+++ opal/include/opal/sys/arm/atomic.h	(working copy)
@@ -142,6 +142,7 @@
    __asm__ __volatile__ (
                          "1:  ldrexd  %0, %H0, [%2]           \n"
                          "    cmp     %0, %3                  \n"
+                         "    it      eq                      \n"
                          "    cmpeq   %H0, %H3                \n"
                          "    bne     2f                      \n"
                          "    strexd  %1, %4, %H4, [%2]       \n"

Reply via email to