From patchwork Sun May 5 22:08:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 2521621 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8E6FD3FC5A for ; Sun, 5 May 2013 22:08:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752016Ab3EEWI1 (ORCPT ); Sun, 5 May 2013 18:08:27 -0400 Received: from mout.gmx.net ([212.227.15.18]:51703 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988Ab3EEWI0 (ORCPT ); Sun, 5 May 2013 18:08:26 -0400 Received: from mailout-de.gmx.net ([10.1.76.17]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LfUkZ-1UFSk5427V-00p3Is for ; Mon, 06 May 2013 00:08:25 +0200 Received: (qmail invoked by alias); 05 May 2013 22:08:24 -0000 Received: from p54AD35C9.dip0.t-ipconnect.de (EHLO p100.box) [84.173.53.201] by mail.gmx.net (mp017) with SMTP; 06 May 2013 00:08:24 +0200 X-Authenticated: #1045983 X-Provags-ID: V01U2FsdGVkX18z/VcGF74z9YMQVQGHkzo8svClO7s2VGUTJdKzRH JCBmgjxzNiy46C Date: Mon, 6 May 2013 00:08:22 +0200 From: Helge Deller To: Dmitry Kasatkin , Linux Kernel Development , linux-parisc@vger.kernel.org Subject: [PATCH] MPILIB: disable usage of floating point registers on parisc Message-ID: <20130505220822.GA7819@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Y-GMX-Trusted: 0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org The umul_ppmm() macro for parisc uses the xmpyu assembler statement which does calculation via a floating point register. But usage of floating point registers inside the Linux kernel are not allowed and gcc will stop compilation due to the -mdisable-fpregs compiler option. Fix this by disabling the umul_ppmm() and udiv_qrnnd() macros. The mpilib will then use the generic built-in implementations instead. Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h index 095ab15..d411355 100644 --- a/lib/mpi/longlong.h +++ b/lib/mpi/longlong.h @@ -318,7 +318,8 @@ extern UDItype __udiv_qrnnd(); "rM" ((USItype)(bh)), \ "rM" ((USItype)(al)), \ "rM" ((USItype)(bl))) -#if defined(_PA_RISC1_1) +#if 0 && defined(_PA_RISC1_1) +/* xmpyu uses floating point register which is not allowed in Linux kernel. */ #define umul_ppmm(wh, wl, u, v) \ do { \ union {UDItype __ll; \ @@ -337,7 +338,7 @@ do { \ #define UMUL_TIME 40 #define UDIV_TIME 80 #endif -#ifndef LONGLONG_STANDALONE +#if 0 /* #ifndef LONGLONG_STANDALONE */ #define udiv_qrnnd(q, r, n1, n0, d) \ do { USItype __r; \ (q) = __udiv_qrnnd(&__r, (n1), (n0), (d)); \