sim cris: Unbreak --disable-sim-hardware builds
authorHans-Peter Nilsson <hp@axis.com>
Mon, 14 Feb 2022 22:51:02 +0000 (23:51 +0100)
committerHans-Peter Nilsson <hp@bitrange.com>
Mon, 14 Feb 2022 22:51:02 +0000 (23:51 +0100)
commite7e980c6fa1205495ec66741da916f0b25941963
tree9ca4e89cd2faf488baeb67107e431e808dfdec97
parent6f62dbfb12f586691ef57878b7680cc2b02d81c4
sim cris: Unbreak --disable-sim-hardware builds

With --disable-sim-hardware (--enable-sim-hardware=no),
whose default was changed to --enable-sim-hardware(=yes) in
commit 34cf51120683, building for cris-elf fails as
sim_hw_parse then doesn't exist.

A cris-elf simulator configured for --enable-sim-hardware
(or the default after to the mentioned commit) runs about
2.5x slower than one configured --disable-sim-hardware.
A further 2-5% performance regression was not investigated.

When sim_hw_parse doesn't exist, --cris-900000xx can't be
supported.  The best action here is to remove it completely,
so its absence can be identified through --help, but
avoiding littering the code with "#if WITH_HW".

sim/cris:
* sim-if.c (cris_options) [WITH_HW]: Conditionalize
support of option --cris-900000xx.
(sim_open) [WITH_HW]: Conditionalize sim_hw_parse
call.
sim/cris/sim-if.c