* [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0'
@ 2010-05-17 18:05 Jeremy Brown
2010-05-17 18:25 ` Gilles Chanteperdrix
0 siblings, 1 reply; 11+ messages in thread
From: Jeremy Brown @ 2010-05-17 18:05 UTC (permalink / raw)
To: xenomai-help
[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]
Hello, all. I'm trying to build Xenomai 2.5.3 userspace on a Beagleboard
(armel), but building timeconv.c is failing on an assembly error. I would
appreciate any advice on how to solve it!
------
/bin/bash ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../../.\
./src/include -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -march=armv7-a
-mfpu=vfp3 -m\
float-abi=softfp -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes
-I../../../include -M\
T libxenomai_la-timeconv.lo -MD -MP -MF .deps/libxenomai_la-timeconv.Tpo -c
-o libxeno\
mai_la-timeconv.lo `test -f 'timeconv.c' || echo './'`timeconv.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../src/include -O2
-D_GNU_SOURCE -D\
_REENTRANT -Wall -pipe -march=armv7-a -mfpu=vfp3 -mfloat-abi=softfp
-D__XENO__ -D__IN_\
XENO__ -Wstrict-prototypes -I../../../include -MT libxenomai_la-timeconv.lo
-MD -MP -M\
F .deps/libxenomai_la-timeconv.Tpo -c timeconv.c -fPIC -DPIC -o
.libs/libxenomai_la-t\
imeconv.o
{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
------
The OS is Ubuntu Lucid. I'm using native tools, not cross-compilers,
directly on the Beagle.
$ uname -a
Linux beagleboard 2.6.32.11-l13 #1 PREEMPT Tue Apr 13 04:25:20 UTC 2010
armv7l GNU/Linux
Tools packages:
gcc 4:4.4.3-1ubuntu1
binutils 2.20.1-3ubuntu5
Xenomai configuration:
$ ./configure --prefix=/usr/local/xenomai --enable-arm-mach=omap3
--enable-arm-eabi --disable-arm-tsc
(I have tried this with and without the tsc disable.)
The running kernel is a vanilla linux 2.6.33 with the xenomai 2.5.3 patches
applied.
Thanks in advance for any and all help, suggestions, etc.
Jeremy
[-- Attachment #2: Type: text/html, Size: 2350 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 18:05 [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' Jeremy Brown @ 2010-05-17 18:25 ` Gilles Chanteperdrix 2010-05-17 18:51 ` Jeremy Brown 0 siblings, 1 reply; 11+ messages in thread From: Gilles Chanteperdrix @ 2010-05-17 18:25 UTC (permalink / raw) To: Jeremy Brown; +Cc: xenomai-help 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. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 18:25 ` Gilles Chanteperdrix @ 2010-05-17 18:51 ` Jeremy Brown 2010-05-17 18:54 ` Gilles Chanteperdrix 2010-05-17 19:01 ` Gilles Chanteperdrix 0 siblings, 2 replies; 11+ messages in thread From: Jeremy Brown @ 2010-05-17 18:51 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: xenomai-help On Mon, May 17, 2010 at 11:25 AM, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> 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 .arch armv7-a .eabi_attribute 27, 3 .fpu vfpv3-d16 .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 2 .eabi_attribute 30, 6 .eabi_attribute 18, 4 .thumb .file "foo.c" .text .align 2 .global foo .thumb .thumb_func .type foo, %function foo: @ args = 0, pretend = 0, frame = 8 @ frame_needed = 1, uses_anonymous_args = 0 @ link register save eliminated. push {r7} sub sp, sp, #12 add r7, sp, #0 strd r0, [r7] ldrd r0, [r7] negs r2, r0 sbc r3, r1, r1, lsl #1 mov r0, r2 mov r1, r3 add r7, r7, #12 mov sp, r7 pop {r7} bx lr .size foo, .-foo .ident "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3" .section .note.GNU-stack,"",%progbits ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 18:51 ` Jeremy Brown @ 2010-05-17 18:54 ` Gilles Chanteperdrix 2010-05-17 18:56 ` Jeremy Brown 2010-05-17 19:01 ` Gilles Chanteperdrix 1 sibling, 1 reply; 11+ messages in thread From: Gilles Chanteperdrix @ 2010-05-17 18:54 UTC (permalink / raw) To: Jeremy Brown; +Cc: xenomai-help Jeremy Brown wrote: > On Mon, May 17, 2010 at 11:25 AM, Gilles Chanteperdrix > <gilles.chanteperdrix@xenomai.org> 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 > .arch armv7-a > .eabi_attribute 27, 3 > .fpu vfpv3-d16 > .eabi_attribute 20, 1 > .eabi_attribute 21, 1 > .eabi_attribute 23, 3 > .eabi_attribute 24, 1 > .eabi_attribute 25, 1 > .eabi_attribute 26, 2 > .eabi_attribute 30, 6 > .eabi_attribute 18, 4 > .thumb > .file "foo.c" > .text > .align 2 > .global foo > .thumb > .thumb_func > .type foo, %function > foo: > @ args = 0, pretend = 0, frame = 8 > @ frame_needed = 1, uses_anonymous_args = 0 > @ link register save eliminated. > push {r7} > sub sp, sp, #12 > add r7, sp, #0 > strd r0, [r7] > ldrd r0, [r7] > negs r2, r0 > sbc r3, r1, r1, lsl #1 > mov r0, r2 > mov r1, r3 > add r7, r7, #12 > mov sp, r7 > pop {r7} > bx lr > .size foo, .-foo > .ident "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3" > .section .note.GNU-stack,"",%progbits > Compile with -O2 please -- Gilles. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 18:54 ` Gilles Chanteperdrix @ 2010-05-17 18:56 ` Jeremy Brown 0 siblings, 0 replies; 11+ messages in thread From: Jeremy Brown @ 2010-05-17 18:56 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: xenomai-help On Mon, May 17, 2010 at 11:54 AM, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote: > Jeremy Brown wrote: >> On Mon, May 17, 2010 at 11:25 AM, Gilles Chanteperdrix >> <gilles.chanteperdrix@xenomai.org> 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; >>> } > Compile with -O2 please .syntax unified .arch armv7-a .eabi_attribute 27, 3 .fpu vfpv3-d16 .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 2 .eabi_attribute 30, 6 .eabi_attribute 18, 4 .thumb .file "foo.c" .text .align 2 .global foo .thumb .thumb_func .type foo, %function foo: @ args = 0, pretend = 0, frame = 8 @ frame_needed = 1, uses_anonymous_args = 0 @ link register save eliminated. push {r7} sub sp, sp, #12 add r7, sp, #0 strd r0, [r7] ldrd r0, [r7] negs r2, r0 sbc r3, r1, r1, lsl #1 mov r0, r2 mov r1, r3 add r7, r7, #12 mov sp, r7 pop {r7} bx lr .size foo, .-foo .ident "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3" .section .note.GNU-stack,"",%progbits ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 18:51 ` Jeremy Brown 2010-05-17 18:54 ` Gilles Chanteperdrix @ 2010-05-17 19:01 ` Gilles Chanteperdrix 2010-05-17 19:25 ` Jeremy Brown 2010-05-17 20:50 ` Jeremy Brown 1 sibling, 2 replies; 11+ messages in thread From: Gilles Chanteperdrix @ 2010-05-17 19:01 UTC (permalink / raw) To: Jeremy Brown; +Cc: xenomai-help Jeremy Brown wrote: > On Mon, May 17, 2010 at 11:25 AM, Gilles Chanteperdrix > <gilles.chanteperdrix@xenomai.org> 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: 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) -- Gilles. ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 19:01 ` Gilles Chanteperdrix @ 2010-05-17 19:25 ` Jeremy Brown 2010-05-17 19:30 ` Jeremy Brown 2010-05-17 20:50 ` Jeremy Brown 1 sibling, 1 reply; 11+ messages in thread From: Jeremy Brown @ 2010-05-17 19:25 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: xenomai-help On Mon, May 17, 2010 at 12:01 PM, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote: > Jeremy Brown wrote: >> On Mon, May 17, 2010 at 11:25 AM, Gilles Chanteperdrix >> <gilles.chanteperdrix@xenomai.org> 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) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 19:25 ` Jeremy Brown @ 2010-05-17 19:30 ` Jeremy Brown 0 siblings, 0 replies; 11+ messages in thread From: Jeremy Brown @ 2010-05-17 19:30 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: xenomai-help On Mon, May 17, 2010 at 12:24 PM, Jeremy Brown <jhbrown@domain.hid> wrote: > 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.) Hm. Turning off optimization, the ICE goes away and I get "cond.c:30: error: r7 cannot be used in asm here." This is at the expansion of XENOMAI_SKINCALL1. Is this more thumb-related headaches? Am I going to be better off just finding or building a toolchain that's not trying to use the unified instructions? Thanks again, Jeremy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 19:01 ` Gilles Chanteperdrix 2010-05-17 19:25 ` Jeremy Brown @ 2010-05-17 20:50 ` Jeremy Brown 2010-05-17 23:57 ` Gilles Chanteperdrix 1 sibling, 1 reply; 11+ messages in thread From: Jeremy Brown @ 2010-05-17 20:50 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: xenomai-help On Mon, May 17, 2010 at 12:01 PM, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote: > Jeremy Brown wrote: >> On Mon, May 17, 2010 at 11:25 AM, Gilles Chanteperdrix >> <gilles.chanteperdrix@xenomai.org> 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. Ah, success --- based on your note, a colleague of mine determined that arranging to pass gcc the (undocumented) "-marm" flag enables the compiler to build the unpatched Xenomai 2.5.3 sources from beginning to end. For posterity, I recompiled your example code with -O2 -marm, and appended it below. Thank you for all of your help! Jeremy .arch armv7-a .eabi_attribute 27, 3 .fpu vfpv3-d16 .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 2 .eabi_attribute 30, 2 .eabi_attribute 18, 4 .file "foo.c" .text .align 2 .global foo .type foo, %function foo: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. rsbs r2, r0, #0 rsc r3, r1, #0 mov r1, r3 mov r0, r2 bx lr .size foo, .-foo .ident "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3" .section .note.GNU-stack,"",%progbits ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 20:50 ` Jeremy Brown @ 2010-05-17 23:57 ` Gilles Chanteperdrix 2010-05-18 0:48 ` Jeremy Brown 0 siblings, 1 reply; 11+ messages in thread From: Gilles Chanteperdrix @ 2010-05-17 23:57 UTC (permalink / raw) To: Jeremy Brown; +Cc: xenomai-help Jeremy Brown wrote: >>> .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. > > Ah, success --- based on your note, a colleague of mine determined > that arranging to pass gcc the (undocumented) "-marm" flag enables the > compiler to build the unpatched Xenomai 2.5.3 sources from beginning > to end. For posterity, I recompiled your example code with -O2 -marm, > and appended it below. Ok. Does it solve the ICE too? -- Gilles. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' 2010-05-17 23:57 ` Gilles Chanteperdrix @ 2010-05-18 0:48 ` Jeremy Brown 0 siblings, 0 replies; 11+ messages in thread From: Jeremy Brown @ 2010-05-18 0:48 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: xenomai-help On Mon, May 17, 2010 at 4:57 PM, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote: > Jeremy Brown wrote: >>>> .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. >> >> Ah, success --- based on your note, a colleague of mine determined >> that arranging to pass gcc the (undocumented) "-marm" flag enables the >> compiler to build the unpatched Xenomai 2.5.3 sources from beginning >> to end. For posterity, I recompiled your example code with -O2 -marm, >> and appended it below. > > Ok. Does it solve the ICE too? Yes, it does, thanks. Everything compiles and xeno-test runs to completion. Jeremy ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-05-18 0:48 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-17 18:05 [Xenomai-help] Error building userspace: "selected processor does not support `rsc r7, r7, #0' Jeremy Brown 2010-05-17 18:25 ` Gilles Chanteperdrix 2010-05-17 18:51 ` Jeremy Brown 2010-05-17 18:54 ` Gilles Chanteperdrix 2010-05-17 18:56 ` Jeremy Brown 2010-05-17 19:01 ` Gilles Chanteperdrix 2010-05-17 19:25 ` Jeremy Brown 2010-05-17 19:30 ` Jeremy Brown 2010-05-17 20:50 ` Jeremy Brown 2010-05-17 23:57 ` Gilles Chanteperdrix 2010-05-18 0:48 ` Jeremy Brown
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.