Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752617AbbKVUht (ORCPT ); Sun, 22 Nov 2015 15:37:49 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:62970 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752041AbbKVUhr (ORCPT ); Sun, 22 Nov 2015 15:37:47 -0500 From: Arnd Bergmann To: Russell King - ARM Linux Cc: Peter Maydell , =?ISO-8859-1?Q?M=E5ns_Rullg=E5rd?= , Nicolas Pitre , "linux-arm-msm@vger.kernel.org" , Stephen Boyd , lkml - Kernel Mailing List , Steven Rostedt , arm-mail-list Subject: Re: [RFC/PATCH 0/3] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions Date: Sun, 22 Nov 2015 21:37 +0100 Message-ID: <3964884.0P2KA5fUaZ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151122200326.GK8644@n2100.arm.linux.org.uk> References: <1448068997-26631-1-git-send-email-sboyd@codeaurora.org> <4527012.vmieWOaE32@wuerfel> <20151122200326.GK8644@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart6658970.ZttEjHovNH" Content-Transfer-Encoding: 7Bit X-Provags-ID: V03:K0:zlOdOGSglcH3cxrEgyfVwSp9wJrGxKk6a4aq5O4QNvE5rE10Xi0 5X7PZ2UxMOnWT2fKo/ZrTSlUo1FsOQZJbr+ljYiiU0AjkI7fzPUbomRE4mDpSbTVeO+3KwT FZw1eBBNO0DVaW9Bl5/TOMT0hvgUzfU7aiGrMI/y8eAd4gilPc4a2rvmU92JhL3qO2HRQnj cnwZ/+H161pM7kYdpahgA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Sw5FKcFtUk0=:l6AdS2Y+/X1nh2s2Bd/q06 jv0ie8CEBUkf24MXqOupi5eoxYpLqlmWfMU/SYVgKWsibR0/pbjkvHELp6NF5FF25lrVXhB2g lwEkUwLo0V5Waw5nsp0vWUoPjHCb4MtyKueglz3L9vFmhYQgiJu2bYq/TiDbNnCr57roBDS21 hGKPykoQVJLFLsfB/OtZyRPJqFE+UfWRyY4SsmOD6cY/2VcG5md6JYfA9NcNwYYiIg/QGspv2 HlL9AkWWD0IFiAleCO9OeJg56YZVKlqmOEMfS1eA/bjZR3fo63nR/SSSUquCZUNplGVmeZeo5 rbq/gVW/CqMch8os2DPqPkTD/eXRf5bAjtpwvXP8hDu4f9INTG6hVhbh21+LbnZt44DogL48T 2DJ29o9KZ6uI2xLVTPhAz/RRBDumjja2UoaBeSxwJyjwTqCjrRw57USH05ud5fhgBwrhv/wDO XzqNojvCp+zvbPsEglOle5eolTI4oleHzjBgJnYm2IY93TOcVxYutlKwg0LRyoVACCvU8FYJ4 OMugNTOzm+YMhDNfgsDF61XmqzsyMH4ji4R2cL52G7QGb19NW/5Ye/QE5hzYrYnUECSmLwNIS vyw00/a5OzveTlOn3is9FnYd6FXbWupaJlUIVP4BEJJ1sr27rRduOp/3pSD751LwfzpwMpTnX FIE9ITxQ++hHZR+1tKoLNXlnDc57z07Let6VWJEeli0s7WX0slbLe0wSQxPrE99RO8rQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5697 Lines: 150 This is a multi-part message in MIME format. --nextPart6658970.ZttEjHovNH Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Sunday 22 November 2015 20:03:26 Russell King - ARM Linux wrote: > On Sun, Nov 22, 2015 at 08:58:08PM +0100, Arnd Bergmann wrote: > > does it work with -mcpu=cortex-a15? I've tried crosstool as versions > > 2.23.52.20130913, 2.24.0.20141017 and 2.25.51.20150518, and they > > all seem to behave as expected, failing with -mcpu=cortex-a9 and > > marvell-pj4 but succeeding with -mcpu=cortex-a15 or marvell-pj4+idiv. > > Appears not: > > root@cubox:~# gcc -O2 -o idiv idiv.c -Wa,-mcpu='cortex-a15+idiv' -marm > /tmp/ccSovg32.s: Assembler messages: > /tmp/ccSovg32.s:32: Error: selected processor does not support ARM mode `udiv ip,r5,r4' > root@cubox:~# gcc -O2 -o idiv idiv.c -Wa,-mcpu='cortex-a15+idiv' -mthumb > /tmp/cchbT3EE.s: Assembler messages: > /tmp/cchbT3EE.s:36: Error: selected processor does not support Thumb mode `udiv r6,r5,r4' > > Same without the +idiv. I've attached files with those instructions, maybe that helps. > > I've also found some /proc/cpuinfo output to cross-reference SoCs > > to their core names. > > > > variant part revision name features > > mmp2: 0 0x581 5 PJ4 idivt > > dove: 0 0x581 5 PJ4 idivt > > Yes, that agrees with my dove. ok. arnd@wuerfel:/tmp$ cat idiv.c unsigned int udiv(unsigned int a, unsigned int b) { return a / b; } int sdiv(int a, int b) { return a / b; } arnd@wuerfel:/tmp$ arm-linux-gnueabihf-gcc -Wall -O2 -mcpu=cortex-a15 idiv.c -c -o idiv-arm.o arnd@wuerfel:/tmp$ objdump -dr idiv-arm.o idiv-arm.o: file format elf32-littlearm Disassembly of section .text: 00000000 : 0: fbb0 f0f1 udiv r0, r0, r1 4: 4770 bx lr 6: bf00 nop 00000008 : 8: fb90 f0f1 sdiv r0, r0, r1 c: 4770 bx lr e: bf00 nop arnd@wuerfel:/tmp$ arm-linux-gnueabihf-gcc -Wall -O2 -mcpu=cortex-a15 idiv.c -c -o idiv-thumb.o -mthumb arnd@wuerfel:/tmp$ objdump -dr idiv-thumb.o idiv-thumb.o: file format elf32-littlearm Disassembly of section .text: 00000000 : 0: fbb0 f0f1 udiv r0, r0, r1 4: 4770 bx lr 6: bf00 nop 00000008 : 8: fb90 f0f1 sdiv r0, r0, r1 c: 4770 bx lr e: bf00 nop Arnd --nextPart6658970.ZttEjHovNH Content-Disposition: attachment; filename="idiv-arm.o" Content-Transfer-Encoding: base64 Content-Type: application/x-object; name="idiv-arm.o" f0VMRgEBAQAAAAAAAAAAAAEAKAABAAAAAAAAAAAAAAAIAQAAAAAABTQAAAAAAC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B1ZGl2 AHNkaXYA --nextPart6658970.ZttEjHovNH Content-Disposition: attachment; filename="idiv-thumb.o" Content-Transfer-Encoding: base64 Content-Type: application/x-object; name="idiv-thumb.o" f0VMRgEBAQAAAAAAAAAAAAEAKAABAAAAAAAAAAAAAAAIAQAAAAAABTQAAAAAACgACgAHALD78fBw RwC/kPvx8HBHAL8AR0NDOiAoVWJ1bnR1L0xpbmFybyA0LjguMS0xMHVidW50dTcpIDQuOC4xAEFB AAAAYWVhYmkAATcAAAAFQ29ydGV4LUExNQAGCgdBCAEJAgoEEgQUARUBFwMYARkBGgIbAxwBHgIi ASoBLAJEAwAuc3ltdGFiAC5zdHJ0YWIALnNoc3RydGFiAC50ZXh0AC5kYXRhAC5ic3MALmNvbW1l bnQALm5vdGUuR05VLXN0YWNrAC5BUk0uYXR0cmlidXRlcwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAABsAAAABAAAABgAAAAAAAAA0AAAAEAAAAAAAAAAAAAAABAAAAAAA AAAhAAAAAQAAAAMAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAJwAAAAgAAAADAAAAAAAA AEQAAAAAAAAAAAAAAAAAAAABAAAAAAAAACwAAAABAAAAMAAAAAAAAABEAAAALAAAAAAAAAAAAAAA AQAAAAEAAAA1AAAAAQAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAARQAAAAMAAHAA AAAAAAAAAHAAAABCAAAAAAAAAAAAAAABAAAAAAAAABEAAAADAAAAAAAAAAAAAACyAAAAVQAAAAAA AAAAAAAAAQAAAAAAAAABAAAAAgAAAAAAAAAAAAAAmAIAALAAAAAJAAAACQAAAAQAAAAQAAAACQAA AAMAAAAAAAAAAAAAAEgDAAAVAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA AAAAAAAAAAAEAPH/AAAAAAAAAAAAAAAAAwABAAAAAAAAAAAAAAAAAAMAAgAAAAAAAAAAAAAAAAAD AAMACAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAMABQAAAAAAAAAAAAAAAAADAAQAAAAAAAAA AAAAAAAAAwAGAAsAAAABAAAABgAAABIAAQAQAAAACQAAAAYAAAASAAEAAGlkaXYuYwAkdAB1ZGl2 AHNkaXYA --nextPart6658970.ZttEjHovNH Content-Disposition: attachment; filename="idiv.c" Content-Transfer-Encoding: 7Bit Content-Type: text/x-csrc; charset="ISO-8859-1"; name="idiv.c" unsigned int udiv(unsigned int a, unsigned int b) { return a / b; } int sdiv(int a, int b) { return a / b; } --nextPart6658970.ZttEjHovNH-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/