Add new implementation of math library (libmcs), remove math library dependency from strtod.c#460
Add new implementation of math library (libmcs), remove math library dependency from strtod.c#460ayoopierre wants to merge 3 commits intomasterfrom
Conversation
Summary of ChangesHello @ayoopierre, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly upgrades the project's mathematical capabilities by integrating a new, robust math library, 'libmcs'. This change not only broadens the range of supported mathematical functions and improves compliance with industry standards but also introduces a more modular and configurable approach to managing math implementations. The existing 'libphoenix' math code has been reorganized to coexist, providing flexibility for different project requirements and hardware constraints. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces the libmcs math library (v1.3.0) as an alternative implementation for critical systems and refactors the existing libphoenix math implementation into a separate directory. It also removes the math library dependency from strtod.c. The changes include a new libm/Makefile to select between implementations and a configure script for libmcs. My review identified a few critical logic errors in the libm/Makefile and the libphoenix implementation, as well as a syntax bug in the configure script.
libm/Makefile
Outdated
| LIBM_WANT_COMPLEX ?= y | ||
|
|
||
| # Set options for denormals on the FPU | ||
| ifeq ($(LIBMCS_WANT_DAZ), y) |
| while true | ||
| do | ||
| if [ -z ${extra_cflags+x} ]; then read -r extra_cflags; fi | ||
| if $($CC -c ${sizecheck} ${extra_cflags}); then |
There was a problem hiding this comment.
The use of $() here is incorrect. It will attempt to execute the output of the compiler command as a shell command. Since a successful compilation typically produces no output to stdout, this will result in a shell syntax error. It should simply execute the command and check its exit status.
if $CC -c ${sizecheck} ${extra_cflags}; then
196c1aa to
ebb5432
Compare
JIRA: RTOS-1132
JIRA: RTOS-1132
JIRA: RTOS-1132
ebb5432 to
4d39af1
Compare
Add new implementation of math library (libmcs v1.3.0).
Description
Add new implementation of math library (libmcs), move libphoenix implementation of math library, remove dependency of strtod.c on math library. Current configuration will fail to compile on ia32 because of patches on micropython applied before compilation.
Motivation and Context
Adding complete math library implementation with extensions for critical applications
Types of changes
How Has This Been Tested?
Checklist:
Special treatment