Commit Graph

153 Commits

Author SHA1 Message Date
Jacob Young
a8783fe21f Remove a duplicate function, cleanup sorting and use consistent argument names in math.h.
Add missing math.h tests and make each test a single line for easier comparison with math.h.
Add missing cmath undefs and functions and use constexpr instead of static.
2020-03-16 15:00:40 +01:00
Romain Goyet
269305c68f [liba] Simplify strlcat 2020-02-17 10:31:24 -05:00
Romain Goyet
02a19fc83d [liba] Add strlcat 2020-02-17 10:31:24 -05:00
Romain Goyet
dc4f43eeb0 [liba] Improve strlcpy
Use memcpy (can be optimized) and return the correct size
2020-02-17 10:31:24 -05:00
Léa Saviot
0a21ed2cfb [liba] strlcpy third argument in size, not length 2020-02-12 15:13:17 +01:00
Léa Saviot
0a1c6a3d1d [poincare/tree_pool] Store node offsets, not node pointers
This saves place because we store uint16_t, not uint32_t
2020-02-12 15:13:16 +01:00
Émilie Feral
36278b5aec Merge branch 'master' into version-12 2019-09-18 11:00:03 +02:00
Romain Goyet
9db16997af [liba] Update the bool type to use _Bool
_Bool is defined in C99 which we use already. In practice it's 1 byte
just like char, so this shouldn't have any impact on the built object.

But this patch removes LTO errors when linking C code with C++ code.
Indeed, the linker would raise type mismatch because in C++ bool is
defined to _Bool whereas in C it would be defined to char.
2019-09-18 10:52:20 +02:00
Émilie Feral
059c596a80 Makefiles: avoid building all sources for each target; introduce more
modularity
2019-08-08 17:22:01 +02:00
Émilie Feral
51284296e7 [ion][liba] Add 'noinline' attribute for symbols that have to be in
internal flash (we don't need to consider these symbol dependencies
though)
2019-08-08 15:54:42 +02:00
Léa Saviot
a450ce3855 Merge branch 'master' into f7 2019-08-06 17:40:14 +02:00
Ruben Dashyan
f8fd654157 [liba/stdint] Define int16_t limits 2019-07-30 14:15:08 +02:00
Romain Goyet
d8199ff186 [liba] Define calloc
To silence a warning in LZ4. The code is not even built.
2019-05-28 16:47:03 +02:00
Romain Goyet
4f1d74f44b [build] Use an out-of-tree build 2019-03-06 15:00:59 +01:00
Ruben Dashyan
efde8c6c9e [liba] Add strncmp 2018-11-23 12:04:05 +01:00
Damien Nicolet
79bfc7f112 [code] time module 2018-11-09 01:30:22 +01:00
Romain Goyet
fc80180d46 [liba] Define ptrdiff_t 2018-10-19 10:59:17 +02:00
Léa Saviot
1467d67c0b [liba] Fix strlcpy test 2018-10-17 11:22:37 +02:00
Léa Saviot
d12da1459a [liba] strlcpy(dst, src, dstsize) returns strlen(src) 2018-10-17 11:22:37 +02:00
Romain Goyet
6f7063dfda [liba] Make sure memset and memcpy are always kept at link time
Works around a bug in GCC
2018-10-12 14:39:26 +02:00
Émilie Feral
c95c3145bc Merge remote-tracking branch 'github/master' into Tree 2018-09-13 17:03:31 +02:00
Émilie Feral
a1bcbe28e6 [quiz] Turn all assert in quiz_assert 2018-08-28 10:40:52 +02:00
Romain Goyet
40f499b594 Switch to libgcc entierly when using gcc as a toolchain 2018-08-24 17:44:35 +02:00
Damien Nicolet
a4abd5e34c Add option USE_LIBGCC to link agains libgcc instead of liba softfloat implementation. 2018-08-24 17:44:35 +02:00
Émilie Feral
e7619633bd [liba] Add fmax in math.h header 2018-07-18 16:32:49 +02:00
Émilie Feral
2a05247629 [liba] Add hypot in math.h header 2018-07-18 16:32:49 +02:00
Romain Goyet
55e4c955f4 Upgrade to MicroPython 1.9.3 2018-04-09 14:43:15 +02:00
Émilie Feral
ecb7ec403a [liba] Use softfloat IEEE754 getters implementation instead of
re-implementing them
2018-03-21 15:54:58 +01:00
Émilie Feral
e7963332f6 [liba] Wrong signature in EABI implementation 2018-02-09 21:44:13 +01:00
Émilie Feral
90a75a320b [liba] Add __aeabi_ul2d implementation 2018-01-23 10:24:52 +01:00
Émilie Feral
3f0328f5b5 Add assertions for dangerous bit shift that could trigger undefined
behaviour

