[wdmaudiodev] Re: Floating Point in the Kernel

  • From: Devendra Parakh <parakh@xxxxxxxxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx, <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 23 Oct 2002 12:57:59 -0700

 Another related question:

When using floating point in the driver, the compiler generates calls to the
floating point library! 

There're references to fltused (I think I can get rid of that by defining my
own fltused!), and __ftol.

Why does the compiler need to call ftol - can it not use the FPU to do this?

The line that seems to cause this call is:

*((int *)&data) = (int)fData;

where fData is a float.

Please note that the following line does not require ftol, why?

*((int *)&data) = (int)(float)1.0;

Is there a compiler define? Or will I have to roll my own ftol!

Any help would be greatly appreciated!

Thanks.

Devendra.


At 05:48 PM 10/22/2002, Noel Cross wrote:

Check out the DDK article:=20

http://msdn.microsoft.com/library/default.asp?url=3D/library/en
-us/kmarch[1]=
/
hh/kmarch/k105_91de.asp

Regards,
Noel Cross
Development Lead, Audio/Video Devices Group

This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Devendra Parakh [mailto:parakh@xxxxxxxxxxxxxxxxxxxx]=20[2]
Sent: Tuesday, October 22, 2002 2:16 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Floating Point in the Kernel

 Hi,

What are the restrictions for using floating point in the kernel?

All I need to do is convert between 32bit ints and 32bit floats.

I think I can use FLOATOBJ, but I was hoping for a better alternative.

The driver will only run under Windows XP, so ME/9x is not really a
concern
for me.

Thanks.

Devendra.
Devendra Parakh Singing Electrons, Inc.
http://www.singingelectrons.com[1[3]]
425-889-2478=20

--- Links ---
   1 http://www.singingelectrons.com/[4]
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx[5]
Subscribe:    =
mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=3Dsubscribe[6]
Unsubscribe:
mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=3Dunsubscribe[7]
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx[8]

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/[9]

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx[10]
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe[11]
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe[12]
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx[13]

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/[14]
Devendra Parakh Singing Electrons, Inc. http://www.singingelectrons.com[15]
425-889-2478 

--- Links ---
   1 http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/kmarch
   2 mailto:parakh@xxxxxxxxxxxxxxxxxxxx%5D=20
   3 http://www.singingelectrons.com[1/
   4 http://www.singingelectrons.com/
   5 mailto:wdmaudiodev@xxxxxxxxxxxxx
   6 mailto:wdmaudiodev-request@xxxxxxxxxxxxx%3Fsubject=3Dsubscribe
   7 mailto:wdmaudiodev-request@xxxxxxxxxxxxx%3Fsubject=3Dunsubscribe
   8 mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
   9 http://www.wdmaudiodev.de/
  10 mailto:wdmaudiodev@xxxxxxxxxxxxx
  11 mailto:wdmaudiodev-request@xxxxxxxxxxxxx%3Fsubject=subscribe
  12 mailto:wdmaudiodev-request@xxxxxxxxxxxxx%3Fsubject=unsubscribe
  13 mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
  14 http://www.wdmaudiodev.de/
  15 http://www.singingelectrons.com/
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: