david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

7 Commits

Author SHA1 Message Date
Michael Brown 79697c75ee [libc] Add ffs(), ffsl(), and ffsll()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-16 15:40:53 +00:00
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown d36e814b8a [libc] Add flsll()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-27 16:56:09 +01:00
Michael Brown 3ffd309375 [libc] Add isqrt() function to find integer square roots
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-26 18:19:49 +01:00
Michael Brown 9e8c48deea [test] Check for correct -mrtd assumption on libgcc arithmetic functions
As observed in commit 082cedb ("[build] Fix __libgcc attribute for
recent gcc versions"), recent versions of gcc have changed the
semantics of -mrtd as applied to the implicit arithmetic functions.

It is possible for tests to succeed even if our assumptions about
gcc's interpretation of -mrtd are incorrect.  In particular, if gcc
chooses to utilise a frame pointer in the calling function, then it
can tolerate a temporarily incorrect stack pointer (since the stack
pointer will shortly afterwards be restored from the frame pointer
anyway).

Add tests designed specifically to check that our implementations of
the implicit arithmetic functions manipulate the stack pointer as
expected by gcc.

The effect of these tests can be observed by temporarily reverting
commit 082cedb ("[build] Fix __libgcc attribute for recent gcc
versions"): without this fix in place, the tests will fail on gcc 4.7
and later.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-26 16:00:26 +01:00
Michael Brown ad7d5af5e1 [test] Add tests for 64-bit division
On a 32-bit system, 64-bit division is implemented using the libgcc
functions provided in __udivmoddi4.c etc.  Calls to these functions
are generated automatically by gcc, with a calling convention that is
somewhat empirical in nature.  Add these self-tests primarily as a
check that we are using the correct calling convention.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-25 01:45:13 +01:00
Michael Brown 8f0e0e1356 [test] Add self-tests for flsl()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-24 13:40:35 +01:00