Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752472AbbKVT67 (ORCPT ); Sun, 22 Nov 2015 14:58:59 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:52384 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752041AbbKVT64 (ORCPT ); Sun, 22 Nov 2015 14:58:56 -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 20:58:08 +0100 Message-ID: <4527012.vmieWOaE32@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151122194704.GJ8644@n2100.arm.linux.org.uk> References: <1448068997-26631-1-git-send-email-sboyd@codeaurora.org> <6840047.0HF9qAEq6r@wuerfel> <20151122194704.GJ8644@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:UU3MorBz+OXaP50x8nRKa8kObVq+87k+Hw7hjIXkQj5NYVR+RRb UbZ23cFU+g77rSVK3LNq37KRXTT2DsVhz01RVSG1lCxJbtNk8Lf82g20gLoCVp+IPE6bEKC e9W771NqO/r9k7frgj0G0LTgA5d7jixa5eqmSv6oC510HCo//4kIzkKyyvRb5xCvJIkK+XH FhIQ59kq//E4xJN23QYpA== X-UI-Out-Filterresults: notjunk:1;V01:K0:moRD543bXI4=:UUpLLoS9Z0IXFScWdm++Sv cXv78skWzqOCgNA/dB9F674I9fUlX/o3tswd9Lvn+Nfpnn3MJd504z6SnV0GQ6viW76WJ7psF /4iLCKR4b8Ez0QzXDeOg9jBlkWbFi35GGOzfV92Vov8UAd/n741vfRgsVTyhqgd6GA7pPIVcW jEmNvd4GBp21iWLB5Z4Jy6vcrBqZLE24GLYoXyOw1gDabZo/HfGpwrFNScpWVSzfz71a4q7Nu XlmqNb/pK7iZWrjgaOq4B846x3wvHZqUlsmhboENr4Cjm3G/x5CuoiIUi0GYiqgfKw6P4tQg4 dnrvrYMQJRFLPDBDC6+WDA/KV8OO2L/BdXJFKiwhWvmXlt5O6lSNUx+2wF6/b/01xDDBdhMlR s75/8Uydj3qDAe/Vb93hbEIew5m6nVeydXupD5W8qavQBCJE+lGKt8FTrB04QQyu7/JZdsjlb wdWd+qElOWXYqiNgJnsZA3aodWMvfBsH+spi3AuOBzoPiHdRE6xKawcXNAPSzJEhp6HQqcG7Y FXvw4EWp8wnsH0PZsKgAUhiki7uNxq2tPWUW2VlLYaABpTwH7X0gwiQQd+Fctig3Q1W339kFF igc2cn/heHYMLa9NcPuiVnC7oKK+OBLqUwQJdDTSwBb5CY4SB95zhUE9BfnB/aNxpLUosowj2 6y76yA0CwpIq0PsTw+f2mi3xp5IZuo6aJ/1coMOuYXDm1TnvERpQmRicXC/655DRXbsukfGZl kpyVza7UyDLZ9Lv6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2271 Lines: 49 On Sunday 22 November 2015 19:47:05 Russell King - ARM Linux wrote: > On Sun, Nov 22, 2015 at 08:25:27PM +0100, Arnd Bergmann wrote: > > The question is really about Marvell Dove, MMP and Armada 370, > > which are all based on PJ4 or PJ4B (CPU part : 0x581), so ARMv7-A > > and report idivt support but idiva. > > Well, it's pretty hard to test when binutils blocks your ability to > write assembly using the instructions. > > root@cubox:~# gcc -O2 -o idiv idiv.c -Wa,-mcpu='cortex-a9+idiv' -marm > /tmp/cc8WPQiB.s: Assembler messages: > /tmp/cc8WPQiB.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-a9+idiv' -mthumb > /tmp/ccRzgAlM.s: Assembler messages: > /tmp/ccRzgAlM.s:36: Error: selected processor does not support Thumb mode `udiv r6,r5,r4' > root@cubox:~# gcc -O2 -o idiv idiv.c -Wa,-mcpu='marvell-pj4+idiv' -mthumb > /tmp/cc1JYyFD.s: Assembler messages: > /tmp/cc1JYyFD.s:36: Error: selected processor does not support Thumb mode `udiv r6,r5,r4' > root@cubox:~# gcc -O2 -o idiv idiv.c -Wa,-mcpu='marvell-pj4+idiv' -marm > /tmp/ccEQbQpp.s: Assembler messages: > /tmp/ccEQbQpp.s:32: Error: selected processor does not support ARM mode `udiv ip,r5,r4' > > That's binutils 2.24 and gcc 4.8.4 as found on Ubuntu 14.04. I'm > sorry, but I don't have spare time to work out what the opcodes > would be. > 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. 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 Armada 370 1 0x581 1 PJ4B idivt mmp3: 2 0x584 2 PJ4-MP idiva idivt lpae Armada XP 2 0x584 2 PJ4-MP idiva idivt lpae Berlin 2 0x584 2 PJ4-MP idiva idivt lpae Arnd -- 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/