diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2014-11-27 18:50:14 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-03-21 01:39:59 +0100 |
commit | e63990ef34f39419d12ab9211d44621dc3768198 (patch) | |
tree | 00c1491de8c000abe287b59618195f8f7be9a067 /payloads/libpayload/libc/Makefile.inc | |
parent | 17ada2e03946a5ae81f1a43e286c6ad57d558d97 (diff) |
libpayload: provide basic 64bit division implementation
These functions are usually provided by gcc lib, which is not supposed
to be included on embedded platforms. This patch adds a no thrills C
implementation.
Other than MIPS platforms are happy using the gcc library provided
implementation, but in case of Chrome OS MIPS toolchain the libraries
are compiled with the small GOT, such that the entire data segment
does not fit.
With this implementation mips, arm and x86 targets build fine.
BRANCH=none
BUG=chrome-os-partner:31438
TEST=checked the logic by incorporating this code into a C file and
running a loop continuously comparing random inputs' division and
left and right shift results.
The test ran for extended periods of time without failure.
Change-Id: I468acd2fdbcdd493a76758a394e79cad35f9535a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 2cc5f8668dd2609408af8da5a74c5a3d063fc0d3
Original-Change-Id: Ib46616d7eb0b2b497199270057514f730bb1cb0b
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/232232
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8742
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'payloads/libpayload/libc/Makefile.inc')
-rw-r--r-- | payloads/libpayload/libc/Makefile.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/Makefile.inc b/payloads/libpayload/libc/Makefile.inc index bd2a6f7595..b4f75a6cb5 100644 --- a/payloads/libpayload/libc/Makefile.inc +++ b/payloads/libpayload/libc/Makefile.inc @@ -41,3 +41,7 @@ libc-$(CONFIG_LP_LIBC) += coreboot.c # should be moved to coreboot directory libc-$(CONFIG_LP_LAR) += lar.c + +ifeq ($(CONFIG_LP_ARCH_MIPS),y) +libc-$(CONFIG_LP_LIBC) += 64bit_div.c +endif |