]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/m68hc11/ChangeLog
sim: drop host endian configure option
[thirdparty/binutils-gdb.git] / sim / m68hc11 / ChangeLog
1 2016-01-03 Mike Frysinger <vapier@gentoo.org>
2
3 * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete.
4 * configure: Regenerate.
5
6 2016-01-02 Mike Frysinger <vapier@gentoo.org>
7
8 * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG.
9 * configure: Regenerate.
10
11 2015-12-30 Mike Frysinger <vapier@gentoo.org>
12
13 * configure.ac: Change LITTLE_ENDIAN to BIG_ENDIAN.
14 * configure: Regenerate.
15
16 2015-12-30 Mike Frysinger <vapier@gentoo.org>
17
18 * imterp.c (sim_open): Delete current_alignment and
19 current_target_byte_order assignments.
20 * configure.ac: Call SIM_AC_OPTION_ENDIAN.
21 * configure: Regenerate.
22
23 2015-12-30 Mike Frysinger <vapier@gentoo.org>
24
25 * wrapper.c (m68hc11_reg_store, m68hc11_reg_fetch): Define.
26 (sim_open): Call CPU_REG_FETCH/CPU_REG_STORE.
27 (sim_store_register): Rename to ...
28 (m68hc11_reg_store): ... this. Delete local cpu var.
29 (sim_fetch_register): Rename to ...
30 (m68hc11_reg_fetch): ... this. Delete local cpu var.
31
32 2015-12-27 Mike Frysinger <vapier@gentoo.org>
33
34 * Makefile.in (SIM_OBJS): Delete sim-hload.o.
35
36 2015-12-26 Mike Frysinger <vapier@gentoo.org>
37
38 * config.in, configure: Regenerate.
39
40 2015-12-24 Mike Frysinger <vapier@gentoo.org>
41
42 * sim-main.h (SIM_HANDLES_LMA): Delete.
43
44 2015-12-24 Mike Frysinger <vapier@gentoo.org>
45
46 * sim-main.h (WITH_WATCHPOINTS): Delete.
47
48 2015-11-17 Mike Frysinger <vapier@gentoo.org>
49
50 * sim-main.h (WITH_MODULO_MEMORY): Delete.
51
52 2015-11-15 Mike Frysinger <vapier@gentoo.org>
53
54 * Makefile.in (SIM_OBJS): Delete sim-reason.o and sim-stop.o.
55
56 2015-11-14 Mike Frysinger <vapier@gentoo.org>
57
58 * Makefile.in (SIM_OBJS): Delete sim-load.o.
59
60 2015-11-14 Mike Frysinger <vapier@gentoo.org>
61
62 * interp.c (sim_close): Delete.
63
64 2015-06-23 Mike Frysinger <vapier@gentoo.org>
65
66 * configure: Regenerate.
67
68 2015-06-12 Mike Frysinger <vapier@gentoo.org>
69
70 * configure: Regenerate.
71
72 2015-06-12 Mike Frysinger <vapier@gentoo.org>
73
74 * configure: Regenerate.
75
76 2015-06-11 Mike Frysinger <vapier@gentoo.org>
77
78 * interp.c (interrupt_names): Delete.
79
80 2015-06-11 Mike Frysinger <vapier@gentoo.org>
81
82 * Makefile.in (SIM_OBJS): Add sim-resume.o
83 * interp.c (has_stepped, sim_resume): Delete.
84
85 2015-06-11 Mike Frysinger <vapier@gentoo.org>
86
87 * interp.c (INLINE): Delete define.
88
89 2015-04-29 Nick Clifton <nickc@redhat.com>
90
91 PR 18273
92 * gencode.c (gen_fetch_operands): Remove unreachable code.
93
94 2015-04-18 Mike Frysinger <vapier@gentoo.org>
95
96 * sim-main.h (SIM_CPU): Delete.
97
98 2015-04-18 Mike Frysinger <vapier@gentoo.org>
99
100 * sim-main.h (sim_cia): Delete.
101
102 2015-04-17 Mike Frysinger <vapier@gentoo.org>
103
104 * sim-main.h (CIA_GET, CIA_SET): Delete.
105
106 2015-04-15 Mike Frysinger <vapier@gentoo.org>
107
108 * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
109 * sim-main.h (STATE_CPU): Delete.
110
111 2015-04-13 Mike Frysinger <vapier@gentoo.org>
112
113 * configure: Regenerate.
114
115 2015-04-13 Mike Frysinger <vapier@gentoo.org>
116
117 * Makefile.in (SIM_OBJS): Add sim-cpu.o.
118 * interp.c (m68hc11_pc_get, m68hc11_pc_set): New functions.
119 (sim_open): Declare new local var i. Call sim_cpu_alloc_all.
120 Call CPU_PC_FETCH & CPU_PC_STORE for all cpus.
121 (sim_pc_get): Delete.
122 * sim-main.h (SIM_CPU): Define.
123 (STATE_CPU): Drop &.
124 (struct sim_state): Change cpu to an array of pointers.
125
126 2015-04-06 Mike Frysinger <vapier@gentoo.org>
127
128 * Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
129
130 2015-03-31 Mike Frysinger <vapier@gentoo.org>
131
132 * m68hc11_sim.c (cpu_get_indexed_operand_addr,
133 cpu_get_indexed_operand8, cpu_get_indexed_operand16): Rename restrict
134 variable to restricted.
135 * sim-main.h (cpu_get_indexed_operand_addr): Likewise.
136
137 2015-03-24 Mike Frysinger <vapier@gentoo.org>
138
139 * interp.c (sim_pc_get): New function.
140
141 2015-03-24 Mike Frysinger <vapier@gentoo.org>
142
143 * compile.c (sim_set_profile, sim_set_profile_size, sim_set_callbacks,
144 sim_size, sim_trace): Delete.
145 * sim-main.h (sim_set_profile, sim_set_profile_size): Delete.
146
147 2015-03-24 Mike Frysinger <vapier@gentoo.org>
148
149 * configure: Regenerate.
150
151 2015-03-23 Mike Frysinger <vapier@gentoo.org>
152
153 * configure: Regenerate.
154
155 2015-03-23 Mike Frysinger <vapier@gentoo.org>
156
157 * configure: Regenerate.
158 * configure.ac (m68hc11_extra_objs): Delete.
159 * Makefile.in (SIM_OBJS): Delete SIM_EXTRA_OBJS.
160 (SIM_EXTRA_OBJS): Delete.
161
162 2015-03-16 Mike Frysinger <vapier@gentoo.org>
163
164 * config.in, configure: Regenerate.
165
166 2015-03-14 Mike Frysinger <vapier@gentoo.org>
167
168 * Makefile.in (SIM_RUN_OBJS): Delete.
169
170 2015-03-14 Mike Frysinger <vapier@gentoo.org>
171
172 * configure.ac (AC_CHECK_HEADERS): Delete.
173 * aclocal.m4, configure: Regenerate.
174
175 2014-08-19 Alan Modra <amodra@gmail.com>
176
177 * configure: Regenerate.
178
179 2014-08-15 Roland McGrath <mcgrathr@google.com>
180
181 * configure: Regenerate.
182 * config.in: Regenerate.
183
184 2014-03-04 Mike Frysinger <vapier@gentoo.org>
185
186 * configure: Regenerate.
187
188 2013-09-23 Alan Modra <amodra@gmail.com>
189
190 * configure: Regenerate.
191
192 2013-06-03 Mike Frysinger <vapier@gentoo.org>
193
194 * aclocal.m4, configure: Regenerate.
195
196 2013-05-10 Freddie Chopin <freddie_chopin@op.pl>
197
198 * configure: Rebuild.
199
200 2013-03-26 Mike Frysinger <vapier@gentoo.org>
201
202 * configure: Regenerate.
203
204 2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
205
206 * configure.ac: Use $SIM_DV_SOCKSER_O.
207 * configure: Regenerated.
208
209 2012-06-15 Joel Brobecker <brobecker@adacore.com>
210
211 * config.in, configure: Regenerate.
212
213 2012-03-24 Mike Frysinger <vapier@gentoo.org>
214
215 * aclocal.m4, config.in, configure: Regenerate.
216
217 2011-12-03 Mike Frysinger <vapier@gentoo.org>
218
219 * aclocal.m4: New file.
220 * configure: Regenerate.
221
222 2011-10-19 Mike Frysinger <vapier@gentoo.org>
223
224 * configure: Regenerate after common/acinclude.m4 update.
225
226 2011-10-17 Mike Frysinger <vapier@gentoo.org>
227
228 * configure.ac: Change include to common/acinclude.m4.
229
230 2011-10-17 Mike Frysinger <vapier@gentoo.org>
231
232 * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER
233 call. Replace common.m4 include with SIM_AC_COMMON.
234 * configure: Regenerate.
235
236 2011-07-05 Mike Frysinger <vapier@gentoo.org>
237
238 * interp.c (sim_do_command): Delete.
239
240 2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
241
242 * configure: Regenerate.
243
244 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
245
246 * config.in: Regenerate.
247 * configure: Likewise.
248
249 * configure: Regenerate.
250
251 2008-07-11 Hans-Peter Nilsson <hp@axis.com>
252
253 * configure: Regenerate to track ../common/common.m4 changes.
254 * config.in: Ditto.
255
256 2008-06-06 Vladimir Prus <vladimir@codesourcery.com>
257 Daniel Jacobowitz <dan@codesourcery.com>
258 Joseph Myers <joseph@codesourcery.com>
259
260 * configure: Regenerate.
261
262 2006-12-21 Hans-Peter Nilsson <hp@axis.com>
263
264 * config.in: Regenerate.
265
266 2006-06-13 Richard Earnshaw <rearnsha@arm.com>
267
268 * configure: Regenerated.
269
270 2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
271
272 * configure: Regenerated.
273
274 2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
275
276 * configure: Regenerated.
277
278 2006-03-29 Hans-Peter Nilsson <hp@axis.com>
279
280 * configure: Regenerate.
281
282 2005-03-23 Mark Kettenis <kettenis@gnu.org>
283
284 * configure: Regenerate.
285
286 2005-01-14 Andrew Cagney <cagney@gnu.org>
287
288 * configure.ac: Sinclude aclocal.m4 before common.m4. Add
289 explicit call to AC_CONFIG_HEADER.
290 * configure: Regenerate.
291
292 2005-01-11 Andrew Cagney <cagney@localhost.localdomain>
293
294 * configure: Regenerated to track ../common/aclocal.m4 changes.
295
296 2005-01-07 Andrew Cagney <cagney@gnu.org>
297
298 * configure.ac: Rename configure.in, require autoconf 2.59.
299 * configure: Re-generate.
300
301 2004-12-08 Hans-Peter Nilsson <hp@axis.com>
302
303 * configure: Regenerate for ../common/aclocal.m4 update.
304
305 2004-06-15 Alan Modra <amodra@bigpond.net.au>
306
307 * interp.c (sim_prepare_for_program): Use bfd_get_section_size
308 instead of bfd_get_section_size_before_reloc.
309
310 2003-08-08 Stephane Carrez <stcarrez@nerim.fr>
311
312 * dv-m68hc11tim.c (cycle_to_string): Add flags parameter to better
313 control the translation.
314 (m68hc11tim_print_timer): Update cycle_to_string conversion.
315 (m68hc11tim_timer_event): Fix handling of output
316 compare register with its interrupts.
317 (m68hc11tim_io_write_buffer): Check output compare
318 after setting M6811_TMSK1.
319 (m68hc11tim_io_read_buffer): Fix compilation warning.
320 * dv-m68hc11.c (m68hc11_option_handler): Likewise.
321 * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
322 * dv-m68hc11sio.c (m68hc11sio_info): Likewise.
323 * interrupts.c (interrupts_info): Likewise.
324 (interrupts_reset): Recognize bootstrap mode.
325 * sim-main.h (PRINT_CYCLE, PRINT_TIME): New defines.
326 (_sim_cpu): Add cpu_start_mode.
327 (cycle_to_string): Add flags member.
328 * m68hc11_sim.c (OPTION_CPU_BOOTSTRAP): New option.
329 (cpu_options): Declare new option bootstrap.
330 (cpu_option_handler): Handle it.
331 (cpu_info): Update call to cycle_to_string.
332
333 2003-08-08 Stephane Carrez <stcarrez@nerim.fr>
334
335 * sim-main.h (phys_to_virt): Use memory bank parameters to translate
336 the physical address in virtual address.
337 (struct _sim_cpu): Add memory bank members.
338 * m68hc11_sim.c (cpu_initialize): Clear memory bank parameters.
339 * interp.c (sim_hw_configure): Create memory bank according to memory
340 bank parameters.
341 (sim_get_bank_parameters): New function to obtain memory bank config
342 from the symbol table.
343 (sim_prepare_for_program): Call it to obtain the memory bank parameters.
344 (sim_open): Call sim_prepare_for_program.
345 * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Use memory bank parameters
346 to check if address is within bank window.
347 (m68hc11cpu_io_read_buffer): Likewise.
348 (attach_m68hc11_regs): Map the memory bank according to memory bank
349 parameters.
350
351 2003-08-08 Stephane Carrez <stcarrez@nerim.fr>,
352
353 * sim-main.h (PAGE_REGNUM, Z_REGNUM): Use same numbering as gdb.
354
355 2003-08-08 Stephane Carrez <stcarrez@nerim.fr>,
356 Gary Piercey <gpiercey@northstar-technical.com>
357
358 * m68hc11_sim.c (print_io_word): New function to print 16-bit value.
359 * sim-main.h (print_io_word): Declare.
360 * dv-m68hc11tim.c (tmsk1_desc): New description table for TMSK1.
361 (tflg1_desc): Likewise for TFLG1.
362 (m68hc11tim_info): Print input and output compare registers
363
364 2003-03-02 Stephane Carrez <stcarrez@nerim.fr>
365
366 * Makefile.in (SIM_EXTRA_CFLAGS): Set WITH_TARGET_ADDRESS_BITSIZE
367 to 32 to support memory bank switching; temporarily use 32-bit for
368 WORD_BITSIZE to avoid a bug in sim-common.
369
370 2003-03-01 Stephane Carrez <stcarrez@nerim.fr>
371
372 * interp.c (sim_fetch_register): Only store a single byte for
373 1 byte registers.
374
375 2003-02-27 Andrew Cagney <cagney@redhat.com>
376
377 * interp.c (sim_prepare_for_program, sim_open)
378 (sim_create_inferior): Rename _bfd to bfd.
379
380 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
381
382 * dv-m68hc11eepr.c (struct m68hc11eepr ): Use const char* for filename.
383
384 2002-08-13 Marko Kohtala <marko.kohtala@luukku.com>
385
386 * interp.c (sim_prepare_for_program): Look up the image for the
387 reset vector and set cpu_use_elf_start to 1 if not found.
388 (sim_open): Do not set cpu_use_elf_start.
389
390 2002-08-13 Marko Kohtala <marko.kohtala@luukku.com>
391
392 * interp.c (sim_hw_configure): Return 1 for success.
393 (sim_prepare_for_program): Use the sim_hw_configure exit code to
394 return SIM_RC_FAIL.
395
396 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
397
398 * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Translate memory
399 bank window to some virtual address to read from extended memory.
400 (m68hc11cpu_io_write_buffer): Likewise for writing.
401 (attach_m68hc11_regs): When use_bank property is defined, attach
402 to the 68HC12 16K memory bank window.
403 * interp.c (sim_hw_configure): Create memory region for banked
404 memory.
405
406 2002-08-13 Stephane Carrez <Stephane.Carrez@nerim.fr>
407
408 * interp.c (sim_hw_configure): Connect port-X to cpu-write-port.
409 * dv-m68hc11.c (m68hc11cpu_ports): Add cpu-write-port input.
410 (m68hc11cpu_port_event): Handle CPU_WRITE_PORT event.
411
412 2002-08-13 Marko Kohtala <marko.kohtala@luukku.com>
413
414 * dv-m68hc11.c (m68hc11cpu_io_write): Fix to update IO mapping
415 when IO mapping changed, not when internal RAM mapping is changed.
416
417 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
418
419 * m68hc11_sim.c (cpu_special): Handle call and rtc instructions.
420 * sim-main.h (M6812_CALL_INDIRECT): Add to enum.
421 (m6811_regs): Add page register.
422 (cpu_set_page, cpu_get_page): New macros.
423 (phys_to_virt): New function.
424 (cpu_get_indexed_operand_addr, cpu_return): Declare.
425 * gencode.c: Identify indirect addressing mode for call and fix daa.
426 (gen_function_entry): New param to tell if src8/dst8 locals are
427 necessary.
428 (gen_interpreter): Use it to avoid generation of unused variables.
429 * interp.c (sim_fetch_register): Allow to read page register; page
430 register, A, B and CCR are only 1 byte wide.
431 (sim_store_register): Likewise for writing.
432
433 2002-06-16 Andrew Cagney <ac131313@redhat.com>
434
435 * configure: Regenerated to track ../common/aclocal.m4 changes.
436
437 2002-06-09 Andrew Cagney <cagney@redhat.com>
438
439 * Makefile.in (INCLUDE): Update path to callback.h.
440 * sim-main.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
441
442 2002-03-07 Stephane Carrez <Stephane.Carrez@worldnet.fr>
443
444 * m68hc11_sim.c (cpu_move8): Call sim_engine_abort in default case.
445 (cpu_move16): Likewise.
446 (sim_memory_error): Use sim_io_printf.
447 (cpu_option_handler): Fix compilation warning.
448 * interp.c (sim_hw_configure): Fix compilation warning;
449 remove m68hc12sio@2 device.
450 (sim_open): Likewise.
451 * dv-m68hc11tim.c (m68hc11tim_port_event): Fix clear of TFLG2
452 flags when reset.
453 (cycle_to_string): Improve convertion of cpu cycle number.
454 (m68hc11tim_info): Print info about PACNT.
455 (m68hc11tim_io_write_buffer): Fix clearing of TFLG2; handle
456 TCTL1 and TCTL2 registers.
457 * dv-m68hc11.c (m68hc11_info): Print 6811 current running mode.
458
459 2002-03-07 Stephane Carrez <Stephane.Carrez@worldnet.fr>
460
461 * interp.c (sim_hw_configure): Save the HW cpu pointer in the
462 cpu struct.
463 (sim_hw_configure): Connect the capture input/output events.
464 * sim-main.h (_sim_cpu): New member hw_cpu.
465 (m68hc11cpu_set_oscillator): Declare.
466 (m68hc11cpu_clear_oscillator): Declare.
467 (m68hc11cpu_set_port): Declare.
468 * dv-m68hc11.c (m68hc11_options): New for oscillator commands.
469 (m68hc11cpu_ports): New input ports and output ports to reflect
470 the HC11 IOs.
471 (m68hc11_delete): Cleanup any running oscillator.
472 (attach_m68hc11_regs): Create the input oscillators.
473 (make_oscillator): New function.
474 (find_oscillator): New function.
475 (oscillator_handler): New function.
476 (reset_oscillators): New function.
477 (m68hc11cpu_port_event): Handle the new input ports.
478 (m68hc11cpu_set_oscillator): New function.
479 (m68hc11cpu_clear_oscillator): New function.
480 (get_frequency): New function.
481 (m68hc11_option_handler): New function.
482 (m68hc11cpu_set_port): New function.
483 (m68hc11cpu_io_write): Post the port output events.
484 * dv-m68hc11spi.c (set_bit_port): Use m68hc11cpu_set_port to set
485 the output port value.
486 * dv-m68hc11tim.c (m68hc11tim_port_event): Handle CAPTURE event
487 by latching the TCNT value in the register.
488
489 2002-03-07 Stephane Carrez <Stephane.Carrez@worldnet.fr>
490
491 * sim-main.h (cpu_frame, cpu_frame_list): Remove.
492 (cpu_frame_reg, cpu_print_frame): Remove.
493 (cpu_m68hc11_push_uint8, cpu_m68hc11_pop_uint8): Cleanup.
494 (cpu_m68hc11_push_uint16, cpu_m68hc11_pop_uint16): Likewise.
495 (cpu_m68hc12_push_uint8, cpu_m68hc12_push_uint16): Likewise.
496 (cpu_m68hc12_pop_uint8, cpu_m68hc12_pop_uint16): Likewise.
497 * m68hc11_sim.c (cpu_find_frame): Remove.
498 (cpu_create_frame_list): Remove.
499 (cpu_remove_frame_list, cpu_create_frame, cpu_free_frame): Remove.
500 (cpu_frame_reg, cpu_print_frame, cpu_update_frame): Remove.
501 (cpu_call): Cleanup to remove #if HAVE_FRAME and calls to the above.
502 (cpu_update_frame): Likewise.
503 (cpu_return): Likewise.
504 (cpu_reset): Likewise.
505 (cpu_initialize): Likewise.
506 * interp.c (sim_do_command): Remove call to cpu_print_frame.
507
508 2002-03-07 Stephane Carrez <Stephane.Carrez@worldnet.fr>
509
510 * interrupts.c (interrupts_reset): New function, setup interrupt
511 vector address according to cpu mode.
512 (interrupts_initialize): Move reset portion to the above.
513 (interrupt_names): New table to give a name to interrupts.
514 (idefs): Handle pulse accumulator interrupts.
515 (interrupts_info): Print the interrupt history.
516 (interrupt_option_handler): New function.
517 (interrupt_options): New table of options.
518 (interrupts_update_pending): Keep track of when interrupts are
519 raised and implement breakpoint-on-raise-interrupt.
520 (interrupts_process): Keep track of when interrupts are taken
521 and implement breakpoint-on-interrupt.
522 * interrupts.h (struct interrupt_history): Define.
523 (struct interrupt): Keep track of the interrupt history.
524 (interrupts_reset): Declare.
525 (interrupts_initialize): Update prototype.
526 * m68hc11_sim.c (cpu_reset): Reset interrupts.
527 (cpu_initialize): Cleanup.
528
529 2001-07-28 Stephane Carrez <Stephane.Carrez@worldnet.fr>
530
531 * dv-m68hc11eepr.c (m68hc11eepr_info): Fix print of current write
532 address.
533 (m68hc11eepr_port_event): Fix detach/attach logic.
534
535 2001-07-22 Stephane Carrez <Stephane.Carrez@worldnet.fr>
536
537 * Makefile.in (SIM_OBJS): Remove sim-resume.o
538 * interp.c (sim_resume): New function from sim-resume.c, install
539 the stepping event after having processed the pending ticks.
540 (has_stepped): Likewise.
541 (sim_info): Produce an output only if verbose or STATE_VERBOSE_P.
542
543 2001-07-10 Andrew Cagney <ac131313@redhat.com>
544
545 * Makefile.in (gencode): Provide explicit path to gencode.c.
546
547 2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
548
549 * Makefile.in (M68HC11_OBJS): Add m68hc12int.o.
550 (m68hc12int.c): Generate using gencode -m6812.
551 (m68hc11int.c): Likewise with -m6811.
552
553 * gencode.c (m6811_opcode_patterns): New patterns for 68HC12.
554 (m6811_page1_opcodes): Remove duplicate entries.
555 (m6811_page2_opcodes): Likewise.
556 (m6811_page3_opcodes): Likewise.
557 (m6811_page4_opcodes): Likewise.
558 (m6812_page1_opcodes): New table for 68HC12 instructions.
559 (m6812_page2_opcodes): Likewise.
560 (gen_fetch_operands): New modes [] and &[] for 68HC12 operands.
561 (gen_save_result): Likewise.
562 (gen_interpreter_for_table): Handle 68HC11 and 68HC12 opcodes.
563 (cmp_opcode): New function for opcode comparision.
564 (prepare_table): Sort the opcodes.
565 (gen_interpreter): Prepare all the tables and generate either
566 a 68HC11 or a 68HC12 simulator.
567 (main): New options -m6811 and -m6812.
568
569 * m68hc11_sim.c (cpu_single_step): Use pointer to cpu interpretor.
570 (cpu_special): Simulation of some 68HC12 instructions.
571 (cpu_exg): New function.
572 (cpu_dbcc): Likewise.
573 (cpu_fetch_relbranch16): Likewise.
574 (cpu_push_all): Push according to 68HC11 or 68HC12.
575 (cpu_move16): Likewise.
576 (cpu_move8): Likewise.
577 (cpu_get_indexed_operand16): Likewise.
578 (cpu_get_indexed_operand8): Likewise.
579 (cpu_get_indexed_operand_addr): Likewise.
580 (cpu_set_reg, cpu_set_dst_reg, cpu_get_src_reg, cpu_get_reg): Likewise.
581 (cpu_reset): Setup INIT register according to architecture.
582
583 * sim-main.h (M6811_Special): Add 68HC12 specific instructions.
584 (_sim_cpu): Keep track of the cpu being simulated.
585 (cpu_get_tmp3, cpu_get_tmp2, cpu_set_tmp3, cpu_set_tmp2): New.
586 (cpu_m68hc11_push_uintxx): Rename of cpu_push_uintxx.
587 (cpu_m68hc11_pop_uint8): Likewise.
588 (cpu_m68hc12_push_uintxx): New functions for 68HC12.
589 (cpu_m68hc12_pop_uintxx): Likewise.
590 (cpu_exg, cpu_dbcc, cpu_move8, cpu_move16): Likewise,
591 (cpu_fetch_relbranch16): Likewise.
592 (cpu_interp_m6811): Rename of cpu_interp.
593 (cpu_interp_m6812): New function.
594 * interp.c (free_state): New function.
595 (dev_list_68hc12): New table.
596 (sim_board_reset): Reset depending on the cpu (HC11 or HC12).
597 (sim_hw_configure): New function.
598 (sim_prepare_for_program): New function.
599 (sim_open): Use above new functions.
600 (sim_close): Call free_state().
601 (sim_info): Print info according to cpu.
602 (sim_create_inferior): Use sim_prepare_for_program.
603 (sim_do_command): Configure the hardware after a change of the
604 architecture.
605
606 2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
607
608 * dv-m68hc11sio.c (m68hc11sio_tx_poll): Always check for
609 pending interrupts.
610 * interrupts.c (interrupts_process): Keep track of the last number
611 of masked insn cycles.
612 (interrupts_initialize): Clear last number of masked insn cycles.
613 (interrupts_info): Report them.
614 (interrupts_update_pending): Compute clear and set masks of
615 interrupts and clear the interrupt bits before setting them
616 (due to SCI interrupt sharing).
617 * interrupts.h (struct interrupts): New members last_mask_cycles
618 and xirq_last_mask_cycles.
619
620 2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr>
621
622 * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Use attach_size
623 instead of a hard-coded value.
624 (m68hc11cpu_io_write_buffer): Likewise.
625 (dv_m68hc11_descriptor): Define a 68hc12 device.
626 * dv-m68hc11eepr.c (dv_m68hc11eepr_descriptor): Likewise.
627 * dv-m68hc11tim.c (dv_m68hc11tim_descriptor): Likewise.
628 * dv-m68hc11spi.c (dv_m68hc11spi_descriptor): Likewise.
629 * dv-m68hc11sio.c (dv_m68hc11sio_descriptor): Likewise.
630
631 2000-11-22 Stephane Carrez <Stephane.Carrez@worldnet.fr>
632
633 * dv-m68hc11.c (attach_m68hc11_regs): Register a delete handler.
634 (m68hc11cpu_delete): Delete handler to detach the address space.
635
636 2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
637
638 * dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc.
639 * dv-nvram.c (attach_nvram_regs): Use hw_free and hw_malloc
640 instead of free and malloc.
641
642 2000-09-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
643
644 * Makefile.in: Was missing from initial patch.
645
646 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr>
647
648 * interp.c (sim_store_register): Remove soft register hack.
649 (sim_fetch_register): Likewise.
650 (sim_create_inferior): Likewise.
651 * sim-main.h: Likewise.
652
653 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr>
654
655 * interrupts.c (interrupts_update_pending): Clear the mask of
656 pending interrupts here.
657 (interrupts_get_current): Don't clear the mask of pending interrupts.
658
659 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr>
660
661 * sim-main.h: Define cycle_to_string.
662 * dv-m68hc11tim.c (cycle_to_string): New function to translate
663 the cpu cycle into some formatted time string.
664 (m68hc11tim_print_timer): Use it.
665 * dv-m68hc11sio.c (m68hc11sio_info): Use cycle_to_string.
666 * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
667 * interrupts.c (interrupts_info): Likewise.
668 * m68hc11_sim.c (cpu_info): Likewise.
669
670 2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
671
672 * dv-m68hc11tim.c (m68hc11tim_timer_event): Compute the overflow
673 interrupt and compare events accurately. Take into account the
674 pending ticks not processed by the simulator yet (introduced a shift).
675 (m68hc11_port_event): Reset the timer interrupt delays.
676 (m68hc11tim_io_read_buffer): Be able to read several bytes.
677 (m68hc11tim_io_write_buffer): Likewise for write.
678 (m68hc11tim_io_write_buffer): Recompute the timer overflow interrupt.
679
680 2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
681
682 * dv-m68hc11spi.c (m68hc11spi_io_read_buffer): Clear the interrupts.
683 (m68hc11spi_io_write_buffer): Likewise and fix the spi frame.
684 (m68hc11spi_info): Clarify the status report
685 of the SPI when a byte is being sent.
686 (m68hc11spi_clock): Fix the spi send frame.
687
688 2000-08-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
689
690 * sim-main.h (m68hc11_map_level): Define level of address mappings.
691 * dv-m68hc11eepr.c (struct m68hc11eepr ): New flag to indicate
692 whether the eeprom is currently mapped or not.
693 (m68hc11eepr_port_event): Use the flag to see if we must unmap
694 or map the eeprom. Update the flag to reflect the current state.
695 Use M6811_EEPROM_LEVEL when mapping the eeprom.
696 (m68hc11eepr_finish): Remove overlap hack.
697 (attach_m68hc11eepr_regs): Use M6811_IO_LEVEL when mapping the
698 config and control registers.
699 * dv-m68hc11.c (m68hc11cpu_finish): Remove overlap hack.
700 (attach_m68hc11_regs): Use M6811_IO_LEVEL.
701 (m68hc11cpu_io_write): Likewise when unmapping and re-mapping.
702 * dv-m68hc11spi.c (m68hc11spi_finish): Likewise.
703 (attach_m68hc11spi_regs): Likewise.
704 * dv-m68hc11tim.c (m68hc11tim_finish): Likewise.
705 (attach_m68hc11tim_regs): Likewise.
706 * dv-m68hc11sio.c (m68hc11sio_finish): Likewise.
707 (attach_m68hc11sio_regs): Likewise.
708 * interp.c (sim_open): Likewise.
709 * dv-nvram.c (attach_nvram_regs): Likewise.
710
711 Thu Jul 27 21:27:25 2000 Andrew Cagney <cagney@b1.cygnus.com>
712
713 * configure, config.in: Regenerate.
714
715 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
716
717 * Makefile.in (SIM_RUN_OBJS): Define to use nrun.c
718 * dv-m68hc11.c (m68hc11cpu_finish): Register detach address callback.
719 (dv_m6811_detach_address_callback): New function to detach a
720 device from an address space.
721 * dv-m68hc11eepr.c (m68hc11eepr_port_event): Initialize
722 config register according to --cpu-config option.
723 * sim-main.h (_sim_cpu): Add cpu_config member.
724 * interp.c (sim_open): Delete specific simulator options.
725 * m68hc11_sim.c (cpu_option_handler): New options
726 --emulos and -cpu-config <val> to configure the simulator.
727 (cpu_initialize): Initialize cpu_config member.
728
729 2000-06-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
730
731 * emulos.c: Fix indentation and comments.
732 * gencode.c: Likewise.
733 * dv-m68hc11tim.c (m68hc11tim_timer_event): Handle COMPARE_EVENT.
734 (m68hc11tim_io_write_buffer): Write compare registers and
735 setup compare event.
736 * interp.c: Remove unused global variables.
737 * interrupts.c (idefs): New compare interrupts.
738 Fix indentation and comments.
739 * interrupts.h: Likewise.
740
741 2000-06-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
742
743 * dv-m68hc11sio.c: Fix indentation and comments.
744 Remove INT_PORT.
745 * dv-m68hc11.c: Fix indentation and comments.
746 (m68hc11cpu_port_event): Move initialization of M6811_HPRIO from here.
747 * m68hc11_sim.c (cpu_reset): To here.
748 * dv-m68hc11eepr.c: Fix indentation and comments.
749
750 2000-06-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
751
752 * dv-nvram.c: New file, rename from dv-pram.c.
753 * dv-pram.c: Delete file.
754 * sim-main.h: Incorporate m68hc11_sim.h.
755 * m68hc11_sim.h: Delete file.
756 * configure.in: Rename pram into nvram.
757 * interp.c (sim_open): Likewise in creation of device tree.
758
759 2000-05-31 Stephane Carrez <Stephane.Carrez@worldnet.fr>
760
761 * interp.c (sim_open): Create the SPI device.
762 * dv-m68hc11spi.c: New file for SPI device simulation.
763 * configure.in (hw_extra_devices): Add SPI device.
764
765 2000-05-28 Stephane Carrez <Stephane.Carrez@worldnet.fr>
766
767 * interrupts.c (interrupts_initialize): Clear XIRQ accounting.
768 (interrupts_process): Separate IRQ and XIRQ accounting.
769 (interrupts_info): Report XIRQ accounting.
770 * interrupts.h (struct interrupts): Added accounting for XIRQ.
771
772 2000-04-16 Stephane Carrez <stcarrez@worldnet.fr>
773
774 * dv-pram.c (attach_pram_regs): Fix the 'save-modified' mode.
775 * m68hc11_sim.h (_sim_cpu): Allow configuration of cpu mode.
776 * dv-m68hc11.c (attach_m68hc11_regs): Get the cpu MODA,MODB
777 configuration from the 'mode' device tree property.
778 (m68hc11cpu_port_event): Reset M6811_HPRIO to the cpu MODA, MODB
779 configuration.
780
781 2000-02-24 Stephane Carrez <stcarrez@worldnet.fr>
782
783 * sim-main.h: Remove WITH_TARGET_* defines.
784 * Makefile.in (SIM_EXTRA_CFLAGS): Specify the WITH_TARGET_* flags.
785
786 2000-02-08 Stephane Carrez <stcarrez@worldnet.fr>
787
788 * dv-m68hc11sio.c (m68hc11sio_port_event): Setup the SCI to
789 1200 baud when cpu is in bootstrap mode.
790
791 * dv-m68hc11tim.c (m68hc11tim_io_write_buffer): Be able to
792 write in the TCTN timer register.
793
794 * dv-m68hc11sio.c (m68hc11sio_io_write_buffer): Divide cpu clock
795 by 4 to obtain the E clock frequency.
796 (sccr2_desc): Use M6811_TIE for TIE bit.
797 (m68hc11sio_info): Fix baud rate report.
798
799 * dv-m68hc11tim.c (to_realtime): Likewise.
800
801 * interp.c (sim_open): When building device tree, only provide
802 devices that do not exist yet.
803
804 * emulos.c: Fix compilation pb under Windows.
805
806 * dv-m68hc11.c (attach_m68hc11_regs): Get the clock frequency
807 from the 'clock' property.
808
809 2000-01-02 Stephane Carrez <stcarrez@worldnet.fr>
810
811 * m68hc11_sim.h (*_REGNUM): Define.
812 (_sim_cpu): New member cpu_page0_reg table.
813 * interp.c (sim_create_inferior): Fill the cpu_page0_reg table with
814 addresses of soft registers in .page0.
815 (sim_fetch_register, sim_store_register): Use cpu_page0_reg table
816 to get/set soft registers.
817
818 1999-12-31 Stephane Carrez <stcarrez@worldnet.fr>
819
820 * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Clear byte to avoid
821 returning random values.
822
823 1999-12-17 Stephane Carrez <stcarrez@worldnet.fr>
824
825 * gencode.c: Fix "subb N,x" that used a instead of b.
826
827 1999-09-09 Stephane Carrez <stcarrez@worldnet.fr>
828
829 * gencode.c: Fixed sbc8 and adc8 when there was a initial carry.
830
831 1999-09-01 Stephane Carrez <stcarrez@worldnet.fr>
832
833 * sim-main.h (SIM_HANDLES_LMA): Define to enable loading using lma.
834
835 1999-08-14 Stephane Carrez <stcarrez@worldnet.fr>
836
837 * dv-m68hc11.c (attach_m68hc11_regs): Save the size of the
838 register region in the m68hc11cpu struct.
839 (m68hc11cpu_io_write): When the IO mapping addres changes,
840 detach the register region and re-attach it at the new address.
841 (m68hc11cpu_io_read_buffer): Renamed base_address into
842 attach_address.
843 (m68hc11cpu_io_write_buffer): Likewise. Pass the hw pointer
844 to m68hc11cpu_io_write.
845
846 1999-08-13 Stephane Carrez <stcarrez@worldnet.fr>
847
848 * gencode.c: For sbc8, check the carry and increment the source
849 before trying to set the carry for the result.
850
851 1999-05-24 John S. Kallal <kallal@voicenet.com>
852
853 * interp.c (sim_get_info): Don't crash if the command line is 0.
854 Define prototype for sim_get_info() and init_system().
855 (sim_info): Correct call to sim_get_info().
856
857 1999-05-16 Stephane Carrez <stcarrez@worldnet.fr>
858
859 * configure.in: Recognize m6811-*-*.
860 * configure: Regenerate.
861 * m68hc11_sim.h (cpu_ccr_update_add8, cpu_ccr_update_add16,
862 cpu_ccr_update_sub8, cpu_ccr_update_sub16):
863 Correct the computation of carry of 8 and 16-bits add and subtract.
864 * gencode.c: Use cpu_ccr_update_sub8 for subtraction (carry and
865 overflow set in a different manner than add).
866
867 1999-05-14 Stephane Carrez <stcarrez@worldnet.fr>
868
869 * dv-m68hc11.c (dv_m6811_attach_address_callback): Removed a
870 trace message.
871 * interp.c (sim_open, sim_create_inferior): Initialize the
872 cpu_elf_start from the ELF header.
873 * m68hc11_sim.c (cpu_initialize): Clear the new data members.
874 (cpu_restart): Use cpu_elf_start as the starting address when
875 the flag is set.
876 (cpu_special): When cpu_use_elf_start is set, the WAI instruction
877 exits the simulator (exit status is in D).
878 * m68hc11_sim.h (_sim_cpu): Added members cpu_use_elf_start and
879 cpu_elf_star to start execution at address specified in ELF file.
880
881 1999-05-02 Stephane Carrez <stcarrez@worldnet.fr>
882
883 * Makefile.in, config.in, configure, configure.in: New files.
884 * gencode.c: New file, generation of 68HC11 interpreter.
885 * m68hc11_sim.h, m68hc11_sim.c: New files, specific operations
886 for interpreter.
887 * interrupts.c, interrupts.h: New files, management of interrupts.
888 * interp.c, sim-main.h,
889 * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c,
890 dv-m68hc11tim.c, dv-pram.c: New files representing devices for
891 68HC11 (dv-pram.c is generic and could probably migrate to common).
892 * emulos.c: New file, basic emulation of some os.