summaryrefslogtreecommitdiffstats
path: root/src/tests/tests.c
diff options
context:
space:
mode:
authorMichael Brown2014-04-26 17:00:26 +0200
committerMichael Brown2014-04-26 17:00:26 +0200
commit9e8c48deea90a601fdd45e8d7428d4eceb7e6a39 (patch)
tree0f564bc7431296e7650a5573cdd5a33792a68cb6 /src/tests/tests.c
parent[build] Fix __libgcc attribute for recent gcc versions (diff)
downloadipxe-9e8c48deea90a601fdd45e8d7428d4eceb7e6a39.tar.gz
ipxe-9e8c48deea90a601fdd45e8d7428d4eceb7e6a39.tar.xz
ipxe-9e8c48deea90a601fdd45e8d7428d4eceb7e6a39.zip
[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>
Diffstat (limited to 'src/tests/tests.c')
0 files changed, 0 insertions, 0 deletions