Regenerate frv-dis.c in order to fix a compile time warning.
[deliverable/binutils-gdb.git] / sim / cris / devices.c
CommitLineData
f6bcefef
HPN
1/* CRIS device support
2 Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3 Contributed by Axis Communications.
4
5This file is part of the GNU simulators.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License along
18with this program; if not, write to the Free Software Foundation, Inc.,
1959 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20
21/* Based on the i960 devices.c (for the purposes, the same as all the
22 others). */
23
24#include "sim-main.h"
25
26#ifdef HAVE_DV_SOCKSER
27#include "dv-sockser.h"
28#endif
29
30/* Placeholder definition. */
31struct _device { char dummy; } cris_devices;
32
33void
34device_error (device *me ATTRIBUTE_UNUSED,
35 char *message ATTRIBUTE_UNUSED,
36 ...)
37{
38 abort ();
39}
40
41int
42device_io_read_buffer (device *me ATTRIBUTE_UNUSED,
43 void *source ATTRIBUTE_UNUSED,
44 int space ATTRIBUTE_UNUSED,
45 address_word addr ATTRIBUTE_UNUSED,
46 unsigned nr_bytes ATTRIBUTE_UNUSED,
47 SIM_DESC sd ATTRIBUTE_UNUSED,
48 SIM_CPU *cpu ATTRIBUTE_UNUSED,
49 sim_cia cia ATTRIBUTE_UNUSED)
50{
51 abort ();
52}
53
54int
55device_io_write_buffer (device *me ATTRIBUTE_UNUSED,
56 const void *source,
57 int space ATTRIBUTE_UNUSED,
58 address_word addr, unsigned nr_bytes,
59 SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
60{
61 static const unsigned char ok[] = { 4, 0, 0, 0x90};
62 static const unsigned char bad[] = { 8, 0, 0, 0x90};
63
64 if (addr == 0x90000004 && memcmp (source, ok, sizeof ok) == 0)
65 cris_break_13_handler (cpu, 1, 0, 0, 0, 0, 0, 0, cia);
66 else if (addr == 0x90000008
67 && memcmp (source, bad, sizeof bad) == 0)
68 cris_break_13_handler (cpu, 1, 34, 0, 0, 0, 0, 0, cia);
69
70 /* If it wasn't one of those, send an invalid-memory signal. */
71 sim_core_signal (sd, cpu, cia, 0, nr_bytes, addr,
72 write_transfer, sim_core_unmapped_signal);
73}
This page took 0.054798 seconds and 4 git commands to generate.