From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4989 Path: news.gmane.org!not-for-mail From: Wermut Newsgroups: gmane.linux.lib.musl.general Subject: Re: thumb2 support Date: Tue, 29 Apr 2014 18:09:14 +0200 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: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1398787775 11762 80.91.229.3 (29 Apr 2014 16:09:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2014 16:09:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4993-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 29 18:09:30 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 1WfAb4-0004v9-MF for gllmg-musl@plane.gmane.org; Tue, 29 Apr 2014 18:09:30 +0200 Original-Received: (qmail 30394 invoked by uid 550); 29 Apr 2014 16:09:27 -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 30386 invoked from network); 29 Apr 2014 16:09:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bortis.ch; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=Pr3GWHBeMSA7icDzOSSrD/F+h5Aa37XmI6cUB8EWIgc=; b=UIVOsj6jdeBTtxEDjc+RGDBPcKgBCeJRDSAnPpHWFNXWv+Hbhq2TDCx2j8cXXAtT7K vO1tER9TsfkTrUQDiQiaUbodY+A/0DeP3NQ/K47kP7de+r6MR39eBxlP0f8eDHYFLB/t LOWJLOmBmMzD4E71jm0jWpSJOW3j59wxvuFrg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=Pr3GWHBeMSA7icDzOSSrD/F+h5Aa37XmI6cUB8EWIgc=; b=spXQT3NNvM97UlucPY/fcc0Vl8BCdJt/P+j1oBOpNuU99maZwNA/3xxmsC2hpRJ9XM BoIDxOik6jflcMAlVVrgspqN4DxPSbAvoHUkd7JtbxC4eYR4Q48Ba6AYuSqGazCSBljm nYvg6Fqs1R1Q7qU7hKehyGYSfA/qCZUMa6f7ibRhmLtKhWkLiVYejqvq8YBJghPs518T 0xn3evfkg9vDSOVylh6UVQ8zB0qFILpudxCOduZsHeYI8yo1ddToIW4bXV7QmU7OLObK t6QelbOoA6FiEHTLwwuHrz65BY46PGtHBJ7rJGd4z3IPozxJNbaoHJyIacx8tSPy2z2G Iu5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=Pr3GWHBeMSA7icDzOSSrD/F+h5Aa37XmI6cUB8EWIgc=; b=a0dKyxRfqGx2clqEDn5sR3D1si8utEfCOKCCMio8FvS11jRgKQmziOwGWGdCpC2XgQ gRcnyZtQjgzDG/hocIRUG1gc1umtwWDb+uykWlBrp+oaphfxOeiHM0yFJ6LHROkpP8XJ URDLpVaZkh1nWVtHibv/FiBW5Ua/yzdmkK71bIJi3ophYZjgV3+x0FWJxqJ3KvniHqUs O/KW6Hla64DHSoUIrsMkLUg7EFydBQ8OSlybxN1jBl4f1iVTocGOoY+WlNOXLYtIMev3 jXRbebhF6fYD26GKvOtajnQijWskilNYGUt9hOBfsRx3o7cw1Tprh9paHArrFCOCFiMf Vzkg== X-Gm-Message-State: ALoCoQkZYILKQrL4i2HuO4Ep6P9h/jZNylYDAaQTDR8G9SrbmMZs/qb/pTdmM/mTnfX0ED+2GdzI X-Received: by 10.236.137.8 with SMTP id x8mr47113298yhi.4.1398787754421; Tue, 29 Apr 2014 09:09:14 -0700 (PDT) Original-Sender: kevin@bortis.ch In-Reply-To: X-Google-Sender-Auth: UKWGBfDY3wwYjfNYI_XPpGx5Tbo Xref: news.gmane.org gmane.linux.lib.musl.general:4989 Archived-At: Hi I have tested the patch from Stephen Thomas at least for gcc 4.6, 4.7 and 4.8. Seems to work. Would be nice if the 1.1.1 release will include a fix. Regards Kevin On Tue, Apr 29, 2014 at 3:14 AM, Stephen Thomas wrote: >> On Tue, Apr 29, 2014 at 12:52:36AM +0100, 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, so I attach a patch for the thumb that will >> >> The code here is only used on armv6/v7. Do any such chips lack thumb2? >> If there's any doubt, we could look at what gcc generates for the >> __sync_* builtins in thumb mode. >> >> > only work for gcc . >> >> 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, https://wiki.ubuntu.com/ARM/Thumb2 and the various ways of > supporting ARM. I guess that the thumb2 could be replaced by a __thumb__. > >> >> > I think that gcc builds two versions of atomic >> >> What do you mean by this? > > I am building the native toolchain as I would like to run this on an > embedded 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 if you are using openmp in C++. etc etc. That patch works for both > the -marm and -mthumb or whatever the thumb targets are. > >> >> > so the ugly #define was needed. I cannot remember what rvct/rvds or >> > whatever it is branded as these days uses, but from memory old >> > versions didn't support the gnu assebmly syntax. >> >> All asm in musl is gas syntax so this is nothing new. >> >> Rich