Travis Geiselbrecht 9c67917dd7 [fpu] Implement two versions of all of the printf routines: with and without fpu support
The default printf and family will now not implement FPU support, a
second copy of the routines will be generated with the _float suffix.

ie, printf() has no %f support, but printf_float() does.

This is to avoid the default printf from emitting any floating point
instructions when used within core kernel code which has been an off and
on problem for years, especially on architectures that are eager to use
fpu/vector instructions for regular non-fpu code.

If FPU is not implemented on the arch, the *_float routines will alias
to the integer only one.

Perhaps a much more proper solution is to invert this and require every
caller of printf that cannot tolerate fpu codegen (which in mainline is
most of it) use a _nofloat implementation, but this would touch
pratically all printfs in mainline.

This solution acknowledges that for the most part most of the code in
mainline is in-kernel support code, and doesn't need floating point,
except for perhaps some app/* code, which already can opt in.

This solution also can potentially bloat the size of the binary by
having two complete implementations, though I think in practice the
architectures where the extra few KB of code will matter generally dont
have FPU support, or aren't using it. In the latter case the
link-time-gc should remove unused _float routines.
2025-10-08 23:51:06 -07:00
2025-10-05 13:56:55 -07:00
2025-07-28 12:48:11 -07:00
2015-01-29 20:38:19 -08:00

The Little Kernel Embedded Operating System

The LK kernel is an SMP-aware kernel designed for small systems ported to a variety of platforms and cpu architectures.

It is used in a variety of open source and closed source projects, notably the bootloader for a lot of Android phones of various make.

See https://github.com/littlekernel/lk for the latest version.

For comprehensive documentation, see Index.

High Level Features

  • Fully-reentrant multi-threaded preemptive kernel
  • Portable to many 32 and 64 bit architectures
  • Support for wide variety of embedded and larger platforms
  • Powerful modular build system
  • Large number of utility components selectable at build time

Supported architectures

  • ARM32
    • Cortex-M class cores (armv6m - armv8m)
    • ARMv7+ Cortex-A class cores
  • ARM64
    • ARMv8 and ARMv9 cores
  • RISC-V 32 and 64bit bit in machine and supervisor mode
  • x86-32 and x86-64
  • Motorola 68000
  • Microblaze
  • MIPS
  • OpenRISC 1000
  • VAX (experimental)
Description
No description provided
Readme MIT 39 MiB
Languages
C 80.6%
C++ 10.8%
Assembly 3.6%
Makefile 3.4%
Python 1%
Other 0.6%