Change-Id: I051ed229d407eafcae1ea4b5fc745176a751e036
2017-12-01 11:53:55 +01:00
Léa Saviot
92789330de [code] Search function in the code Toolbox.
When the user types a letter, the toolbox scrolls to the first row that begins
with said letter (without considering if it is lower or upper case). If
there is not such a row, the toolbox scrolls to the first row that has a
letter higher than the typed letter.

Change-Id: I353d23560d8a4d618d96426c393b024e7fb487af
2017-11-21 17:30:04 +01:00
Léa Saviot
fe3d470d2d [liba] Fixed Gamma function bug.
There was a problem with the definition of ldexp, used in b_log__D.c

Change-Id: I83d012815e38b76efa730c1a3d259ec276e15f11
2017-11-17 14:05:23 +01:00
Léa Saviot
5de4b5cd67 [code] Each script has a name, stored in the accordeon buffer.
A script can now be imported in the console.
Moved all the MicroPython functions to python/port files.

Change-Id: I0a23e8cb20005719b800e81470e1c574c702c3b7
2017-11-17 11:59:50 +01:00
Romain Goyet
f265822792 [liba] Add extra math functions (erf erfc log2 logb tgamma rint scalb) 2017-11-17 11:59:49 +01:00
Romain Goyet
0ca52e201f [liba] Add extra libm symbols (ldexp, fmod, trunc, atan2) 2017-11-17 11:59:49 +01:00
Romain Goyet
3adc5d9fac Use OpenBSD 4.9's libm
This version still has all the double function (and not the long-double
ones). And apart from this, it's virtually identical to the 6.0 code.
2017-11-17 11:59:49 +01:00
Romain Goyet
b9e83231e6 [liba] Add extra math functions (frexpf, modff, truncf) 2017-11-17 11:59:49 +01:00
Romain Goyet
e46d157fe6 Add a bridge for a missing alloca.h on windows 2017-11-12 02:10:19 +01:00
Romain Goyet
b671a812e1 [liba] Mark abort() as noreturn
Fix #213
2017-10-20 19:59:45 +02:00
Romain Goyet
5a2446eff7 [liba] Proper support for function-like macros for math functions 2017-10-19 17:31:40 +02:00
Jacob Young
f2b7f92d71 Merge in upstream openbsd commit yu8HfTXRTrrv8b2W which allows isnanf, isnand, isinff, and isinfd to be deleted. 2017-10-13 18:08:15 +02:00
Jacob Young
da1e66e798 Fix #115 by fixing the math.h and cmath includes. 2017-10-13 18:08:15 +02:00
Émilie Feral
feeec6b826 [escher] Add behaviour for end and origin events
Change-Id: I363dad3c566289a285179a9f26d3a779f0ff812f
2017-09-27 10:28:16 +02:00
Jacob Young
4d9e8c40b8 Fix #102. 2017-09-21 13:32:27 +02:00
Jacob Young
7e2cc375d2 Fix potential overflow in complex radius calculation. 2017-09-20 12:04:35 +02:00
Jacob Young
2a2112396e ARM only has 32-bit integer registers, so using types smaller than 32-bits produces larger/slower code. 2017-09-18 15:13:00 +02:00
Émilie Feral
9ac25fc03a Repair windows build 2017-09-06 10:05:17 +02:00
Émilie Feral
925f404382 [liba] Add aeabi long conversion 2017-08-31 15:17:22 +02:00
Adrien Bertrand
f34bf67bab build: fix warnings
* escher/src/text_area.cpp:113:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
* liba/src/external/openbsd/k_rem_pio2f.c:66:54: disable -Wmisleading-indentation
2017-08-30 13:01:22 +02:00