From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Ivan Kalatchev <ivan.kalatchev@domain.hid>
Cc: Xenomai-help@domain.hid
Subject: Re: [Xenomai-help] Problem compiling 2.5.1
Date: Thu, 04 Feb 2010 15:18:43 +0100 [thread overview]
Message-ID: <4B6AD743.2090002@domain.hid> (raw)
In-Reply-To: <4B6AD557.3060904@domain.hid>
Gilles Chanteperdrix wrote:
> Ivan Kalatchev wrote:
>> I have compiler error when compiling xenomai-2.5.1. Again probably because
>> my tool chain is outdated - gcc 3.4.4.
>> (...)
>> {standard input}:102: Error: bad instruction `lsrs sl,r7,#30'
>> (...)
>>
>> Is there way to modify assembler code so that code would compile ?
>
> Ok. lsrs looks like a valid instruction, but s1 looks strange as a
It is "sl", not "s1", and sl is a valid name for r10. The problem is
indeed lsrs, it is in fact a synonym for the equivalent mov with shifted
second operand in older assembly sources. So, please try the following
patch:
diff --git a/include/asm-arm/arith.h b/include/asm-arm/arith.h
index 9af5c5c..e86975c 100644
--- a/include/asm-arm/arith.h
+++ b/include/asm-arm/arith.h
@@ -32,6 +32,7 @@ rthal_arm_nodiv_llimd(const long long op,
#include <asm-generic/xenomai/arith.h>
+#if __LINUX_ARM_ARCH__ >= 4
#define rthal_arm_nodiv_ullimd_str \
"umull %[tl], %[rl], %[opl], %[fracl]\n\t" \
"umull %[rm], %[rh], %[oph], %[frach]\n\t" \
@@ -49,8 +50,6 @@ rthal_arm_nodiv_llimd(const long long op,
"umlal %[rm], %[rh], %[opl], %[integ]\n\t" \
"mla %[rh], %[oph], %[integ], %[rh]\n\t"
-
-#if __LINUX_ARM_ARCH__ >= 4
static inline __attribute__((__const__)) unsigned long long
rthal_arm_nodiv_ullimd(const unsigned long long op,
const unsigned long long frac,
@@ -101,7 +100,7 @@ rthal_arm_nodiv_llimd(const long long op,
__rthal_u64tou32(op, oph, opl);
__rthal_u64tou32(frac, frach, fracl);
- __asm__ ("lsrs %[s], %[oph], #30\n\t"
+ __asm__ ("movs %[s], %[oph], lsr #30\n\t"
"beq 1f\n\t"
"rsbs %[opl], %[opl], #0\n\t"
"rsc %[oph], %[oph], #0\n"
--
Gilles.
next prev parent reply other threads:[~2010-02-04 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 13:43 [Xenomai-help] Problem compiling 2.5.1 Ivan Kalatchev
2010-02-04 14:10 ` Gilles Chanteperdrix
2010-02-04 14:18 ` Gilles Chanteperdrix [this message]
2010-02-04 14:49 ` Ivan Kalatchev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B6AD743.2090002@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=Xenomai-help@domain.hid \
--cc=ivan.kalatchev@domain.hid \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.