Problems with float in a kext
My global or class member floats behave weird since I use 10.2 and gcc 3.1. For example, I define globally: float a=1.5, b=1000; Then, in some random startup function (called from an Init() function) I do: IOLog("%ld, %ld, %ld, %ld\n", (UInt32)(0.5*1000), (UInt32)(a*1000), (UInt32)b, (UInt32)(a*b)); and the result is: Dec 6 16:03:47 Hyp mach_kernel: 500, -1, -1, -2147483648 What's wrong here? I know that kernel code usually uses float emulation. I couldn't find out which steps to take to activate the emulation. I tried -msoft-float for compiling and linking, but that did not help. Note that this worked with my 10.1.5 dev environment! Thanks Heiko Panther _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Heiko Panther