qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] FP emulation bugs for x86_64-softmmu


From: Julian Seward
Subject: [Qemu-devel] FP emulation bugs for x86_64-softmmu
Date: Wed, 10 Oct 2007 13:38:35 +0200
User-agent: KMail/1.9.5

Some x86_64 SSE2 instructions that convert floats to ints appear
to ignore the rounding mode (in mxcsr), and so produce wrong results
if mxcsr is set to anything other than default rounding.  For example
cvtsd2si et al.

I'm looking at softfloat-native.c and softfloat.c and wondering how
to fix it.  A couple of questions:

* is softfloat-native.c intended to handle such corner cases as 
  accurately as softfloat.c ?

* is it possible to build x86_64-softmmu to use softfloat.c 
  rather than softfloat-native.c?

  I hacked ./configure to use CONFIG_SOFTFLOAT for x86_64 (added
  x86_64 as a softfloat cpu in test at line 1095), but the build
  then dies like this:

  target-i386/exec.h:296: warning: conflicting types for built-in
  function 'sinl'
  target-i386/exec.h:297: warning: conflicting types for built-in  
  function 'cosl'
  target-i386/exec.h:298: warning: conflicting types for built-in
  function 'sqrtl'
  target-i386/exec.h:299: warning: conflicting types for built-in
  function 'powl'
  target-i386/exec.h:300: warning: conflicting types for built-in
  function 'logl'
  target-i386/exec.h:301: warning: conflicting types for built-in
  function 'tanl'
  target-i386/exec.h:302: warning: conflicting types for built-in
  function 'atan2l'
  target-i386/exec.h:303: warning: conflicting types for built-in
  function 'floorl'
  target-i386/exec.h:304: warning: conflicting types for built-in
  function 'ceill'
  target-i386/exec.h: In function `helper_fldt':
  target-i386/exec.h:440: error: incompatible types in return
  target-i386/exec.h: In function `helper_fstt':
  target-i386/exec.h:447: error: incompatible types in assignment
  (many more errors like this follow)

  Is this some minor compile bug, or is it the case that x86_64-softmmu
  (and i386-softmmu) is not intended to use softfloat.c?

J




reply via email to

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