Register a delete handler for 68HC11 core device node
[platform/upstream/binutils.git] / sim / m68hc11 / ChangeLog
1 2000-11-22  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
2
3         * dv-m68hc11.c (attach_m68hc11_regs): Register a delete handler.
4         (m68hc11cpu_delete): Delete handler to detach the address space.
5
6 2000-11-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
7
8         * dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc.
9         * dv-nvram.c (attach_nvram_regs): Use hw_free and hw_malloc
10         instead of free and malloc.
11
12 2000-09-11  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
13
14         * Makefile.in: Was missing from initial patch.
15
16 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
17
18         * interp.c (sim_store_register): Remove soft register hack.
19         (sim_fetch_register): Likewise.
20         (sim_create_inferior): Likewise.
21         * sim-main.h: Likewise.
22
23 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
24
25         * interrupts.c (interrupts_update_pending): Clear the mask of
26         pending interrupts here.
27         (interrupts_get_current): Don't clear the mask of pending interrupts.
28
29 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
30
31         * sim-main.h: Define cycle_to_string.
32         * dv-m68hc11tim.c (cycle_to_string): New function to translate 
33         the cpu cycle into some formatted time string.
34         (m68hc11tim_print_timer): Use it.
35         * dv-m68hc11sio.c (m68hc11sio_info): Use cycle_to_string.
36         * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
37         * interrupts.c (interrupts_info): Likewise.
38         * m68hc11_sim.c (cpu_info): Likewise.
39
40 2000-09-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
41
42         * dv-m68hc11tim.c (m68hc11tim_timer_event): Compute the overflow
43         interrupt and compare events accurately.  Take into account the
44         pending ticks not processed by the simulator yet (introduced a shift).
45         (m68hc11_port_event): Reset the timer interrupt delays.
46         (m68hc11tim_io_read_buffer): Be able to read several bytes.
47         (m68hc11tim_io_write_buffer): Likewise for write.
48         (m68hc11tim_io_write_buffer): Recompute the timer overflow interrupt.
49
50 2000-09-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
51
52         * dv-m68hc11spi.c (m68hc11spi_io_read_buffer): Clear the interrupts.
53         (m68hc11spi_io_write_buffer): Likewise and fix the spi frame.
54         (m68hc11spi_info): Clarify the status report
55         of the SPI when a byte is being sent.
56         (m68hc11spi_clock): Fix the spi send frame.
57         
58 2000-08-11  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
59
60         * sim-main.h (m68hc11_map_level): Define level of address mappings.
61         * dv-m68hc11eepr.c (struct m68hc11eepr ): New flag to indicate
62         whether the eeprom is currently mapped or not.
63         (m68hc11eepr_port_event): Use the flag to see if we must unmap
64         or map the eeprom.  Update the flag to reflect the current state.
65         Use M6811_EEPROM_LEVEL when mapping the eeprom.
66         (m68hc11eepr_finish): Remove overlap hack.
67         (attach_m68hc11eepr_regs): Use M6811_IO_LEVEL when mapping the
68         config and control registers.
69         * dv-m68hc11.c (m68hc11cpu_finish): Remove overlap hack.
70         (attach_m68hc11_regs): Use M6811_IO_LEVEL.
71         (m68hc11cpu_io_write): Likewise when unmapping and re-mapping.
72         * dv-m68hc11spi.c (m68hc11spi_finish): Likewise.
73         (attach_m68hc11spi_regs): Likewise.
74         * dv-m68hc11tim.c (m68hc11tim_finish): Likewise.
75         (attach_m68hc11tim_regs): Likewise.
76         * dv-m68hc11sio.c (m68hc11sio_finish): Likewise.
77         (attach_m68hc11sio_regs): Likewise.
78         * interp.c (sim_open): Likewise.
79         * dv-nvram.c (attach_nvram_regs): Likewise.
80
81 Thu Jul 27 21:27:25 2000  Andrew Cagney  <cagney@b1.cygnus.com>
82
83         * configure, config.in: Regenerate.
84
85 2000-06-25  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
86
87         * Makefile.in (SIM_RUN_OBJS): Define to use nrun.c
88         * dv-m68hc11.c (m68hc11cpu_finish): Register detach address callback.
89         (dv_m6811_detach_address_callback): New function to detach a
90         device from an address space.
91         * dv-m68hc11eepr.c (m68hc11eepr_port_event): Initialize
92         config register according to --cpu-config option.
93         * sim-main.h (_sim_cpu): Add cpu_config member.
94         * interp.c (sim_open): Delete specific simulator options.
95         * m68hc11_sim.c (cpu_option_handler): New options
96         --emulos and -cpu-config <val> to configure the simulator.
97         (cpu_initialize): Initialize cpu_config member.
98
99 2000-06-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
100
101         * emulos.c: Fix indentation and comments.
102         * gencode.c: Likewise.
103         * dv-m68hc11tim.c (m68hc11tim_timer_event): Handle COMPARE_EVENT.
104         (m68hc11tim_io_write_buffer): Write compare registers and
105         setup compare event.
106         * interp.c: Remove unused global variables.
107         * interrupts.c (idefs): New compare interrupts.
108         Fix indentation and comments.
109         * interrupts.h: Likewise.
110
111 2000-06-18  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
112
113         * dv-m68hc11sio.c: Fix indentation and comments.
114         Remove INT_PORT.
115         * dv-m68hc11.c: Fix indentation and comments.
116         (m68hc11cpu_port_event): Move initialization of M6811_HPRIO from here.
117         * m68hc11_sim.c (cpu_reset): To here.
118         * dv-m68hc11eepr.c: Fix indentation and comments.
119         
120 2000-06-17  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
121
122         * dv-nvram.c: New file, rename from dv-pram.c.
123         * dv-pram.c: Delete file.
124         * sim-main.h: Incorporate m68hc11_sim.h.
125         * m68hc11_sim.h: Delete file.
126         * configure.in: Rename pram into nvram.
127         * interp.c (sim_open): Likewise in creation of device tree.
128         
129 2000-05-31  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
130
131         * interp.c (sim_open): Create the SPI device.
132         * dv-m68hc11spi.c: New file for SPI device simulation.
133         * configure.in (hw_extra_devices): Add SPI device.
134
135 2000-05-28  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
136
137         * interrupts.c (interrupts_initialize): Clear XIRQ accounting.
138         (interrupts_process): Separate IRQ and XIRQ accounting.
139         (interrupts_info): Report XIRQ accounting.
140         * interrupts.h (struct interrupts): Added accounting for XIRQ.
141
142 2000-04-16  Stephane Carrez  <stcarrez@worldnet.fr>
143
144         * dv-pram.c (attach_pram_regs): Fix the 'save-modified' mode.
145         * m68hc11_sim.h (_sim_cpu): Allow configuration of cpu mode.
146         * dv-m68hc11.c (attach_m68hc11_regs): Get the cpu MODA,MODB 
147         configuration from the 'mode' device tree property.
148         (m68hc11cpu_port_event): Reset M6811_HPRIO to the cpu MODA, MODB
149         configuration.
150
151 2000-02-24  Stephane Carrez  <stcarrez@worldnet.fr>
152
153         * sim-main.h: Remove WITH_TARGET_* defines.
154         * Makefile.in (SIM_EXTRA_CFLAGS): Specify the WITH_TARGET_* flags.
155
156 2000-02-08  Stephane Carrez  <stcarrez@worldnet.fr>
157
158         * dv-m68hc11sio.c (m68hc11sio_port_event): Setup the SCI to
159         1200 baud when cpu is in bootstrap mode.
160
161         * dv-m68hc11tim.c (m68hc11tim_io_write_buffer): Be able to
162         write in the TCTN timer register.
163
164         * dv-m68hc11sio.c (m68hc11sio_io_write_buffer): Divide cpu clock
165         by 4 to obtain the E clock frequency.
166         (sccr2_desc): Use M6811_TIE for TIE bit.
167         (m68hc11sio_info): Fix baud rate report.
168
169         * dv-m68hc11tim.c (to_realtime): Likewise.
170
171         * interp.c (sim_open): When building device tree, only provide
172         devices that do not exist yet.
173
174         * emulos.c: Fix compilation pb under Windows.
175
176         * dv-m68hc11.c (attach_m68hc11_regs): Get the clock frequency
177         from the 'clock' property.
178
179 2000-01-02  Stephane Carrez  <stcarrez@worldnet.fr>
180
181         * m68hc11_sim.h (*_REGNUM): Define.
182         (_sim_cpu): New member cpu_page0_reg table.
183         * interp.c (sim_create_inferior): Fill the cpu_page0_reg table with
184         addresses of soft registers in .page0.
185         (sim_fetch_register, sim_store_register): Use cpu_page0_reg table 
186         to get/set soft registers.
187
188 1999-12-31  Stephane Carrez  <stcarrez@worldnet.fr>
189
190         * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Clear byte to avoid
191         returning random values.
192
193 1999-12-17  Stephane Carrez  <stcarrez@worldnet.fr>
194
195         * gencode.c: Fix "subb N,x" that used a instead of b.
196
197 1999-09-09  Stephane Carrez  <stcarrez@worldnet.fr>
198
199         * gencode.c: Fixed sbc8 and adc8 when there was a initial carry.
200
201 1999-09-01  Stephane Carrez  <stcarrez@worldnet.fr>
202
203         * sim-main.h (SIM_HANDLES_LMA): Define to enable loading using lma.
204
205 1999-08-14  Stephane Carrez  <stcarrez@worldnet.fr>
206
207         * dv-m68hc11.c (attach_m68hc11_regs): Save the size of the
208         register region in the m68hc11cpu struct.
209         (m68hc11cpu_io_write): When the IO mapping addres changes,
210         detach the register region and re-attach it at the new address.
211         (m68hc11cpu_io_read_buffer): Renamed base_address into
212         attach_address.
213         (m68hc11cpu_io_write_buffer): Likewise. Pass the hw pointer
214         to m68hc11cpu_io_write.
215
216 1999-08-13  Stephane Carrez  <stcarrez@worldnet.fr>
217
218         * gencode.c: For sbc8, check the carry and increment the source
219         before trying to set the carry for the result.
220
221 1999-05-24  John S. Kallal <kallal@voicenet.com>
222         
223         * interp.c (sim_get_info): Don't crash if the command line is 0.
224         Define prototype for sim_get_info() and init_system().
225         (sim_info): Correct call to sim_get_info().
226         
227 1999-05-16  Stephane Carrez  <stcarrez@worldnet.fr>
228
229         * configure.in: Recognize m6811-*-*.
230         * configure: Regenerate.
231         * m68hc11_sim.h (cpu_ccr_update_add8, cpu_ccr_update_add16,
232         cpu_ccr_update_sub8, cpu_ccr_update_sub16):
233         Correct the computation of carry of 8 and 16-bits add and subtract.
234         * gencode.c: Use cpu_ccr_update_sub8 for subtraction (carry and
235         overflow set in a different manner than add).
236
237 1999-05-14  Stephane Carrez  <stcarrez@worldnet.fr>
238
239         * dv-m68hc11.c (dv_m6811_attach_address_callback): Removed a
240         trace message.
241         * interp.c (sim_open, sim_create_inferior): Initialize the
242         cpu_elf_start from the ELF header.
243         * m68hc11_sim.c (cpu_initialize): Clear the new data members.
244         (cpu_restart): Use cpu_elf_start as the starting address when
245         the flag is set.
246         (cpu_special): When cpu_use_elf_start is set, the WAI instruction
247         exits the simulator (exit status is in D).
248         * m68hc11_sim.h (_sim_cpu): Added members cpu_use_elf_start and
249         cpu_elf_star to start execution at address specified in ELF file.
250
251 1999-05-02  Stephane Carrez  <stcarrez@worldnet.fr>
252
253         * Makefile.in, config.in, configure, configure.in: New files.
254         * gencode.c: New file, generation of 68HC11 interpreter.
255         * m68hc11_sim.h, m68hc11_sim.c: New files, specific operations
256         for interpreter.
257         * interrupts.c, interrupts.h: New files, management of interrupts.
258         * interp.c, sim-main.h, 
259         * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c,
260         dv-m68hc11tim.c, dv-pram.c: New files representing devices for
261         68HC11 (dv-pram.c is generic and could probably migrate to common).
262         * emulos.c: New file, basic emulation of some os.