qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [4380] CRIS: Disable softfloat and dyngen ops.


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [4380] CRIS: Disable softfloat and dyngen ops.
Date: Fri, 9 May 2008 00:26:28 +0200
User-agent: Mutt/1.5.16 (2007-06-09)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]