From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4988 Path: news.gmane.org!not-for-mail From: Stephen Thomas Newsgroups: gmane.linux.lib.musl.general Subject: RE: thumb2 support Date: Tue, 29 Apr 2014 02:14:01 +0100 Message-ID: References: ,<20140428120630.GG12324@port70.net>,<20140428142714.GX26358@brightrain.aerifal.cx>,,<20140429005658.GC26358@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_86bafaae-7ed0-422e-b003-1cbf08c6be3a_" X-Trace: ger.gmane.org 1398734063 32669 80.91.229.3 (29 Apr 2014 01:14:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2014 01:14:23 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-4992-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 29 03:14:16 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Wewch-00065m-RA for gllmg-musl@plane.gmane.org; Tue, 29 Apr 2014 03:14:15 +0200 Original-Received: (qmail 15896 invoked by uid 550); 29 Apr 2014 01:14:14 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15885 invoked from network); 29 Apr 2014 01:14:13 -0000 X-TMN: [4bK8ru+iWjup8u2kIe3g0I9X1udglFyg] X-Originating-Email: [scjthm@live.com] Importance: Normal In-Reply-To: <20140429005658.GC26358@brightrain.aerifal.cx> X-OriginalArrivalTime: 29 Apr 2014 01:14:01.0849 (UTC) FILETIME=[4E3D9E90:01CF6348] Xref: news.gmane.org gmane.linux.lib.musl.general:4988 Archived-At: --_86bafaae-7ed0-422e-b003-1cbf08c6be3a_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > On Tue=2C Apr 29=2C 2014 at 12:52:36AM +0100=2C Stephen Thomas wrote: > > I remember that the old thumb didn't support the conditional > > instructions and was quite slow. I only care about thumb2 and am > > currently using gcc=2C so I attach a patch for the thumb that will >=20 > The code here is only used on armv6/v7. Do any such chips lack thumb2? > If there's any doubt=2C we could look at what gcc generates for the > __sync_* builtins in thumb mode. >=20 > > only work for gcc . >=20 > Why is it only for gcc? I have only tested with gcc. I don't know what llvm nor armcc do. Is there= an ASM standard like ther is for C/C++/fortran? There is some good info on= thumb here=2C https://wiki.ubuntu.com/ARM/Thumb2 and the various ways of s= upporting ARM. I guess that the thumb2 could be replaced by a __thumb__. =20 >=20 > > I think that gcc builds two versions of atomic >=20 > What do you mean by this? I am building the native toolchain as I would like to run this on an embedd= ed platform. My understanding is that when you build the toolchain you need= to provide somethings that end up going in libgcc_s.so such as threading i= f you are using openmp in C++. etc etc. That patch works for both the -marm= and -mthumb or whatever the thumb targets are. >=20 > > so the ugly #define was needed. I cannot remember what rvct/rvds or > > whatever it is branded as these days uses=2C but from memory old > > versions didn't support the gnu assebmly syntax. >=20 > All asm in musl is gas syntax so this is nothing new. >=20 > Rich = --_86bafaae-7ed0-422e-b003-1cbf08c6be3a_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
>=3B On Tue=2C Apr 29=2C = 2014 at 12:52:36AM +0100=2C Stephen Thomas wrote:
>=3B >=3B I rememb= er that the old thumb didn't support the conditional
>=3B >=3B instr= uctions and was quite slow. I only care about thumb2 and am
>=3B >= =3B currently using gcc=2C so I attach a patch for the thumb that will
&= gt=3B
>=3B The code here is only used on armv6/v7. Do any such chips = lack thumb2?
>=3B If there's any doubt=2C we could look at what gcc ge= nerates for the
>=3B __sync_* builtins in thumb mode.
>=3B
&g= t=3B >=3B only work for gcc .
>=3B
>=3B Why is it only for gcc= ?

I have only tested with gcc. I don't know what l= lvm nor armcc do.  =3BIs there an ASM standard like ther is for C/C++/f= ortran? There is some good info on thumb here=2C =3Bhttps://wiki.ubuntu= .com/ARM/Thumb2 and the various ways of supporting ARM. I guess that the th= umb2 could be replaced by a __thumb__.  =3B

>=3B
&g= t=3B >=3B I think that gcc builds two versions of atomic
>=3B
&g= t=3B What do you mean by this?

I am building the n= ative toolchain as I would like to run this on an embedded platform. My und= erstanding is that when you build the toolchain you need to provide somethi= ngs that end up going in =3Blibgcc_s.so such as threading if you are us= ing openmp in C++. etc etc. That patch works for both the -marm and -mthumb= or whatever the thumb targets are.

>=3B
>=3B >=3B = so the ugly #define was needed. I cannot remember what rvct/rvds or
>= =3B >=3B whatever it is branded as these days uses=2C but from memory old=
>=3B >=3B versions didn't support the gnu assebmly syntax.
>= =3B
>=3B All asm in musl is gas syntax so this is nothing new.
>= =3B
>=3B Rich
= --_86bafaae-7ed0-422e-b003-1cbf08c6be3a_--