Commit graph

9 commits

Author SHA1 Message Date
Adrian Danis
5552c6c6d9 mark memset and memcpy as VISIBLE
When compiling the kernel as a whole program it is possible that these functions may
be inlined and not emitted in the resulting binary. However at the same time the
compiler may itself emit calls to these functions. Marking these functions as
externally visible tells the compiler that there may be more usages of them than
it sees immediately in the source code, in this cases usages that the compiler
itself is going to generate
2017-06-16 14:25:50 +10:00
Matthew Fernandez
d36447b35f Mark strncmp as a pure function.
Simply a performance optimisation. This has no effect on functional behaviour.
2016-06-29 17:04:28 +10:00
Matthew Fernandez
8a6ebc05fd trivial: fix comment typo. 2016-06-10 10:34:45 +10:00
Adrian Danis
21d9f7aeab Add 'used' attribute to memcpy to prevent optimizing out
Some versions of GCC replace a struct copy with a call to 'memcpy',
which it is fully in its rights to do. Unfortunately on ARM platforms,
that have no direct calls to memcpy, the optimizer (in the presence
of -fwhole-program) drops the implementation of memcpy, even as it
is outputting calls to it.

Add the USED attribute prevents the optimizer from dropping the
function eagerly.
2016-01-28 10:36:24 +11:00
Adrian Danis
0ecff9f393 unsigned int -> word_t 2015-12-10 10:45:21 +11:00
Adrian Danis
3ef267618d Make utility functions 64bit friendly 2015-12-10 10:45:19 +11:00
Adrian Danis
0625f85faf Inform the compiler that the writes in memzero may alias with other memory 2015-09-10 15:21:21 +10:00
Thomas Sewell
67d8d041de Ghost assertions about max object size. 2015-07-14 14:15:27 +10:00
TrusthworthySystems
91b7da8625 Release snapshot 2014-07-18 05:03:59 +10:00