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