qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@axis.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [4380] CRIS: Disable softfloat and dyngen ops.
Date: Fri, 9 May 2008 00:26:28 +0200	[thread overview]
Message-ID: <20080508222628.GD10080@edgar.se.axis.com> (raw)
In-Reply-To: <20080508212844.GA8314@volta.aurel32.net>

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	other threads:[~2008-05-08 22:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 15:33 [Qemu-devel] [4380] CRIS: Disable softfloat and dyngen ops Edgar E. Iglesias
2008-05-08 21:28 ` Aurelien Jarno
2008-05-08 22:26   ` Edgar E. Iglesias [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080508222628.GD10080@edgar.se.axis.com \
    --to=edgar.iglesias@axis.com \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).