binutils-gdb/sim
Mike Frysinger bbda248c50 sim: v850: fix cpu_option testsuite handling
The v850 testsuite code has been testing the $opt variable, but this
was never actually set anywhere globally or v850-specific.  Instead,
this was a random variable leaking out of the sh testsuite code.  As
far as I can tell, it has always been this way.  That means the code
only ever tested the v850 cpu target (which is the default).

This failure can be easily seen in practice by running the v850 code
in isolation and seeing it crash:
$ runtest v850/allinsns.exp
...
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../sim/testsuite/config/default.exp as tool-and-target-specific interface file.
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.
Running ../../../sim/testsuite/v850/allinsns.exp ...
ERROR: tcl error sourcing ../../../sim/testsuite/v850/allinsns.exp.
ERROR: tcl error code TCL LOOKUP VARNAME opt
ERROR: can't read "opt": no such variable
    while executing
"switch -regexp -- $opt {

Backing up a bit, the reason for this logic in the first place is
because the common sim testsuite code makes an assumption about the
assembler options with cpu_option -- the option and its value are
always separated by an =.  This is not the case with v850.  So tweak
the core sim logic a bit to support omitting the = so that we can
switch v850 to the standard all_machs setting and avoid opt entirely.
2021-11-20 23:13:50 -05:00
..
aarch64 sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
arm sim: install various doc files 2021-11-19 03:36:45 -05:00
avr sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
bfin sim: syscall: hoist argc/argn/argnlen to common code 2021-11-16 02:13:42 -05:00
bpf sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
common sim: use program_transform_name for libsim 2021-11-18 19:56:45 -05:00
cr16 sim: cr16: fix build on gcc-12 (NULL comparison) 2021-11-16 23:32:00 +00:00
cris sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
d10v sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
erc32 sim: install various doc files 2021-11-19 03:36:45 -05:00
example-synacor sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
frv sim: install various doc files 2021-11-19 03:36:45 -05:00
ft32 sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
h8300 Fix intermittent failures on the H8, particularly H8/SX tests. 2021-11-20 13:06:15 -05:00
igen sim: hoist mn10300 & v850 igen rules up to common builds 2021-11-02 22:59:07 -04:00
iq2000 sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
lm32 sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
m4 sim: bfin: add support for SDL2 2021-09-13 22:45:19 -04:00
m32c sim: hoist gencode & opc2c build rules up to common builds 2021-11-02 22:59:07 -04:00
m32r sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
m68hc11 sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
mcore sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
microblaze sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
mips sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
mn10300 sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
moxie sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
msp430 sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
or1k sim: install various doc files 2021-11-19 03:36:45 -05:00
ppc sim: install various doc files 2021-11-19 03:36:45 -05:00
pru sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
riscv sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
rl78 sim: rl78: drop obsolete manual dependency rules 2021-10-31 05:09:09 -04:00
rx sim: install various doc files 2021-11-19 03:36:45 -05:00
sh sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
testsuite sim: v850: fix cpu_option testsuite handling 2021-11-20 23:13:50 -05:00
v850 sim: split program path out of argv vector 2021-11-15 02:53:29 -05:00
.gitignore
aclocal.m4
arch-subdir.mk.in sim: ppc: fallback when ln is not available [PR sim/18864] 2021-10-03 11:36:30 -04:00
ChangeLog-2021
config.h.in sim: bfin: add support for SDL2 2021-09-13 22:45:19 -04:00
configure sim: avoid installing headers when there is no sim 2021-11-18 19:45:54 -05:00
configure.ac sim: avoid installing headers when there is no sim 2021-11-18 19:45:54 -05:00
COPYING sim: clarify license text via COPYING file 2021-11-06 01:44:06 -04:00
MAINTAINERS gdb/sim: update my email address 2021-11-02 09:20:24 +00:00
Makefile.am sim: install various doc files 2021-11-19 03:36:45 -05:00
Makefile.in sim: install various doc files 2021-11-19 03:36:45 -05:00
README-HACKING