Start adding target-specific selftests
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 4 Nov 2016 17:05:38 +0000 (17:05 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 4 Nov 2016 17:05:38 +0000 (17:05 +0000)
commit40af58948573d619b5dfceff3ba5463771a48d50
treef0c2a3dd53e078735d3c7fce70972ff6c1f0ac97
parentd7d2e7b46753eea479159d23b6451c341f6e8f94
Start adding target-specific selftests

gcc/ChangeLog:
* config/i386/i386.c: Include "selftest.h" and "selftest-rtl.h".
(selftest::ix86_test_dumping_hard_regs): New function.
(selftest::ix86_run_selftests): New function.
(TARGET_RUN_TARGET_SELFTESTS): When CHECKING_P, wire this up to
selftest::ix86_run_selftests.
* doc/tm.texi.in (TARGET_RUN_TARGET_SELFTESTS): New.
* doc/tm.texi: Regenerate
* selftest-rtl.h: New file.
* rtl-tests.c: Include "selftest-rtl.h".
(selftest::assert_rtl_dump_eq): Make non-static.
(ASSERT_RTL_DUMP_EQ): Move to selftest-rtl.h.
(selftest::test_dumping_regs): Update comment.
* selftest-run-tests.c: Include "target.h".
(selftest::run_tests): If non-NULL, call
targetm.run_target_selftests.
* target.def (run_target_selftests): New hook.

From-SVN: r241851
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/rtl-tests.c
gcc/selftest-rtl.h [new file with mode: 0644]
gcc/selftest-run-tests.c
gcc/target.def