diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-09-15 08:18:20 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-09-15 08:18:20 +0000 |
commit | 658303f7d4219618030b6a5afce163c93e6034ce (patch) | |
tree | 8f69ed6bf0554fcf59936609f67d2c894613090c /sim/v850/interp.c | |
parent | 9c82b2b8058ac93b4d9640f5afa2d2abb40f1f20 (diff) | |
download | gdb-658303f7d4219618030b6a5afce163c93e6034ce.zip gdb-658303f7d4219618030b6a5afce163c93e6034ce.tar.gz gdb-658303f7d4219618030b6a5afce163c93e6034ce.tar.bz2 |
For v850eq start up with US bit set.
Let sim_analyze_program determine the architecture.
Fix various sanitizations.
Diffstat (limited to 'sim/v850/interp.c')
-rw-r--r-- | sim/v850/interp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sim/v850/interp.c b/sim/v850/interp.c index 69f98d8..1981cfb 100644 --- a/sim/v850/interp.c +++ b/sim/v850/interp.c @@ -233,12 +233,6 @@ sim_open (kind, cb, abfd, argv) STATE_WATCHPOINTS (sd)->sizeof_pc = sizeof (PC); STATE_WATCHPOINTS (sd)->interrupt_handler = do_interrupt; STATE_WATCHPOINTS (sd)->interrupt_names = interrupt_names; - /* start-sanitize-v850e */ - STATE_ARCHITECTURE (sd) = bfd_lookup_arch (bfd_arch_v850, bfd_mach_v850e); - /* end-sanitize-v850e */ - /* start-sanitize-v850eq */ - STATE_ARCHITECTURE (sd) = bfd_lookup_arch (bfd_arch_v850, bfd_mach_v850eq); - /* end-sanitize-v850eq */ if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK) return 0; @@ -409,6 +403,13 @@ sim_create_inferior (sd, prog_bfd, argv, env) memset (&State, 0, sizeof (State)); if (prog_bfd != NULL) PC = bfd_get_start_address (prog_bfd); + /* start-sanitize-v850eq */ + /* For v850eq, set PSW[US] by default */ + if (STATE_ARCHITECTURE (sd) != NULL + && STATE_ARCHITECTURE (sd)->arch == bfd_arch_v850 + && STATE_ARCHITECTURE (sd)->mach == bfd_mach_v850eq) + PSW |= PSW_US; + /* end-sanitize-v850eq */ return SIM_RC_OK; } |