diff mbox

[1/9] target-sh4: switch sh4 to softfloat

Message ID 1294779698-17694-2-git-send-email-aurelien@aurel32.net
State New
Headers show

Commit Message

Aurelien Jarno Jan. 11, 2011, 9:01 p.m. UTC
We need to be able to catch exceptions correctly.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Nathan Froyd Jan. 11, 2011, 9:22 p.m. UTC | #1
On Tue, Jan 11, 2011 at 10:01:30PM +0100, Aurelien Jarno wrote:
>  case "$target_arch2" in
> -  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sparc|sparc64|sparc32plus)
> +  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sh4|sh4eb|sparc|sparc64|sparc32plus)
>      echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
>      ;;
>    *)

This is obvious, I think...but it's also a little ridiculous.  Why not
make everything use softfloat and dispense with this?  How much work
would it be on the x86 side?

-Nathan
Peter Maydell Jan. 11, 2011, 9:35 p.m. UTC | #2
On 11 January 2011 15:22, Nathan Froyd <froydnj@codesourcery.com> wrote:
> On Tue, Jan 11, 2011 at 10:01:30PM +0100, Aurelien Jarno wrote:
>>  case "$target_arch2" in
>> -  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sparc|sparc64|sparc32plus)
>> +  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sh4|sh4eb|sparc|sparc64|sparc32plus)
>>      echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
>>      ;;
>>    *)
>
> This is obvious, I think...but it's also a little ridiculous.  Why not
> make everything use softfloat and dispense with this?  How much work
> would it be on the x86 side?

If we don't want to do that I guess we could at least change to

case "$target_arch2" in
  i386|x86_64|cris)    # I think this list is right :-)
    echo "CONFIG_NOSOFTFLOAT=y" >> $config_target_mak
    ;;
  *)
    echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
    ;;
esac

?

-- PMM
Aurelien Jarno Jan. 11, 2011, 9:44 p.m. UTC | #3
On Tue, Jan 11, 2011 at 01:22:08PM -0800, Nathan Froyd wrote:
> On Tue, Jan 11, 2011 at 10:01:30PM +0100, Aurelien Jarno wrote:
> >  case "$target_arch2" in
> > -  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sparc|sparc64|sparc32plus)
> > +  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sh4|sh4eb|sparc|sparc64|sparc32plus)
> >      echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
> >      ;;
> >    *)
> 
> This is obvious, I think...but it's also a little ridiculous.  Why not
> make everything use softfloat and dispense with this?  How much work
> would it be on the x86 side?
> 

On the x86 target, the problem is that it doesn't compile with
softfloat. OTOH, I think it is the way to go, as for example emulating
an x86 machine on ARM, even if you don't care about the exception flags,
the precision is not correct.
Aurelien Jarno Jan. 11, 2011, 9:45 p.m. UTC | #4
On Tue, Jan 11, 2011 at 03:35:33PM -0600, Peter Maydell wrote:
> On 11 January 2011 15:22, Nathan Froyd <froydnj@codesourcery.com> wrote:
> > On Tue, Jan 11, 2011 at 10:01:30PM +0100, Aurelien Jarno wrote:
> >>  case "$target_arch2" in
> >> -  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sparc|sparc64|sparc32plus)
> >> +  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sh4|sh4eb|sparc|sparc64|sparc32plus)
> >>      echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
> >>      ;;
> >>    *)
> >
> > This is obvious, I think...but it's also a little ridiculous.  Why not
> > make everything use softfloat and dispense with this?  How much work
> > would it be on the x86 side?
> 
> If we don't want to do that I guess we could at least change to
> 
> case "$target_arch2" in
>   i386|x86_64|cris)    # I think this list is right :-)

AFAIK, cris doesn't use fpu functions at all, so it can be in both side
without any visible effects.

>     echo "CONFIG_NOSOFTFLOAT=y" >> $config_target_mak
>     ;;
>   *)
>     echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
>     ;;
> esac
> 
> ?
> 
> -- PMM
>
Edgar E. Iglesias Jan. 11, 2011, 10:02 p.m. UTC | #5
On Tue, Jan 11, 2011 at 03:35:33PM -0600, Peter Maydell wrote:
> On 11 January 2011 15:22, Nathan Froyd <froydnj@codesourcery.com> wrote:
> > On Tue, Jan 11, 2011 at 10:01:30PM +0100, Aurelien Jarno wrote:
> >>  case "$target_arch2" in
> >> -  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sparc|sparc64|sparc32plus)
> >> +  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sh4|sh4eb|sparc|sparc64|sparc32plus)
> >>      echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
> >>      ;;
> >>    *)
> >
> > This is obvious, I think...but it's also a little ridiculous.  Why not
> > make everything use softfloat and dispense with this?  How much work
> > would it be on the x86 side?
> 
> If we don't want to do that I guess we could at least change to
> 
> case "$target_arch2" in
>   i386|x86_64|cris)    # I think this list is right :-)

Hi,

CRIS doesn't have an FPU so it can go aswell..

Cheers
diff mbox

Patch

diff --git a/configure b/configure
index 831a741..73485c5 100755
--- a/configure
+++ b/configure
@@ -3049,7 +3049,7 @@  if test ! -z "$gdb_xml_files" ; then
 fi
 
 case "$target_arch2" in
-  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sparc|sparc64|sparc32plus)
+  alpha|arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sh4|sh4eb|sparc|sparc64|sparc32plus)
     echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
     ;;
   *)