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