aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/Makefile.inc
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2020-07-01 19:18:34 -0700
committerJulius Werner <jwerner@chromium.org>2020-07-09 00:32:11 +0000
commit96b00a50f14e3e41eaf69171945ceeb587b4fe0b (patch)
treee6fb5915dead4c50130fd38977e8830a0fd0d52f /payloads/libpayload/libc/Makefile.inc
parent56b2550316327efa38d3755128ea8652b1253efb (diff)
libpayload: Add simple 32.32 fixed-point math API
struct fraction is slooooooooooow. This patch adds a simple 64-bit (32-bits integral, 32-bits fractional) fixed-point math API that is *much* faster (observed roughly 5x speed-up) when doing intensive graphics operations. It is optimized for speed over accuracy so some operations may lose a bit more precision than expected, but overall it's still plenty of bits for most use cases. Also includes support for basic trigonometric functions with a small lookup table. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Id0f9c23980e36ce0ac0b7c5cd0bc66153bca1fd0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/42993 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'payloads/libpayload/libc/Makefile.inc')
-rw-r--r--payloads/libpayload/libc/Makefile.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/Makefile.inc b/payloads/libpayload/libc/Makefile.inc
index 2999023da8..f9006ae471 100644
--- a/payloads/libpayload/libc/Makefile.inc
+++ b/payloads/libpayload/libc/Makefile.inc
@@ -38,3 +38,4 @@ libc-$(CONFIG_LP_LIBC) += hexdump.c
libc-$(CONFIG_LP_LIBC) += die.c
libc-$(CONFIG_LP_LIBC) += coreboot.c
libc-$(CONFIG_LP_LIBC) += fmap.c
+libc-$(CONFIG_LP_LIBC) += fpmath.c