On Mon, May 17, 2010 at 12:01 PM, Gilles Chanteperdrix
<[email protected]> wrote:
> Jeremy Brown wrote:
>> On Mon, May 17, 2010 at 11:25 AM, Gilles Chanteperdrix
>> <[email protected]> wrote:
>>> Jeremy Brown wrote:
>>>> {standard input}: Assembler messages:
>>>> {standard input}:140: Error: selected processor does not support `rsc
>>>> r7,r7,#0'
>>>> {standard input}:159: Error: selected processor does not support `rsc
>>>> r1,r1,#0'
>>>> make: *** [libxenomai_la-timeconv.lo] Error 1
>>> Ok. Could you try and compile the following piece of code with your
>>> toolchain and show me the disassembly ?
>>>
>>> long long foo(long long x)
>>> {
>>> return -x;
>>> }
>>>
>>> --
>>> Gilles.
>>
>> Thanks for the quick reply! Here's the complete contents of foo.s:
>>
>> .syntax unified
>
> That is the key: I presume this means your compiler generates syntax
> which works both with ARM and thumb2, and rsc does not exist with
> thumb2. Note that from a performance point of view, this may not be a win.
>
> So be it. Try the following patch:
Thank you. That solved this particular problem. (Something in
cond.c is now causing a gcc internal compiler error, so I think this
toolchain is generally suspect, but that's not even vaguely a Xenomai
problem now.)
Jeremy
> diff --git a/include/asm-arm/arith.h b/include/asm-arm/arith.h
> index e86975c..72c0ab7 100644
> --- a/include/asm-arm/arith.h
> +++ b/include/asm-arm/arith.h
> @@ -103,13 +103,13 @@ rthal_arm_nodiv_llimd(const long long op,
> __asm__ ("movs %[s], %[oph], lsr #30\n\t"
> "beq 1f\n\t"
> "rsbs %[opl], %[opl], #0\n\t"
> - "rsc %[oph], %[oph], #0\n"
> + "sbc %[oph], %[oph], %[oph], lsl #1\n"
> "1:\t"
> rthal_arm_nodiv_ullimd_str
> "teq %[s], #0\n\t"
> "beq 2f\n\t"
> "rsbs %[rm], %[rm], #0\n\t"
> - "rsc %[rh], %[rh], #0\n"
> + "sbc %[rh], %[rh], %[rh], lsl #1\n"
> "2:\t"
> : [rl]"=r"(rl), [rm]"=r"(rm), [rh]"=r"(rh),
> [tl]"=r"(tl), [th]"=r"(th), [s]"=r"(s)
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help