diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-11-04 12:11:58 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-05 04:22:34 +0000 |
commit | 252457d4b21f46889eebad61d4c0a65331919cec (patch) | |
tree | 01856c4d31d710b20e85a74c8d7b5836e35c3b98 /zephyr/fpu.cmake | |
parent | 08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff) | |
download | chrome-ec-stabilize-voshyr-14637.B-ish.tar.gz |
ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ish
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'zephyr/fpu.cmake')
-rw-r--r-- | zephyr/fpu.cmake | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/zephyr/fpu.cmake b/zephyr/fpu.cmake deleted file mode 100644 index 5f1c698b15..0000000000 --- a/zephyr/fpu.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2021 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -#[[ -Disclaimer: the following example is pieced together from -https://lemire.me/blog/2020/06/26/gcc-not-nearest/ along with other information -found in GCC documentation. - -The following flags are needed to to ensure consistent FPU rounding in unit -tests. For example using GNU GCC 7.5 rounds down. Note that at the time of -writing, Clang 13.0.0 passes all the FPU unit tests without these flags. - -Some of the sensor logic which requires FPU support is susceptible to rounding -errors. In GCC 7.5, as an example: - - double x = 50178230318.0; - double y = 100000000000.0; - double ratio = x/y; - -In this example, we would expect ratio to be 0.50178230318. Instead, using a -64-bit float, it falls between: -* The floating-point number 0.501782303179999944 == 4519653187245114 * 2 ** -53 -* The floating-point number 0.501782303180000055 == 4519653187245115 * 2 ** -53 - -The real mantissa using the same logic should be: -0.50178230318 = 4519653187245114.50011795456 * 2 ** -53 - -Since the mantissa's decimal is just over 0.5, it should stand to reason that -the correct solution is 0.501782303180000055. To force GCC to round correctly -we must set the following modes: -1. 'sse' - Generate SSE instructions. -2. 'fpmath=sse' - Use scalar floating-point instructions present in the SSE - instruction set. -3. 'arch=pentium4' - Choose the Pentium4 because it's a stable choice that - supports SSE and is known to work (there may be other good choices). -]] -if(DEFINED CONFIG_SOC_POSIX) - zephyr_cc_option(-msse -mfpmath=sse -march=pentium4) -endif() |