From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuEZW-0005tD-Gr for qemu-devel@nongnu.org; Thu, 08 May 2008 18:26:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JuEZV-0005sx-1K for qemu-devel@nongnu.org; Thu, 08 May 2008 18:26:42 -0400 Received: from [199.232.76.173] (port=56791 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuEZU-0005su-SB for qemu-devel@nongnu.org; Thu, 08 May 2008 18:26:40 -0400 Received: from miranda.se.axis.com ([193.13.178.8]:35544) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JuEZU-0002fz-EX for qemu-devel@nongnu.org; Thu, 08 May 2008 18:26:40 -0400 Received: from axis.com (edgar.se.axis.com [10.93.151.1]) by miranda.se.axis.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id m48MQS8b004876 for ; Fri, 9 May 2008 00:26:28 +0200 Date: Fri, 9 May 2008 00:26:28 +0200 From: "Edgar E. Iglesias" Subject: Re: [Qemu-devel] [4380] CRIS: Disable softfloat and dyngen ops. Message-ID: <20080508222628.GD10080@edgar.se.axis.com> References: <20080508212844.GA8314@volta.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080508212844.GA8314@volta.aurel32.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On Thu, May 08, 2008 at 11:28:44PM +0200, Aurelien Jarno wrote: > On Wed, May 07, 2008 at 03:33:57PM +0000, Edgar E. Iglesias wrote: > > Revision: 4380 > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4380 > > Author: edgar_igl > > Date: 2008-05-07 15:33:57 +0000 (Wed, 07 May 2008) > > > > Log Message: > > ----------- > > CRIS: Disable softfloat and dyngen ops. > > > > I guess that's because CRIS has not FP instructions. In that case > the #include "softfloat.h" in target-cris/cpu.h can probably be removed. > > I tried, but that fail. I guess the patch below should be the correct > way to do that. cpu-all.h needs this include as it uses float32, float64 > and float128 are used in various parts of this file. > > diff --git a/cpu-all.h b/cpu-all.h > index 2740da9..14e2a88 100644 > --- a/cpu-all.h > +++ b/cpu-all.h > @@ -38,6 +38,7 @@ > */ > > #include "bswap.h" > +#include "softfloat.h" > > #if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) > #define BSWAP_NEEDED > diff --git a/target-cris/cpu.h b/target-cris/cpu.h > index b62c537..49de830 100644 > --- a/target-cris/cpu.h > +++ b/target-cris/cpu.h > @@ -25,8 +25,6 @@ > > #include "cpu-defs.h" > > -#include "softfloat.h" > - > #define TARGET_HAS_ICE 1 > > #define ELF_MACHINE EM_CRIS Hi Aurelien, I think your patch is good, lets apply it. I also tried adding a new option to get rid of the float code altogether. Not sure if the new option is worth the trouble but it works fine for CRIS. -- Edgar E. Iglesias Axis Communications AB diff --git a/Makefile.target b/Makefile.target index 28774ce..b090d6f 100644 --- a/Makefile.target +++ b/Makefile.target @@ -194,11 +194,13 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH) ifeq ($(ARCH),sparc64) CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc endif +ifndef CONFIG_NO_FLOAT ifdef CONFIG_SOFTFLOAT LIBOBJS+=fpu/softfloat.o else LIBOBJS+=fpu/softfloat-native.o endif +endif CPPFLAGS+=-I$(SRC_PATH)/fpu ifeq ($(TARGET_ARCH), i386) diff --git a/configure b/configure index 34ffa10..8df1c05 100755 --- a/configure +++ b/configure @@ -1233,9 +1233,12 @@ case "$target_cpu" in cris) echo "TARGET_ARCH=cris" >> $config_mak echo "CONFIG_NO_DYNGEN_OP=yes" >> $config_mak + echo "CONFIG_NO_FLOAT=yes" >> $config_mak echo "#define TARGET_ARCH \"cris\"" >> $config_h echo "#define TARGET_CRIS 1" >> $config_h echo "#define CONFIG_NO_DYNGEN_OP 1" >> $config_h + # Disable float code entirely. + echo "#define CONFIG_NO_FLOAT 1" >> $config_h ;; m68k) echo "TARGET_ARCH=m68k" >> $config_mak diff --git a/cpu-all.h b/cpu-all.h index 2740da9..14e2a88 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -38,6 +38,7 @@ */ #include "bswap.h" +#include "softfloat.h" #if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) #define BSWAP_NEEDED diff --git a/target-cris/cpu.h b/target-cris/cpu.h index b62c537..49de830 100644 --- a/target-cris/cpu.h +++ b/target-cris/cpu.h @@ -25,8 +25,6 @@ #include "cpu-defs.h" -#include "softfloat.h" - #define TARGET_HAS_ICE 1 #define ELF_MACHINE EM_CRIS