Hi Greg,
toolchain is m68k-uclinux-tools-20061214.sh
Below a piece of code.
#define R_FLAGS_INIT 0x00000004
atomic_clear_mask(R_FLAGS_INIT,&dev->flags);
This results in an error from assembler:
Error: operand mismatch -- statement 'andl #-5,(%a1)' ignored
Alexander told me to compare this with the assembler code that produces no
error,
but I don't know how to generate this. He told me to have a look at the ELF
file.
But there is no.
Regards
Bernd
Greg Ungerer schrieb:
Hi Bernd,
Bernd Büttner wrote:
my platform: m68knommu
ditribution 20070130 and 20080808
Using atomic_set_mask and atomic_clear_mask I ran into an assembler
error.
What was the error?
What binutils version?
Regards
Greg
Doing the following patch helped me out:
Index: linux-2.6.x/include/asm-m68knommu/atomic.h
===================================================================
--- linux-2.6.x/include/asm-m68knommu/atomic.h (Revision 5)
+++ linux-2.6.x/include/asm-m68knommu/atomic.h (Arbeitskopie)
@@ -86,12 +86,12 @@
static __inline__ void atomic_clear_mask(unsigned long mask, unsigned
long *v)
{
- __asm__ __volatile__("andl %1,%0" : "+m" (*v) : "id" (~(mask)));
+ __asm__ __volatile__("andl %1,%0" : "+m" (*v) : "d" (~(mask)));
}
static __inline__ void atomic_set_mask(unsigned long mask, unsigned
long *v)
{
- __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask));
+ __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "d" (mask));
}
/* Atomic operations are already serializing */
I'm not familiar with __asm__ directives, so could please someone tell
me if I'm correct.
Bernd
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev