Error while building WOMBAT using ARMV7 tooolchain [strex/ldrex related error]

2 messages Options
Embed this post
Permalink
Akshay

Error while building WOMBAT using ARMV7 tooolchain [strex/ldrex related error]

Reply Threaded More More options
Print post
Permalink
Hi all,
I am getting the following error while building using ARMV7 toolchain.

{standard input}:599: Error: selected processor does not support `ldrex r1,[r2]'
{standard input}:601: Error: selected processor does not support `strex r3,r1,[r2]'

For example the following code uses strex and ldrex but it is not specified which register to use.

static inline int atomic_add_return(int i, atomic_t *v)
{
    unsigned long tmp;
    int result;

    __asm__ __volatile__("@ atomic_add_return\n"
"1: ldrex   %0, [%2]\n"
"   add %0, %0, %3\n"
"   strex   %1, %0, [%2]\n"
"   teq %1, #0\n"
"   bne 1b"
    : "=&r" (result), "=&r" (tmp)
    : "r" (&v->counter), "Ir" (i)
    : "cc");

    return result;
}


According to arm architecture reference manual strex/ldrex are valid for ARMV6 and above.
I dont know how to solve this issue Any toolchain specific CFLAGS/attributes i need to set/unset. Please Help

Warm Regards,
Akshay



      Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew

_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Akshay

Re: Error while building WOMBAT using ARMV7 tooolchain [strex/ldrex related error]

Reply Threaded More More options
Print post
Permalink

Hi all,
I got the problem we need to make --march=armv6/7

Akshay wrote:
Hi all,
I am getting the following error while building using ARMV7 toolchain.

{standard input}:599: Error: selected processor does not support `ldrex r1,[r2]'
{standard input}:601: Error: selected processor does not support `strex r3,r1,[r2]'

For example the following code uses strex and ldrex but it is not specified which register to use.

static inline int atomic_add_return(int i, atomic_t *v)
{
    unsigned long tmp;
    int result;

    __asm__ __volatile__("@ atomic_add_return\n"
"1: ldrex   %0, [%2]\n"
"   add %0, %0, %3\n"
"   strex   %1, %0, [%2]\n"
"   teq %1, #0\n"
"   bne 1b"
    : "=&r" (result), "=&r" (tmp)
    : "r" (&v->counter), "Ir" (i)
    : "cc");

    return result;
}


According to arm architecture reference manual strex/ldrex are valid for ARMV6 and above.
I dont know how to solve this issue Any toolchain specific CFLAGS/attributes i need to set/unset. Please Help

Warm Regards,
Akshay



      Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew

_______________________________________________
Developer mailing list
Developer@okl4.org
https://lists.okl4.org/mailman/listinfo/developer