From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72863 invoked by alias); 14 Sep 2015 19:08:00 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 72848 invoked by uid 89); 14 Sep 2015 19:07:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 14 Sep 2015 19:07:59 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 0CA578CF73; Mon, 14 Sep 2015 19:07:57 +0000 (UTC) Received: from anchor.twiddle.net (vpn-224-221.phx2.redhat.com [10.3.224.221]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8EJ7v1o019324; Mon, 14 Sep 2015 15:07:57 -0400 Subject: Re: libffi on Cortex M4? To: Tor Krill , libffi-discuss@sourceware.org References: <1442256188.3397.27.camel@openproducts.com> From: Richard Henderson Message-ID: <55F71AEE.50004@redhat.com> Date: Mon, 14 Sep 2015 19:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1442256188.3397.27.camel@openproducts.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015/txt/msg00087.txt.bz2 On 09/14/2015 11:43 AM, Tor Krill wrote: > Dear list, > > I'm trying to crosscompile libffi for a Cortex-M4 platform running > uClinux but this fails miserably during compilation with a: > > ../src/arm/sysv.S: Assembler messages: > ../src/arm/sysv.S:152: Error: selected processor does not support ARM > opcodes > ../src/arm/sysv.S:154: Error: attempt to use an ARM instruction on a > Thumb-only processor -- `stmfd sp!,{r0-r3,fp,lr}' > ../src/arm/sysv.S:156: Error: attempt to use an ARM instruction on a > Thumb-only processor -- `mov fp,sp' > ../src/arm/sysv.S:161: Error: attempt to use an ARM instruction on a > Thumb-only processor -- `sub sp,fp,r2' > > My question is simply, is thumb2 on a cortex m4 supported by libffi? > I.e. is it my build setup that is faulty and this should work or is this > unsupported? Thumb2 is supported, but I think you'll find that the M4 is thumb1, which isn't. We normally expect to have the assembly bits for libffi compiled for arm32 and use interworking to let the C bits be built for thumb1. In order to support a thumb1 only core would require significant work. r~