3 * configure: Regenerate.
7 * configure: Regenerate.
11 * sim-main.h (SIM_CPU): Delete.
15 * sim-main.h (sim_cia): Delete.
19 * sim-main.h (CIA_GET, CIA_SET): Delete.
23 * wrapper.c (arm_pc_get, arm_pc_set): New functions.
24 (sim_open): Declare new local var i. Call CPU_PC_FETCH &
25 CPU_PC_STORE for all cpus.
29 * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
30 * sim-main.h (STATE_CPU): Delete.
34 * configure: Regenerate.
38 * Makefile.in (SIM_OBJS): Move wrapper.o to the start of the list.
42 * Makefile.in (SIM_OBJS): Delete sim-engine.o.
46 * Makefile.in (armos.o, armcopro.o, maverick.o, iwmmxt.o, arminit.o,
47 armrdi.o, armsupp.o, thumbemu.o, bag.o, wrapper.o): Delete rules.
48 * tconfig.h: Delete file.
52 * config.in, configure: Regenerate.
56 * Makefile.in (SIM_RUN_OBJS): Delete.
57 (SIM_EXTRA_CFLAGS): Delete -DSIM_TARGET_SWITCHES and
58 -DSIM_USE_DEPRECATED_RUN_FRONTEND.
59 (SIM_OBJS): Change to $(SIM_NEW_COMMON_OBJS).
60 * sim-main.h: New file.
61 * wrapper.c: Delete armdefs.h, sim-utils.h, and run-sim.h includes.
62 Add sim-main.h and sim-options.h includes.
63 (sim_callback, mem_size, trace): Add TODO comments.
64 (state): Delete static and add TODO comment.
65 (sim_kind, myname, big_endian): Delete.
66 (init): Change big_endian to CURRENT_TARGET_BYTE_ORDER check.
67 (sim_size, sim_trace, sim_info, sim_target_display_usage, sim_load,
68 sim_do_command, sim_set_callbacks, sim_complete_command): Delete.
69 (sim_target_parse_command_line): Mark static.
70 (free_state): New function.
71 (sim_open): Rewrite to use new common logic.
72 (sim_close): Delete body.
76 * Makefile.in (SIM_EXTRA_CFLAGS): Delete -DNEED_UI_LOOP_HOOK.
77 * interp.c [NEED_UI_LOOP_HOOK] (UI_LOOP_POLL_INTERVAL,
78 ui_loop_hook_counter, deprecated_ui_loop_hook): Delete.
79 (sim_resume) [NEED_UI_LOOP_HOOK]: Delete ui code.
83 * armemu.c [MODE32] (handle_v6_insn): Move definition.
84 (ARMul_Emulate26): Initialize do_int after label target.
85 * armemu.h (UNDEF_Test, UNDEF_Shift, UNDEF_MSRPC, UNDEF_MRSPC,
86 UNDEF_MULPCDest, UNDEF_MULDestEQOp1, UNDEF_LSRBPC,
87 UNDEF_LSRBaseEQOffWb, UNDEF_LSRBaseEQDestWb, UNDEF_LSRPCBaseWb,
88 UNDEF_LSRPCOffWb, UNDEF_LSMNoRegs, UNDEF_LSMPCBase,
89 UNDEF_LSMUserBankWb, UNDEF_LSMBaseInListWb, UNDEF_SWPPC,
90 UNDEF_CoProHS, UNDEF_MCRPC, UNDEF_LSCPCBaseWb,
91 UNDEF_UndefNotBounced, UNDEF_ShortInt, UNDEF_IllegalMode,
92 UNDEF_Prog32SigChange, UNDEF_Data32SigChange): Define to while(0).
93 * armsupp.c (ARMul_Align): Convert old style prototype.
94 * bag.c (addtolist, killwholelist): Mark static.
95 (BAG_newbag): Convert old style prototype.
96 * maverick.c (mv_compute_host_endianness): Delete.
97 * wrapper.c (verbosity, sim_set_verbose): Delete.
98 (init): Set state->verbose to 0.
102 * configure.ac: Call SIM_AC_OPTION_ENDIAN, SIM_AC_OPTION_ALIGNMENT,
103 SIM_AC_OPTION_HOSTENDIAN, SIM_AC_OPTION_ENVIRONMENT,
104 SIM_AC_OPTION_INLINE, and SIM_AC_OPTION_WARNINGS.
105 * config.in, configure: Regenerate.
109 * Makefile.in (COPRO): Delete.
110 (SIM_OBJS): Expand COPRO.
111 * configure.ac: Deletd stdint.h check.
113 * configure: Regenerate.
117 * config.in, configure: Regenerate.
118 * tconfig.in: Rename file ...
119 * tconfig.h: ... here.
123 * Makefile.in (SIM_EXTRA_CFLAGS): Add
124 -DSIM_USE_DEPRECATED_RUN_FRONTEND.
125 (SIM_RUN_OBJS): Set to run.o.
129 * configure.ac (AC_CHECK_HEADERS): Delete unistd.h.
130 * aclocal.m4, configure: Regenerate.
134 * configure: Regenerate.
138 * configure: Regenerate.
139 * config.in: Regenerate.
143 * wrapper.c: Convert function declarations to ISO C format.
144 (sim_open): Delete code for handling t,d and z command line
149 * wrapper.c (op_print): New function.
150 (sim_dis_read): New function.
151 (print_insn): New function - disassembles the given instruction.
152 (sim_trace): Note that tracing is now allowed.
153 (sim_create_inferior): Default to emulating v6.
154 Initialise the disassembler machinery.
155 (sim_target_parse_command_line): Add support for -t -d and -z
157 (sim_target_display_usage): Note existence of -d and -z options.
158 (sim_open): Parse -t -d and -z options.
159 * armemu.h: Add exports of trace, disas and trace_funcs.
160 Add prototype for print_insn.
161 * armemu.c (ARMul_Emulate26): Add tracing code.
162 Delete unused variables.
163 * thumbemu (handle_v6_thumb_insn): Delete unused variable Rd.
164 Move Rm variable into switch cases.
167 * armcopro.c (XScale_cp15_init): Add a return value.
168 (XScale_cp13_init): Likewise.
169 (XScale_cp14_init): Likewise.
170 (XScale_cp15_LDC): Delete unused function.
171 (XScale_cp15_STC): Likewise.
172 * maverick.c: Delete comment inside comment.
173 (DSPInit): Delete unused function.
174 (DSPMCR4): Fix compile time warning about missing parenthesis.
176 (DSPCDP6): Delete unused variable opcode2.
181 * armemu.c (WriteR15Load): New function. Determines if the state
182 can be changed upon a write to R15.
183 (LoadMult): Use WriteR15Load.
184 * armemu.h (WRITEDESTB): Use WriteR15Load.
188 * wrapper.c (sim_do_command): Add const to cmd.
192 * wrapper.c (sim_load): Add const to prog.
196 * configure: Regenerate.
200 * aclocal.m4, configure: Regenerate.
205 * armemu.c (ARMul_Emulate32): Emulate instructions MOVW and MOVT.
209 * COPYING: Update to GPL version 3.
214 * armsupp.c (ARMul_MRC): Return 0 if access to the MRC instruction
219 * wrapper.c (libiberty.h): Include.
220 (sim_store_register, sim_fetch_register): On success, return
221 length, instead of -1.
225 * config.in, configure: Regenerate.
229 * wrapper.c (sim_create_inferior): Treat WMMX2 binaries as iWMMXt
236 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
241 * wrapper.c: Include config.h before system header files.
245 * aclocal.m4, config.in, configure: Regenerate.
249 * aclocal.m4: New file.
250 * configure: Regenerate.
254 * configure.ac: Change include to common/acinclude.m4.
258 * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER
259 call. Replace common.m4 include with SIM_AC_COMMON.
260 * configure: Regenerate.
265 * iwmmxt.c (WCMPGT): Sign extend 32-bit values before performing a
267 (WMAC): Extend computed result before adding to result register.
268 (WRSA): Sign extend 32-bit values before shifting.
272 * wrapper.c (sim_complete_command): New stub function.
276 * communicate.c (MYread_char): Check error return from accept() call
277 by its equality to -1 not by it being negative.
278 (MYread_charwait): Likewise.
279 * main.c (main): Likewise for both socket() and accept() calls.
283 * wrapper.c (sim_write): Add const to buffer arg.
287 * configure: Regenerate.
291 * config.in: Regenerate.
292 * configure: Likewise.
294 * configure: Regenerate.
298 * arminit.c, iwmmxt.c: Include <string.h> to
302 * configure: Regenerate to track ../common/common.m4 changes.
309 * configure: Regenerate.
310 * wrapper.c (sim_target_display_usage): Add help parameter.
314 * armos.c (SWIflen): Do not treate file descriptor zero as
319 * armemu.c (handle_v6_insn): Fix typo in sign extension test of
320 the sext and sxtah instructions.
325 * wrapper.c (sim_target_parse_arg_array): Do not return void value.
329 * acconfig.h: Remove.
330 * config.in: Regenerate.
334 * configure: Regenerated.
338 * configure: Regenerated.
342 * configure: Regenerated.
346 * elfos.c (ARMul_OSHandleSWI): Call correct function for IsTTY.
350 * armos.c (ARMul_OSHandleSWI): Handle the RedBoot system
351 call meminfo. Return ENOSYS for unhandled RedBoot syscalls.
355 * wrapper.c (gdb/signals.h): Include it.
356 (SIGTRAP): Don't define.
358 (sim_stop_reason): Use TARGET_SIGNAL_* instead of SIG*.
362 * armos.c: Include limits.h
363 (unlink): Remove this macro. It is unused in this file and
364 conflicts with sim_callback->unlink.
365 (PATH_MAX): Define as 1024 if not already defined.
366 (ReadFileName): New function.
367 (SWIopen): Fix a potential buffer overflow.
368 (SWIremove): New function.
370 (ARMul_OSHandleSWI): Handle the RDP calls SWI_IsTTY,
371 SWI_Remove, and SWI_Rename, as well as the RDI calls
372 AngelSWI_Reason_IsTTY, AngelSWI_Reason_Remove, and
373 AngelSWI_Reason_Rename.
377 * armdefs.h: Define ARMsword and ARMsdword. Use stdint.h when
379 * armemu.c: Use them.
380 * armvirt.c (ARMul_MemoryInit): Use correct type for size.
381 * configure.ac: Check for stdint.h.
382 * config.in: Regenerate.
383 * configure: Regenerate.
387 * thumbemu.c (handle_v6_thumb_insn): New function.
388 (ARMul_ThumbDecode): Call handle_v6_thumb_insn() when an undefined
389 instruction binary is encountered.
393 * Update the address and phone number of the FSF organization in
394 the GPL notices in the following files:
395 COPYING, Makefile.in, armcopro.c, armdefs.h, armemu.c,
396 armemu.h, armfpe.h, arminit.c, armopts.h, armos.c, armos.h,
397 armrdi.c, armsupp.c, armvirt.c, bag.c, bag.h, communicate.c,
398 communicate.h, dbg_conf.h, dbg_cp.h, dbg_hif.h, dbg_rdi.h,
399 gdbhost.c, gdbhost.h, iwmmxt.c, iwmmxt.h, kid.c, main.c,
400 maverick.c, parent.c, thumbemu.c, wrapper.c
404 * armemu.c (handle_v6_insn): New function - emulate a few of the
405 v6 instructions - the ones now generated by GCC.
406 (ARMulEmulate32): Call handle_v6_insn when a possible v6 insn is
408 * armdefs.h (struct ARMul_State): Add new field: is_v6.
409 (ARM_v6_Prop): Define.
410 * arminit.c (ARMul_NewState): Initialise the v6 flag.
411 (ARMul_SelectProcessor): Determine if the v6 flag should be
413 * wrapper.c (sim_create_inferior): For unknown architectures,
414 default to allowing the v6 instructions.
418 * iwmmxt.c (WMAC, WMADD): Move casts from the LHS of an assignment
420 (WSLL, WSRA, WSRL, WUNPCKEH, WUNPACKEL): Use ULL suffix to
421 indicate an unsigned long long constant.
425 * configure: Regenerate.
429 * configure.ac: Sinclude aclocal.m4 before common.m4. Add
430 explicit call to AC_CONFIG_HEADER.
431 * configure: Regenerate.
435 * configure.ac: Update to use ../common/common.m4.
436 * configure: Re-generate.
440 * configure: Regenerated to track ../common/aclocal.m4 changes.
444 * configure.ac: Rename configure.in, require autoconf 2.59.
445 * configure: Re-generate.
449 * configure: Regenerate for ../common/aclocal.m4 update.
453 * armemu.c: Rename ui_loop_hook to deprecated_ui_loop_hook.
457 * armos.c (fcntl.h): Do not include it.
458 (O_RDONLY): Do not define.
459 (O_WRONLY): Likewise.
461 (targ-vals.h): Include it.
462 (translate_open_mode): Use TARGET_O_* instead of O_*.
464 * Makefile.in (armos.o): Depend on targ-vals.h.
468 * armvirt.c (GetWord): Only call XScale_check_memacc if in XScale
474 * configure.in (CON_FLAGS): Remove.
475 (COPRO): Unconditionally include iwmmxt.o.
476 * configure: Regenerate.
477 * Makefile.in (CON_FLAGS): Remove.
478 * armcopro.c: Remove use of __IWMMXT__ flag.
479 * wrapper.c: Likewise.
480 * armemu.c: Likewise.
481 Add explanatory comment for suppressed code.
485 * armos.c (ARMul_OsHandleSWI): Catch SWIs for unhandled vectors.
489 * configure.in: (CON_FLAGS): Define and intialise.
490 (COPRO): Add iwmmxt.o if configuring for XScale.
491 * configure: Regenerate.
492 * Makefile.in (iwmmxt.o): Add rule to build.
494 (ALL_FLAGS): Add CON_FLAGS.
495 * armcopro.c (ARMul_CoProInit): Initialise iWMMXt coprocessors.
496 * armdefs.h (struct ARMul_State): Add 'is_iWMMXt' field.
497 (ARM_iWMMXt_Prop): Define.
498 * armemu.c (ARMul_Emulate16): Intercept iWMMXt instructions and
500 * arminit.c (ARMul_NewState): Initialise 'is_iWMMXt'.
501 (ARMul_Abort): Catch branches through uninitialised vectors.
502 * armos.c (softevtorcode): Update comment.
503 (ARMul_OsInit): Use ARMUndefinedInstrV.
504 * wrapper.c (sim_create_inferior): Handle iWMMXt processor type.
505 (sim_store_register): Handle iWMMXt registers.
506 (sim_fetch_register): Handle iWMMXt registers.
507 * iwmmxt.h: New file. Exported iWMMXt coprocessor emulator
509 * iwmmxt.c: New file: iWMMXt emulator.
513 * Contribute support for Cirrus Maverick ARM co-processor,
517 * maverick.c: New file: Support for Maverick floating point
519 * Makefile.in: Add maverick.o target.
520 * configure.in (COPRO): Add maverick.o.
521 * configure: Regenerate.
522 * armcopro.c (ARMul_CoProInit): Only initialise co-processors
523 available on target processor. Add code to initialse Maverick
524 co-processor support code.
525 * armdefs.h (ARMul_state): Add is_ep9312 field.
526 (ARM_ep9312_Prop): Define.
527 * armemu.h: Add prototypes for Maverick co-processor
529 * arminit.c (ARMul_SelectProcessor): Initialise the
530 co-processor support once the chip has been selected.
531 * wrapper.c: Add support for Maverick co-processor.
532 (init): Do not call ARMul_CoProInit. Delays this until the
533 chip has been selected.
537 * armos.c (SWIWrite0): Catch big-endian bug when printing
542 * wrapper.c (sim_create_inferior, sim_open): Rename _bfd to bfd.
546 * README.Cygnus: Rename from this ..
547 * README: .. to this.
551 * wrapper.c (sim_open): Add support for -m<mem-size>.
552 (mem_size): Reduce to 2MB.
557 * armos.c (ARMul_OSHandleSWI): Catch and ignore SWIs of -1, they
558 can be caused by an interrupted system call being resumed by GDB.
562 * armemu.c (ARMul_Emulate32): Add more tests for valid MIA, MIAPH
563 and MIAxy instructions.
567 * armos.h (ADP_Stopped_RunTimeError): Set correct value.
571 * configure: Regenerated to track ../common/aclocal.m4 changes.
575 * Makefile.in: Update copyright.
576 (wrapper.o): Specify dependencies.
577 * wrapper.c: Include "gdb/sim-arm.h".
578 (sim_store_register, sim_fetch_register): Rewrite using `enum
579 arm_sim_regs' and a switch.
583 * wrapper.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
584 * armos.c: Include "gdb/callback.h".
588 * armcopro.c (XScale_check_memacc): Set the FSR and FAR registers
589 if a Data Abort is detected.
593 * armvirt.c (GetWord): Only perform access checks if 'check'
596 * wrapper.c (sim_create_inferior): Report unknown machine
598 * thumbemu.c (ARMul_ThumbDecode, Case 31): Do not set LR to pc +
599 2, it has already been advanced.
603 * thumbemu.c (ARMul_ThumbDecode): When decoding a BLX(1)
604 instruction do not add in the second bit of the base address -
605 this has already been accounted for.
609 * armcopro.c (check_cp13_access): Allow access to register 1 when
611 (write_cp13_reg): Allow bit 0 of reg 1 of CRm 1 to be written to.
615 * Makefile.in (SIM_TARGET_SWITCHES): Define.
616 * armos.c (swi_mask): Define. Initialise to supporting all
618 (ARMul_OSInit): For XScale targets, only support the ANGEL
619 SWI interface. (This is at the request if Intel).
620 (ARMul_OSHandleSWI): Examine swi_mask to see if a particular
621 SWI call should be emulated.
622 Do not fall through from AngelSWI_Reason_WriteC.
623 Propagate exit code from RedBoot Exit SWI.
624 * rdi-dgb.h (swi_mask): Prototype.
625 (SWI_MASK_DEMON, SWI_MASK_ANGEL, SWI_MASK_REDBOOT): Define.
626 * wrapper.c (sim_target_parse_command_line): New function.
627 Look for and handle --swi-support switch.
628 (sim_target_parse_arg_array): New function. Process an argv
629 array for parsing by sim_target_parse_command_line.
630 (sim_target_display_usage): New function. Describe syntax of
631 --swi-suppoort switch.
632 (sim_open): Add call to sim_target_parse_arg_array).
636 * armos.c (ARMul_OSHandleSWI): Support the RedBoot SWI in ARM
637 mode and some of its system calls.
641 * wrapper.c (mem_size): Increase the default target memory to 8MB.
645 * armos.c (SWIWrite0): Use generic host_callback mechanism
646 for supported OS functions "open", "close", "write", etc.
649 (SWIwrite): Likewise.
651 (ARMul_OSHandleSWI): Likewise.
655 * wrapper.c (sim_create_inferior): Modify previous patch so that
656 it is only triggered for COFF format executables.
660 * wrapper.c (sin_create_inferior): If a v5 architecture is
661 detected, assume it might be an XScale binary, since there is no
662 way to distinguish between the two in the COFF file format.
666 * arminit.c (ARMul_Abort): Fix parameters passed to CPRead[13].
667 * armemu.c (ARMul_Emulate32): Fix parameters passed to CPRead[13]
669 Fix formatting. Improve layout.
670 * armemu.h: Fix formatting. Improve layout.
674 * wrapper.c (sim_fetch_register): If fetching more than 4 bytes
675 return zeroes in the other words.
676 General formatting tidy ups.
680 * Makefile.in (armemu32.o): Replace $< with autoconf recommended
686 * armemu.h (CP_ACCESS_ALLOWED): New macro.
688 * armcopro.c (read_cp14_reg): Make static.
689 (write_cp14_reg): Make static.
690 (check_cp13_access): Use CP_ACCESS_ALLOWED macro.
692 * armsupp.c (ARMul_LDC): Check CP_ACCESS_ALLOWED.
693 (ARMul_STC): Check CP_ACCESS_ALLOWED.
694 (ARMul_MCR): Check CP_ACCESS_ALLOWED.
695 (ARMul_MRC): Check CP_ACCESS_ALLOWED.
696 (ARMul_CDP): Check CP_ACCESS_ALLOWED.
698 * armemu.c (MCRR): Check CP_ACCESS_ALLOWED. Test Rd and Rn not
700 (MRRC): Check CP_ACCESS_ALLOWED. Test Rd and Rn not equal to 15.
705 * armemu.c (ARMul_Emulate32): Fix handling of XScale LDRD and STRD
706 instructions with post indexed addressing modes.
710 * armsupp.c (ARMul_FixCPSR): Check Mode not Bank in order to
711 determine rocesor mode.
715 * armcopro.c (write_cp15_reg): Set CHANGEMODE if endianness changes.
716 (read_cp15_reg): Make non-static.
717 (XScale_cp15_LDC): Update for write_cp15_reg() change.
718 (XScale_cp15_MCR): Likewise.
719 (XScale_cp15_write_reg): Likewise.
720 (XScale_check_memacc): New function. Check for breakpoints being
721 activated by memory accesses. Does not support the Branch Target
723 (XScale_set_fsr_far): New function. Set FSR and FAR for XScale.
724 (XScale_debug_moe): New function. Set the debug Method Of Entry,
726 (write_cp14_reg): Reset count counter if requested.
727 * armdefs.h (struct ARMul_State): New members `LastTime' and
728 `CP14R0_CCD' used for the timer/counters.
729 (ARMul_CP13_R0_FIQ, ARMul_CP13_R0_IRQ, ARMul_CP13_R8_PMUS,
730 ARMul_CP14_R0_ENABLE, ARMul_CP14_R0_CLKRST, ARMul_CP14_R0_CCD,
731 ARMul_CP14_R0_INTEN0, ARMul_CP14_R0_INTEN1, ARMul_CP14_R0_INTEN2,
732 ARMul_CP14_R0_FLAG0, ARMul_CP14_R0_FLAG1, ARMul_CP14_R0_FLAG2,
733 ARMul_CP14_R10_MOE_IB, ARMul_CP14_R10_MOE_DB, ARMul_CP14_R10_MOE_BT,
734 ARMul_CP15_R1_ENDIAN, ARMul_CP15_R1_ALIGN, ARMul_CP15_R5_X,
735 ARMul_CP15_R5_ST_ALIGN, ARMul_CP15_R5_IMPRE, ARMul_CP15_R5_MMU_EXCPT,
736 ARMul_CP15_DBCON_M, ARMul_CP15_DBCON_E1, ARMul_CP15_DBCON_E0): New
737 defines for XScale registers.
738 (XScale_check_memacc, XScale_set_fsr_far, XScale_debug_moe): Prototype.
739 (ARMul_Emulate32, ARMul_Emulate26): Clean up function definition.
740 (ARMul_Emulate32): Handle the clock counter and hardware instruction
741 breakpoints. Call XScale_set_fsr_far() for software breakpoints and
743 (LoadMult): Call XScale_set_fsr_far() for data aborts.
744 (LoadSMult): Likewise.
745 (StoreMult): Likewise.
746 (StoreSMult): Likewise.
747 * armemu.h (write_cp15_reg): Update prototype.
748 * arminit.c (ARMul_NewState): Initialise CP14R0_CCD and LastTime.
749 (ARMul_Abort): If XScale, check for FIQ and IRQ being enabled in CP13
751 * armvirt.c (GetWord): Call XScale_check_memacc().
756 * armvirt.c (ARMul_ReLoadInstr): Do not enable alignment checking
757 when loading unaligned thumb instructions.
761 * thumbemu.c (ARMul_ThumbDecode): Delete label bo_blx2.
762 Compute destination address of BLX(1) instruction by
763 taking bit 1 from PC and not from bit 0 of the offset.
767 * armvirt.c (GetWord): Add new parameter - check - to enable or
768 disable the alignment checking.
769 (PutWord): Add new parameter - check - to enable or disable the
771 (ARMul_ReLoadInstr): Pass extra parameter to GetWord.
772 (ARMul_ReadWord): Pass extra parameter to GetWord.
773 (ARMul_WriteWord): Pass extra parameter to PutWord.
774 (ARMul_StoreHalfWord): Pass extra parameter to PutWord.
775 (ARMul_WriteByte): Pass extra parameter to GetWord.
776 (ARMul_SwapWord): Pass extra parameter to PutWord.
777 (ARMul_SafeReadByte): New Function: Read a byte but do not abort.
778 (ARMul_SafeWriteByte): New Function: Write a byte but do not abort.
780 * armdefs.h: Add prototypes for ARMul_SafeReadByte and
783 * wrapper.c (sim_write): Use ARMul_SafeWriteByte.
784 (sim_read): Use ARMul_SafeReadByte.
786 * armos.c (in_SWI_handler): Remove.
787 (SWIWrite0): Use ARMul_SafeReadByte.
788 (WriteCommandLineTo): Use ARMul_SafeWriteByte.
789 (SWIopen): Use ARMul_SafeReadByte.
790 (SWIread): Use ARMul_SafeWriteByte.
791 (SWIwrite): Use ARMul_SafeReadByte.
792 (ARMul_OSHandleSWI): Remove use of is_SWI_handler.
793 (ARMul_OSException): Remove use of is_SWI_handler.
797 * armemu.c: Remove Prefetch abort for breakpoints. Instead set
802 * armemu.c: Add code to preserve processor mode when a prefetch
803 abort is signalled after processing a breakpoint.
805 * wrapper.c (sim_create_inferior): Reset processor into ARM mode
806 for any machine type except the early ARMs.
810 * armos.c (in_SWI_handler): New static variable.
811 (ARMul_OSHandleSWI): Set in_SWI_handler whilst emulating a SWI.
812 (ARMul_OSException): Ignore exceptions generated whilst emulating
817 * armemu.h (NEGBRANCH): Fix defintion.
821 * armemu.c (LoadSMult): Update base address register after
822 restoring register bank.
823 (StoreMult): Update base address register after restoring register
828 * armvirt.c (PutWord): Detect installation of SWI vector.
829 (SWI_vector_installed): Define.
830 * armos.c (ARMul_OsInit): Reset SWI_vector_installed.
831 * armos.h (SWI_vector_installed): Declare.
832 * wrapper.c (SWI_vector_installed): Remove definition.
833 (sim_write): Remove check of SWI vector installation
837 * armemu.c (ARMul_Emulate26): Fix test for StoreDouble
842 * armos.c (ARMul_OSHandleSWI): Add 0x91 as an FPE SWI.
846 * armemu.c (ARMul_Emulate26): Detect double word load and
847 store instructions and call emulation routines.
848 (Handle_Load_Double): Emulate a double word load instruction.
849 (Handle_Store_Double): Emulate a double word store
854 * armos.c: Fix formatting.
855 (ARMul_OSHandleSWI): Suppress support of DEMON SWIs when in xscale
860 * armdefs.h (State): Add 'v5e' and 'xscale' fields.
861 (ARM_v5e_Prop): Define.
862 (ARM_XScale_Prop): Define.
864 * wrapper.c (sim_create_inferior): Select processor based on
866 (SWI_vector_installed): New boolean. Set to true if the SWI
867 vector address is written to by the executable.
869 * arminit.c (ARMul_NewState): Switch default to 32 bit mode.
870 (ARMul_SelectProcessor): Initialise v5e and xscale signals.
871 (ARMul_Abort): Fix calculation of LR address.
873 * armos.c (ARMul_OSHandleSWI): If a SWI vector has been installed
874 and a SWI is not handled by the simulator, pass the SWI off to the
875 vector, otherwise issue a warning message and continue.
877 * armsupp.c (ARMul_CPSRAltered): Set S bit aswell.
879 * thumbemu.c: Add v5 instruction simulation.
880 * armemu.c: Add v5, XScale and El Segundo instruction simulation.
882 * armcopro.c: Add XScale co-processor emulation.
883 * armemu.h: Add exported XScale co-processor functions.
887 * armdefs.h: Rename StrongARM property to v4_ARM and add v5 ARM
888 property. Delete unnecessary processor names.
889 (ARM_Strong_Prop): Delete.
893 (State): Delete is_StrongARM boolean. Add is_v4 and is_v5
896 * armemu.h (BUSUSEDINCPCS): Use is_v4 boolean.
897 (BUSUSEDINCPCN): Use is_v4 boolean.
899 * arminit.c (ARMul_NewState): Initialise is_v4 and is_v5 fields.
900 (ARMul_SelectProcessor): Change second parameter from 'processor'
901 to 'properties'. Set is_v4 and is_v5 booleans in State.
903 * armrdi.c: Remove use of ARM processor names. Replace with ARM
904 processor properties.
906 * wrapper.c (sim_create_inferior): Choose properties passed to
907 ARMul_SelectProcessor based on machine number.
911 * armemu.c (LHPOSTDOWN): Compute write back value before
912 performing load in case the offset register is overwritten.
917 * wrapper.c (sim_create_inferior): Fix typo in the previous patch.
921 * wrapper.c (sim_create_inferior): Reset mode to ARM when creating a
926 * armvirt.c (ABORTS): Do not define.
928 * armdefs.h (struct ARMul_State): Add is_StrongARM.
929 (ARM_Strong_Prop, STRONGARM): Define.
930 * arminit.c (ARMul_NewState): Reset is_StrongARM.
931 (ARMul_SelectProcessor): Set is_StrongARM.
932 * wrapper.c (sim_create_inferior): Use bfd machine type to
933 determine processor type to emulate.
934 * armemu.h (BUSUSEDINCPCS, BUSUSEDINCPCN): Don't increment PC
935 when emulating StrongARM.
937 * armemu.c (ARMul_Emulate, t_undefined): Proceed to next insn.
939 * armemu.h (INSN_SIZE): New macro.
940 (SET_ABORT): Save CPSR in SPSR and set LR.
941 * armemu.c (ARMul_Emulate, isize): Set to INSN_SIZE.
942 (WriteR15, WriteSR15): Do not discard bit 1 in Thumb mode.
943 * arminit.c (ARMul_Abort): Use new SETABORT and INSN_SIZE.
945 * armemu.c (LoadSMult): Use WriteR15() to discard the least
946 significant bits of PC.
948 * armemu.h (WRITEDESTB): New macro.
949 * armemu.c (ARMul_Emulate26, bl): Use WriteR15Branch() to
950 modify PC. Moved the existing logic...
951 (WriteR15Branch): ... here. New function.
952 (WriteR15, WriteSR15): Drop the two least significant bits.
953 (LoadSMult): Use WriteR15Branch() to modify PC.
954 (LoadMult): Use WRITEDESTB() instead of WRITEDEST().
956 * armemu.h (GETSPSR): Call ARMul_GetSPSR().
957 * armsupp.c (ARMul_CPSRAltered): Zero out bits as they're
958 extracted from state->Cpsr, but preserve the unused bits.
959 (ARMul_GetCPSR): Get bits preserved in state->Cpsr.
960 (ARMul_GetSPSR, ARMul_FixCPSR): Use ARMul_GetCPSR() to
961 get the full CPSR word.
963 * armemu.h (PSR_FBITS, PSR_SBITS, PSR_XBITS, PSR_CBITS): New.
964 (SETPSR_F, SETPSR_S, SETPSR_X, SETPSR_C): New macros.
965 (SETPSR, SET_INTMODE, SETCC): Removed.
966 * armsupp.c (ARMul_FixCPSR, ARMul_FixSPSR): Do not test bit
967 mask. Use SETPSR_* to modify PSR.
968 (ARMul_SetCPSR): Load all bits from value.
969 * armemu.c (ARMul_Emulate, msr): Do not test bit mask.
971 * armemu.c (ARMul_Emulate): Compute writeback value before
972 loading, since the offset register may be the destination
975 * armdefs.h (SYSTEMBANK): Define as USERBANK.
976 * armsupp.c (ARMul_SwitchMode): Remove SYSTEMBANK cases.
980 * armemu.c (Multiply64): Fix computation of flag N.
982 * armemu.c (MultiplyAdd64): Fix computation of flag N.
986 * armemu.h (NEGBRANCH): Do not overwrite the two most significant
991 * armcopro.c (MMUMCR): Only indicate mode change if a singal has
993 (MMUWrite): Only indicate mode change if a singal has really
996 * armdefs.h (SYSTEMMODE): Define.
997 (BANK_CAN_ACEESS_SPSR): Define.
999 * armemu.c (ARM_Emulate26): If the mode has changed allow the PC
1000 to advance before stopping the emulation.
1002 * arminit.c (ARMul_Reset): Ensure Mode field of State is set
1005 * armos.c (ARMul_OSInit): Create a initial stack pointer for
1008 * armsupp.c (ModeToBank): Remove unused first parameter.
1009 Add support for System Mode.
1010 (ARMul_GetSPSR): Use BANK_CAN_ACCESS_SPSR macro.
1011 (ARMul_SetSPSR): Use BANK_CAN_ACCESS_SPSR macro.
1012 (ARMul_FixSPSR): Use BANK_CAN_ACCESS_SPSR macro.
1013 (ARMulSwitchMode): Add support for System Mode.
1017 * configure: Regenerated to track ../common/aclocal.m4 changes.
1021 * wrapper.c (sim_store_register): Special handling for CPSR
1026 * armemu.c (LoadSMult, LoadMult): Correct handling of aborts.
1031 * wrapper.c (sim_open,sim_close): Copy into myname, free myname.
1035 * wrapper.c: Fix compile time warning messages.
1036 * armcopro.c: Fix compile time warning messages.
1037 * armdefs.h: Fix compile time warning messages.
1038 * armemu.c: Fix compile time warning messages.
1039 * armemu.h: Fix compile time warning messages.
1040 * armos.c: Fix compile time warning messages.
1041 * armsupp.c: Fix compile time warning messages.
1042 * armvirt.c: Fix compile time warning messages.
1043 * bag.c: Fix compile time warning messages.
1047 * *.[ch]: Use indent to make readable.
1051 * armos.c (SWIread): Generate an error message if a huge read is
1053 (SWIwrite): Generate an error message if a huge write is
1058 * thumbemu.c (ARMul_ThumbDecode): Accept 0xbebe as a thumb
1063 * armos.c (SWIopen): Always pass third parameter with 0666 since
1064 otherwise uninitialized memory gets access if the O_CREAT bit is
1065 set and so we possibly cannot access the file afterwards.
1069 * armos.c (SWIWrite0): Send output to stdout instead of stderr.
1070 (ARMul_OSHandleSWI, case SWI_WriteC,AngelSWI_Reason_WriteC): Ditto.
1074 * configure: Regenerated to track ../common/aclocal.m4 changes.
1078 * configure: Regenerated to track ../common/aclocal.m4 changes.
1082 * wrapper.c (stop_simulator): New global.
1083 (sim_stop): Set sim state to STOP and set
1085 (sim_resume): Reset stop_simulator.
1086 (sim_stop_reason): If stop_simulator is set, tell gdb
1087 that the we took SIGINT.
1088 * armemu.c (ARMul_Emulate26): Don't loop forever. Stop if
1089 stop_simulator is set.
1093 * armemu.c (ARMul_Emulate26): If NEED_UI_LOOP_HOOK, call ui_loop_hook
1094 whenever the counter expires.
1095 * Makefile.in (SIM_EXTRA_CFLAGS): Include define NEED_UI_LOOP_HOOK.
1099 * armemu.c (ARMul_Emulate26): Handle new breakpoint value.
1100 * thumbemu.c (ARMul_ThumbDecode): Handle new breakpoint value.
1104 * wrapper.c (sim_open): Set endianness according to BFD or command
1107 * tconfig.in: Define SIM_HAVE_BIENDIAN.
1111 * armemu.c (Multiply64): Test for Rm (rather than Rs) not being
1112 the same as either RdHi or RdLo.
1116 * armos.c (ARMul_OSHandleSWI: AngelSWI_Reason_ReportException):
1117 Set Reg[0] based on reason for for the exception.
1121 * armos.c (SWIwrite0): New function.
1122 (WriteCommandLineTo): New function.
1123 (SWIopen): New function.
1124 (SWIread): New function.
1125 (SWIwrite): New function.
1126 (SWIflen): New function.
1127 (ARMul_OSHandleSWI): Call new functions instead of handling
1129 (ARMul_OSHandleSWI): Handle Angel SWIs correctly.
1130 (*): Reformat spacing to be a bit more GNUly.
1131 Most code taken from a patch by Anthony Thompson
1136 * armos.h: Add Angel SWI and its reason codes.
1137 * armos.c (ARMul_OSHandleSWI): Ignore Angel SWIs (for now).
1141 * armos.c (ARMul_OSHandleSWI::SWI_Open): Handle special case
1142 of ":tt" to catch stdin in addition to stdout.
1143 (ARMul_OSHandleSWI::SWI_Seek): Return 0 or 1 to indicate failure
1144 or success of lseek().
1148 * armos.c (ARMul_OSHandleSWI): Special case code to catch attempts
1153 * armos.c (ARMul_OSHandleSWI): Added code for SWI_Clock,
1154 SWI_Flen, and SWI_Time. Also fixed SWI_Seek code to only
1155 seek from offset 0 and not to use R2 for whence since it is
1156 not passed as part of the SWI call.
1160 * configure: Regenerated to track ../common/aclocal.m4 changes.
1162 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
1164 * configure: Regenerated to track ../common/aclocal.m4 changes.
1169 * acconfig.h: New file.
1170 * configure.in: Reverted change of Apr 24; use sinclude again.
1172 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
1174 * configure: Regenerated to track ../common/aclocal.m4 changes.
1179 * configure.in: Don't call sinclude.
1183 * configure: Regenerated to track ../common/aclocal.m4 changes.
1187 * configure: Regenerated to track ../common/aclocal.m4 changes.
1191 * configure: Regenerated to track ../common/aclocal.m4 changes.
1195 * configure: Regenerated to track ../common/aclocal.m4 changes.
1199 * armopts.h: Remove definition of LITTLEND - it is not used.
1203 * wrapper.c (sim_store_register, sim_fetch_register): Pass in
1204 length parameter. Return -1.
1208 * configure: Regenerated to track ../common/aclocal.m4 changes.
1212 * configure: Regenerated to track ../common/aclocal.m4 changes.
1214 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
1216 * configure: Regenerated to track ../common/aclocal.m4 changes.
1220 * configure: Regenerated to track ../common/aclocal.m4 changes.
1225 * Makefile.in: Updated with changes from branch.
1227 * armemu.c: ditto these changes
1228 * armemu.h: ditto add support for
1229 * armos.c: ditto the Thumb instruction
1230 * armsupp.c: ditto set and the new v4
1231 * armvirt.c: ditto architecture.
1233 * thumbemu.c: New file from branch.
1238 * configure: Regenerated to track ../common/aclocal.m4 changes.
1242 * armos.c (ARMul_OSHandleSWI): Add support for GetEnv SWI. Patch
1245 * wrapper.c (sim_create_inferior): Add code to create an execution
1250 * wrapper.c (sim_load): Pass lma_p and sim_write args to
1255 * configure: Regenerated to track ../common/aclocal.m4 changes.
1259 * configure: Regenerated to track ../common/aclocal.m4 changes.
1263 * configure: Regenerated to track ../common/aclocal.m4 changes.
1267 * configure: Regenerated to track ../common/aclocal.m4 changes.
1271 * configure: Regenerated to track ../common/aclocal.m4 changes.
1275 * configure: Regenerated to track ../common/aclocal.m4 changes.
1277 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
1279 * configure: Regenerated to track ../common/aclocal.m4 changes.
1283 * configure: Regenerated to track ../common/aclocal.m4 changes.
1288 * wrapper.c (sim_kill): Delete.
1289 (sim_create_inferior): Add ABFD argument.
1290 (sim_load): Move setting of PC from here.
1291 (sim_create_inferior): To here.
1295 * configure: Regenerated to track ../common/aclocal.m4 changes.
1300 * wrapper.c (sim_open): Add ABFD argument.
1304 * wrapper.c (sim_open): Add callback argument.
1305 (sim_set_callbacks): Drop SIM_DESC argument.
1309 * configure: Regenerated to track ../common/aclocal.m4 changes.
1313 * wrapper.c (sim_stop): Stub sim_stop function.
1317 * arminit.c (ARMul_NewState): Preinitialize the state to
1322 * Makefile.in (SIM_OBJS): Add sim-load.o.
1323 * wrapper.c (sim_kind,myname): New static locals.
1324 (sim_open): Set sim_kind, myname.
1325 (sim_load): Call sim_load_file to do work. Set start address from bfd.
1326 (sim_create_inferior): Return SIM_RC. Delete start_address arg.
1330 * wrapper.c (sim_trace): Update so that it matches prototype.
1334 * configure: Regenerated to track ../common/aclocal.m4 changes.
1339 * Makefile.in (armemu32.o): Replace $< with autoconf recommended
1341 (armemu26.o): Ditto.
1345 * wrapper.c (sim_open): New arg `kind'.
1347 * configure: Regenerated to track ../common/aclocal.m4 changes.
1351 * COPYING: Update FSF address.
1355 * configure: Regenerated to track ../common/aclocal.m4 changes.
1359 * configure: Regenerated to track ../common/aclocal.m4 changes.
1363 * configure: Re-generate.
1367 * configure: Regenerate to track ../common/aclocal.m4 changes.
1371 * wrapper.c (sim_open): Has result now.
1372 (sim_*): New SIM_DESC argument.
1376 * Makefile.in (@COMMON_MAKEFILE_FRAG@): Use
1377 COMMON_{PRE,POST}_CONFIG_FRAG instead.
1378 * configure.in: sinclude ../common/aclocal.m4.
1379 * configure: Regenerated.
1383 * configure configure.in Makefile.in: Update to new configure
1384 scheme which is more compatible with WinGDB builds.
1385 * configure.in: Improve comment on how to run autoconf.
1386 * configure: Re-run autoconf to get new ../common/aclocal.m4.
1387 * Makefile.in: Use autoconf substitution to install common
1392 * run.c: Deleted, use one in ../common now.
1393 * Makefile.in: Delete everything that's been moved to
1394 ../common/Make-common.in.
1396 * configure.in: Simplify using macros in ../common/aclocal.m4.
1397 * configure: Regenerated.
1398 * config.in: New file.
1399 * armos.c: #include config.h.
1400 * wrapper.c (mem_size): Value is in bytes now.
1401 (sim_callback): New global.
1402 (arm_sim_set_profile{,_size}): Delete.
1403 (arm_sim_set_mem_size): Rename to sim_size.
1404 (sim_do_command): Call printf_filtered via callback.
1405 (sim_set_callbacks): Record callback.
1409 * Makefile.in (mostlyclean): Remove config.log.
1413 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
1414 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
1416 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
1417 (AC_PROG_INSTALL): Added.
1418 * configure: Rebuilt.
1422 * configure: Regenerate with autoconf 2.7.
1426 * run.c (main): Use new bfd_big_endian macro.
1430 * run.c: Include "getopt.h".
1432 (usage): Make static.
1433 (main): Call arm_sim_set_verbosity.
1434 Only load sections marked SEC_LOAD.
1435 * wrapper.c (mem_size, verbosity): New static global.
1436 (arm_sim_set_mem_size): Renamed from sim_size. Callers updated.
1437 (arm_sim_set_profile{,_size}): Renamed from sim_foo. Callers updated.
1441 * armdefs.h (ARMul_State): New member `verbose'.
1442 * armrdi.c (ARMul_ConsolePrint): Add missing va_end.
1443 * run.c (verbose): Make global.
1444 * wrapper.c (init): Set state->verbose.
1445 (ARMul_ConsolePrint): Don't print anything if !verbose.
1449 * armos.c: #include dbg_rdi.h.
1450 (ARMul_OSHandleSWI): Handle SWI_Breakpoint.
1451 * armos.h (SWI_Breakpoint): Define.
1452 * wrapper.c: #include armemu.h, dbg_rdi.h.
1454 (sim_resume): Use state->EndCondition to record stop state.
1455 Call FLUSHPIPE before returning.
1456 (sim_stop_reason): Determine reason from state->EndCondition.
1460 * wrapper.c (sim_set_callbacks): New.
1464 * armos.c (ARMul_OSHandleSWI): Result of read/write calls is
1465 number of bytes not read/written (or -1).
1469 * Makefile.in (maintainer-clean): New synonym for realclean.
1473 * configure.in: Remove AC_PROG_INSTALL.
1474 * configure: Rebuild.
1475 * Makefile.in (INSTALL): Revert to using install.sh.
1476 (INSTALL_PROGRAM, INSTALL_DATA): Set to $(INSTALL).
1477 (INSTALL_XFORM, INSTALL_XFORM1): Restore.
1478 (mostlyclean): Make the same as clean, not distclean.
1479 (clean): Remove config.log.
1480 (install): Don't install in $(tooldir).
1484 (Try to) Update to new bfd autoconf scheme.
1485 * run.c: Don't include sysdep.h.
1486 * Makefile.in (INSTALL{,_PROGRAM,_DATA}): Use autoconf computed value.
1487 (CC, CFLAGS, AR, RANLIB): Likewise.
1488 (HDEFINES, TDEFINES): Define.
1489 (CC_FOR_BUILD): Delete.
1490 (host_makefile_frag): Delete.
1491 (Makefile): Don't depend on frags.
1492 * configure.in (sysdep.h): Don't create symlink.
1493 (host_makefile_frag, frags): Deleted.
1494 (CC, CFLAGS, AR, RANLIB, INSTALL): Compute values.
1495 * configure: Regenerated.
1499 * Update all FSF addresses except those in COPYING* files.
1503 * Makefile.in (clean): Remove run, libsim.a.
1505 * Makefile.in, configure.in: converted to autoconf.
1506 * configure: New file, generated with autconf 2.4.
1512 * wrapper.c (sim_do_command): New function.
1516 * armos.c (ARMul_OSHandleSWI): New version to work with
1521 * run.c (main): Grab return value from right register.