No float is probably important for OS kernel and device driver developers.

The kernel of an operating system will usually not save the floating point registers during a context switch (to the kernel). For this reason its important the compiler can guarantee never to use floating point numbers or the registers.

Removing such a flag may prevent the compiler being used to write things like Linux device drivers. I know this is usually done in C, but there might be an OS in D one day.


On 23/04/2014 10:22 AM, Mike via Digitalmars-d wrote:
On Tuesday, 22 April 2014 at 23:57:49 UTC, Andrej Mitrovic wrote:
See: https://issues.dlang.org/show_bug.cgi?id=8196

Are there any D platforms where -nofloat is useful? If we're not
getting rid of it then it needs to be documented (the above issue).

Well, I couldn't find any documentation on what this means, so I can't
really say.  Does it disable floating point usage completely, or does it
force software emulation?

There are a couple people in this community interested in bringing D to
32-bit microcontrollers. Most of the 32-bit ARM Cortex microcontrollers
don't have an FPU.  For the few that do, here are the attributes in GCC
(http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html) needed to specify
the configuration.

-mfloat-abi=name
-mfpu=name
-mfp16-format=name

But, these are target specific. Since DMD doesn't support any ARM
platform, I suspect this is irrelevant, but there, you have it anyway.

Mike


Reply via email to