Commit | Line | Data |
---|---|---|
eefde351 SC |
1 | 2001-07-28 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
2 | ||
3 | * dv-m68hc11eepr.c (m68hc11eepr_info): Fix print of current write | |
4 | address. | |
5 | (m68hc11eepr_port_event): Fix detach/attach logic. | |
6 | ||
00d0c012 SC |
7 | 2001-07-22 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
8 | ||
9 | * Makefile.in (SIM_OBJS): Remove sim-resume.o | |
10 | * interp.c (sim_resume): New function from sim-resume.c, install | |
11 | the stepping event after having processed the pending ticks. | |
12 | (has_stepped): Likewise. | |
13 | (sim_info): Produce an output only if verbose or STATE_VERBOSE_P. | |
14 | ||
b51c7603 AC |
15 | 2001-07-10 Andrew Cagney <ac131313@redhat.com> |
16 | ||
17 | * Makefile.in (gencode): Provide explicit path to gencode.c. | |
18 | ||
81e09ed8 SC |
19 | 2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
20 | ||
21 | * Makefile.in (M68HC11_OBJS): Add m68hc12int.o. | |
22 | (m68hc12int.c): Generate using gencode -m6812. | |
23 | (m68hc11int.c): Likewise with -m6811. | |
24 | ||
25 | * gencode.c (m6811_opcode_patterns): New patterns for 68HC12. | |
26 | (m6811_page1_opcodes): Remove duplicate entries. | |
27 | (m6811_page2_opcodes): Likewise. | |
28 | (m6811_page3_opcodes): Likewise. | |
29 | (m6811_page4_opcodes): Likewise. | |
30 | (m6812_page1_opcodes): New table for 68HC12 instructions. | |
31 | (m6812_page2_opcodes): Likewise. | |
32 | (gen_fetch_operands): New modes [] and &[] for 68HC12 operands. | |
33 | (gen_save_result): Likewise. | |
34 | (gen_interpreter_for_table): Handle 68HC11 and 68HC12 opcodes. | |
35 | (cmp_opcode): New function for opcode comparision. | |
36 | (prepare_table): Sort the opcodes. | |
37 | (gen_interpreter): Prepare all the tables and generate either | |
38 | a 68HC11 or a 68HC12 simulator. | |
39 | (main): New options -m6811 and -m6812. | |
40 | ||
41 | * m68hc11_sim.c (cpu_single_step): Use pointer to cpu interpretor. | |
42 | (cpu_special): Simulation of some 68HC12 instructions. | |
43 | (cpu_exg): New function. | |
44 | (cpu_dbcc): Likewise. | |
45 | (cpu_fetch_relbranch16): Likewise. | |
46 | (cpu_push_all): Push according to 68HC11 or 68HC12. | |
47 | (cpu_move16): Likewise. | |
48 | (cpu_move8): Likewise. | |
49 | (cpu_get_indexed_operand16): Likewise. | |
50 | (cpu_get_indexed_operand8): Likewise. | |
51 | (cpu_get_indexed_operand_addr): Likewise. | |
52 | (cpu_set_reg, cpu_set_dst_reg, cpu_get_src_reg, cpu_get_reg): Likewise. | |
53 | (cpu_reset): Setup INIT register according to architecture. | |
54 | ||
55 | * sim-main.h (M6811_Special): Add 68HC12 specific instructions. | |
56 | (_sim_cpu): Keep track of the cpu being simulated. | |
57 | (cpu_get_tmp3, cpu_get_tmp2, cpu_set_tmp3, cpu_set_tmp2): New. | |
58 | (cpu_m68hc11_push_uintxx): Rename of cpu_push_uintxx. | |
59 | (cpu_m68hc11_pop_uint8): Likewise. | |
60 | (cpu_m68hc12_push_uintxx): New functions for 68HC12. | |
61 | (cpu_m68hc12_pop_uintxx): Likewise. | |
62 | (cpu_exg, cpu_dbcc, cpu_move8, cpu_move16): Likewise, | |
63 | (cpu_fetch_relbranch16): Likewise. | |
64 | (cpu_interp_m6811): Rename of cpu_interp. | |
65 | (cpu_interp_m6812): New function. | |
66 | * interp.c (free_state): New function. | |
67 | (dev_list_68hc12): New table. | |
68 | (sim_board_reset): Reset depending on the cpu (HC11 or HC12). | |
69 | (sim_hw_configure): New function. | |
70 | (sim_prepare_for_program): New function. | |
71 | (sim_open): Use above new functions. | |
72 | (sim_close): Call free_state(). | |
73 | (sim_info): Print info according to cpu. | |
74 | (sim_create_inferior): Use sim_prepare_for_program. | |
75 | (sim_do_command): Configure the hardware after a change of the | |
76 | architecture. | |
77 | ||
11115521 SC |
78 | 2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
79 | ||
80 | * dv-m68hc11sio.c (m68hc11sio_tx_poll): Always check for | |
81 | pending interrupts. | |
82 | * interrupts.c (interrupts_process): Keep track of the last number | |
83 | of masked insn cycles. | |
84 | (interrupts_initialize): Clear last number of masked insn cycles. | |
85 | (interrupts_info): Report them. | |
86 | (interrupts_update_pending): Compute clear and set masks of | |
87 | interrupts and clear the interrupt bits before setting them | |
88 | (due to SCI interrupt sharing). | |
89 | * interrupts.h (struct interrupts): New members last_mask_cycles | |
90 | and xirq_last_mask_cycles. | |
91 | ||
b93775f5 SC |
92 | 2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
93 | ||
94 | * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Use attach_size | |
95 | instead of a hard-coded value. | |
96 | (m68hc11cpu_io_write_buffer): Likewise. | |
97 | (dv_m68hc11_descriptor): Define a 68hc12 device. | |
98 | * dv-m68hc11eepr.c (dv_m68hc11eepr_descriptor): Likewise. | |
99 | * dv-m68hc11tim.c (dv_m68hc11tim_descriptor): Likewise. | |
100 | * dv-m68hc11spi.c (dv_m68hc11spi_descriptor): Likewise. | |
101 | * dv-m68hc11sio.c (dv_m68hc11sio_descriptor): Likewise. | |
102 | ||
639aa4f7 SC |
103 | 2000-11-22 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
104 | ||
105 | * dv-m68hc11.c (attach_m68hc11_regs): Register a delete handler. | |
106 | (m68hc11cpu_delete): Delete handler to detach the address space. | |
107 | ||
6e73e7ed SC |
108 | 2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
109 | ||
110 | * dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc. | |
111 | * dv-nvram.c (attach_nvram_regs): Use hw_free and hw_malloc | |
112 | instead of free and malloc. | |
113 | ||
5f186447 SC |
114 | 2000-09-11 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
115 | ||
116 | * Makefile.in: Was missing from initial patch. | |
117 | ||
9830501b SC |
118 | 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
119 | ||
120 | * interp.c (sim_store_register): Remove soft register hack. | |
121 | (sim_fetch_register): Likewise. | |
122 | (sim_create_inferior): Likewise. | |
123 | * sim-main.h: Likewise. | |
124 | ||
a8afa79a SC |
125 | 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
126 | ||
127 | * interrupts.c (interrupts_update_pending): Clear the mask of | |
128 | pending interrupts here. | |
129 | (interrupts_get_current): Don't clear the mask of pending interrupts. | |
130 | ||
2990a9f4 SC |
131 | 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
132 | ||
133 | * sim-main.h: Define cycle_to_string. | |
134 | * dv-m68hc11tim.c (cycle_to_string): New function to translate | |
135 | the cpu cycle into some formatted time string. | |
136 | (m68hc11tim_print_timer): Use it. | |
137 | * dv-m68hc11sio.c (m68hc11sio_info): Use cycle_to_string. | |
138 | * dv-m68hc11spi.c (m68hc11spi_info): Likewise. | |
139 | * interrupts.c (interrupts_info): Likewise. | |
140 | * m68hc11_sim.c (cpu_info): Likewise. | |
141 | ||
401493c8 SC |
142 | 2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
143 | ||
144 | * dv-m68hc11tim.c (m68hc11tim_timer_event): Compute the overflow | |
145 | interrupt and compare events accurately. Take into account the | |
146 | pending ticks not processed by the simulator yet (introduced a shift). | |
147 | (m68hc11_port_event): Reset the timer interrupt delays. | |
148 | (m68hc11tim_io_read_buffer): Be able to read several bytes. | |
149 | (m68hc11tim_io_write_buffer): Likewise for write. | |
150 | (m68hc11tim_io_write_buffer): Recompute the timer overflow interrupt. | |
151 | ||
4d72d17a SC |
152 | 2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
153 | ||
154 | * dv-m68hc11spi.c (m68hc11spi_io_read_buffer): Clear the interrupts. | |
155 | (m68hc11spi_io_write_buffer): Likewise and fix the spi frame. | |
156 | (m68hc11spi_info): Clarify the status report | |
157 | of the SPI when a byte is being sent. | |
158 | (m68hc11spi_clock): Fix the spi send frame. | |
159 | ||
63348d04 SC |
160 | 2000-08-11 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
161 | ||
162 | * sim-main.h (m68hc11_map_level): Define level of address mappings. | |
163 | * dv-m68hc11eepr.c (struct m68hc11eepr ): New flag to indicate | |
164 | whether the eeprom is currently mapped or not. | |
165 | (m68hc11eepr_port_event): Use the flag to see if we must unmap | |
166 | or map the eeprom. Update the flag to reflect the current state. | |
167 | Use M6811_EEPROM_LEVEL when mapping the eeprom. | |
168 | (m68hc11eepr_finish): Remove overlap hack. | |
169 | (attach_m68hc11eepr_regs): Use M6811_IO_LEVEL when mapping the | |
170 | config and control registers. | |
171 | * dv-m68hc11.c (m68hc11cpu_finish): Remove overlap hack. | |
172 | (attach_m68hc11_regs): Use M6811_IO_LEVEL. | |
173 | (m68hc11cpu_io_write): Likewise when unmapping and re-mapping. | |
174 | * dv-m68hc11spi.c (m68hc11spi_finish): Likewise. | |
175 | (attach_m68hc11spi_regs): Likewise. | |
176 | * dv-m68hc11tim.c (m68hc11tim_finish): Likewise. | |
177 | (attach_m68hc11tim_regs): Likewise. | |
178 | * dv-m68hc11sio.c (m68hc11sio_finish): Likewise. | |
179 | (attach_m68hc11sio_regs): Likewise. | |
180 | * interp.c (sim_open): Likewise. | |
181 | * dv-nvram.c (attach_nvram_regs): Likewise. | |
182 | ||
5d031c16 AC |
183 | Thu Jul 27 21:27:25 2000 Andrew Cagney <cagney@b1.cygnus.com> |
184 | ||
185 | * configure, config.in: Regenerate. | |
186 | ||
e0709f50 AC |
187 | 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr> |
188 | ||
189 | * Makefile.in (SIM_RUN_OBJS): Define to use nrun.c | |
190 | * dv-m68hc11.c (m68hc11cpu_finish): Register detach address callback. | |
191 | (dv_m6811_detach_address_callback): New function to detach a | |
192 | device from an address space. | |
193 | * dv-m68hc11eepr.c (m68hc11eepr_port_event): Initialize | |
194 | config register according to --cpu-config option. | |
195 | * sim-main.h (_sim_cpu): Add cpu_config member. | |
196 | * interp.c (sim_open): Delete specific simulator options. | |
197 | * m68hc11_sim.c (cpu_option_handler): New options | |
198 | --emulos and -cpu-config <val> to configure the simulator. | |
199 | (cpu_initialize): Initialize cpu_config member. | |
200 | ||
201 | 2000-06-24 Stephane Carrez <Stephane.Carrez@worldnet.fr> | |
202 | ||
203 | * emulos.c: Fix indentation and comments. | |
204 | * gencode.c: Likewise. | |
205 | * dv-m68hc11tim.c (m68hc11tim_timer_event): Handle COMPARE_EVENT. | |
206 | (m68hc11tim_io_write_buffer): Write compare registers and | |
207 | setup compare event. | |
208 | * interp.c: Remove unused global variables. | |
209 | * interrupts.c (idefs): New compare interrupts. | |
210 | Fix indentation and comments. | |
211 | * interrupts.h: Likewise. | |
212 | ||
213 | 2000-06-18 Stephane Carrez <Stephane.Carrez@worldnet.fr> | |
214 | ||
215 | * dv-m68hc11sio.c: Fix indentation and comments. | |
216 | Remove INT_PORT. | |
217 | * dv-m68hc11.c: Fix indentation and comments. | |
218 | (m68hc11cpu_port_event): Move initialization of M6811_HPRIO from here. | |
219 | * m68hc11_sim.c (cpu_reset): To here. | |
220 | * dv-m68hc11eepr.c: Fix indentation and comments. | |
221 | ||
222 | 2000-06-17 Stephane Carrez <Stephane.Carrez@worldnet.fr> | |
223 | ||
224 | * dv-nvram.c: New file, rename from dv-pram.c. | |
225 | * dv-pram.c: Delete file. | |
226 | * sim-main.h: Incorporate m68hc11_sim.h. | |
227 | * m68hc11_sim.h: Delete file. | |
228 | * configure.in: Rename pram into nvram. | |
229 | * interp.c (sim_open): Likewise in creation of device tree. | |
230 | ||
231 | 2000-05-31 Stephane Carrez <Stephane.Carrez@worldnet.fr> | |
232 | ||
233 | * interp.c (sim_open): Create the SPI device. | |
234 | * dv-m68hc11spi.c: New file for SPI device simulation. | |
235 | * configure.in (hw_extra_devices): Add SPI device. | |
236 | ||
237 | 2000-05-28 Stephane Carrez <Stephane.Carrez@worldnet.fr> | |
238 | ||
239 | * interrupts.c (interrupts_initialize): Clear XIRQ accounting. | |
240 | (interrupts_process): Separate IRQ and XIRQ accounting. | |
241 | (interrupts_info): Report XIRQ accounting. | |
242 | * interrupts.h (struct interrupts): Added accounting for XIRQ. | |
243 | ||
244 | 2000-04-16 Stephane Carrez <stcarrez@worldnet.fr> | |
245 | ||
246 | * dv-pram.c (attach_pram_regs): Fix the 'save-modified' mode. | |
247 | * m68hc11_sim.h (_sim_cpu): Allow configuration of cpu mode. | |
248 | * dv-m68hc11.c (attach_m68hc11_regs): Get the cpu MODA,MODB | |
249 | configuration from the 'mode' device tree property. | |
250 | (m68hc11cpu_port_event): Reset M6811_HPRIO to the cpu MODA, MODB | |
251 | configuration. | |
252 | ||
253 | 2000-02-24 Stephane Carrez <stcarrez@worldnet.fr> | |
254 | ||
255 | * sim-main.h: Remove WITH_TARGET_* defines. | |
256 | * Makefile.in (SIM_EXTRA_CFLAGS): Specify the WITH_TARGET_* flags. | |
257 | ||
258 | 2000-02-08 Stephane Carrez <stcarrez@worldnet.fr> | |
259 | ||
260 | * dv-m68hc11sio.c (m68hc11sio_port_event): Setup the SCI to | |
261 | 1200 baud when cpu is in bootstrap mode. | |
262 | ||
263 | * dv-m68hc11tim.c (m68hc11tim_io_write_buffer): Be able to | |
264 | write in the TCTN timer register. | |
265 | ||
266 | * dv-m68hc11sio.c (m68hc11sio_io_write_buffer): Divide cpu clock | |
267 | by 4 to obtain the E clock frequency. | |
268 | (sccr2_desc): Use M6811_TIE for TIE bit. | |
269 | (m68hc11sio_info): Fix baud rate report. | |
270 | ||
271 | * dv-m68hc11tim.c (to_realtime): Likewise. | |
272 | ||
273 | * interp.c (sim_open): When building device tree, only provide | |
274 | devices that do not exist yet. | |
275 | ||
276 | * emulos.c: Fix compilation pb under Windows. | |
277 | ||
278 | * dv-m68hc11.c (attach_m68hc11_regs): Get the clock frequency | |
279 | from the 'clock' property. | |
280 | ||
281 | 2000-01-02 Stephane Carrez <stcarrez@worldnet.fr> | |
282 | ||
283 | * m68hc11_sim.h (*_REGNUM): Define. | |
284 | (_sim_cpu): New member cpu_page0_reg table. | |
285 | * interp.c (sim_create_inferior): Fill the cpu_page0_reg table with | |
286 | addresses of soft registers in .page0. | |
287 | (sim_fetch_register, sim_store_register): Use cpu_page0_reg table | |
288 | to get/set soft registers. | |
289 | ||
290 | 1999-12-31 Stephane Carrez <stcarrez@worldnet.fr> | |
291 | ||
292 | * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Clear byte to avoid | |
293 | returning random values. | |
294 | ||
295 | 1999-12-17 Stephane Carrez <stcarrez@worldnet.fr> | |
296 | ||
297 | * gencode.c: Fix "subb N,x" that used a instead of b. | |
298 | ||
299 | 1999-09-09 Stephane Carrez <stcarrez@worldnet.fr> | |
300 | ||
301 | * gencode.c: Fixed sbc8 and adc8 when there was a initial carry. | |
302 | ||
303 | 1999-09-01 Stephane Carrez <stcarrez@worldnet.fr> | |
304 | ||
305 | * sim-main.h (SIM_HANDLES_LMA): Define to enable loading using lma. | |
306 | ||
307 | 1999-08-14 Stephane Carrez <stcarrez@worldnet.fr> | |
308 | ||
309 | * dv-m68hc11.c (attach_m68hc11_regs): Save the size of the | |
310 | register region in the m68hc11cpu struct. | |
311 | (m68hc11cpu_io_write): When the IO mapping addres changes, | |
312 | detach the register region and re-attach it at the new address. | |
313 | (m68hc11cpu_io_read_buffer): Renamed base_address into | |
314 | attach_address. | |
315 | (m68hc11cpu_io_write_buffer): Likewise. Pass the hw pointer | |
316 | to m68hc11cpu_io_write. | |
317 | ||
318 | 1999-08-13 Stephane Carrez <stcarrez@worldnet.fr> | |
319 | ||
320 | * gencode.c: For sbc8, check the carry and increment the source | |
321 | before trying to set the carry for the result. | |
322 | ||
323 | 1999-05-24 John S. Kallal <kallal@voicenet.com> | |
324 | ||
325 | * interp.c (sim_get_info): Don't crash if the command line is 0. | |
326 | Define prototype for sim_get_info() and init_system(). | |
327 | (sim_info): Correct call to sim_get_info(). | |
328 | ||
329 | 1999-05-16 Stephane Carrez <stcarrez@worldnet.fr> | |
330 | ||
331 | * configure.in: Recognize m6811-*-*. | |
332 | * configure: Regenerate. | |
333 | * m68hc11_sim.h (cpu_ccr_update_add8, cpu_ccr_update_add16, | |
334 | cpu_ccr_update_sub8, cpu_ccr_update_sub16): | |
335 | Correct the computation of carry of 8 and 16-bits add and subtract. | |
336 | * gencode.c: Use cpu_ccr_update_sub8 for subtraction (carry and | |
337 | overflow set in a different manner than add). | |
338 | ||
339 | 1999-05-14 Stephane Carrez <stcarrez@worldnet.fr> | |
340 | ||
341 | * dv-m68hc11.c (dv_m6811_attach_address_callback): Removed a | |
342 | trace message. | |
343 | * interp.c (sim_open, sim_create_inferior): Initialize the | |
344 | cpu_elf_start from the ELF header. | |
345 | * m68hc11_sim.c (cpu_initialize): Clear the new data members. | |
346 | (cpu_restart): Use cpu_elf_start as the starting address when | |
347 | the flag is set. | |
348 | (cpu_special): When cpu_use_elf_start is set, the WAI instruction | |
349 | exits the simulator (exit status is in D). | |
350 | * m68hc11_sim.h (_sim_cpu): Added members cpu_use_elf_start and | |
351 | cpu_elf_star to start execution at address specified in ELF file. | |
352 | ||
353 | 1999-05-02 Stephane Carrez <stcarrez@worldnet.fr> | |
354 | ||
355 | * Makefile.in, config.in, configure, configure.in: New files. | |
356 | * gencode.c: New file, generation of 68HC11 interpreter. | |
357 | * m68hc11_sim.h, m68hc11_sim.c: New files, specific operations | |
358 | for interpreter. | |
359 | * interrupts.c, interrupts.h: New files, management of interrupts. | |
360 | * interp.c, sim-main.h, | |
361 | * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c, | |
362 | dv-m68hc11tim.c, dv-pram.c: New files representing devices for | |
363 | 68HC11 (dv-pram.c is generic and could probably migrate to common). | |
364 | * emulos.c: New file, basic emulation of some os. |