summaryrefslogtreecommitdiff
path: root/sim/arm/wrapper.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-09-15 23:55:50 +0000
committerNick Clifton <nickc@redhat.com>2000-09-15 23:55:50 +0000
commit42771f72b99091c8ecba76ed814e8947abb8679b (patch)
treeb511ccce8e1763871f064e9a391530341c91085f /sim/arm/wrapper.c
parent42639f66caf241cdd83882db7c44079aa4ad2e5b (diff)
downloadgdb-42771f72b99091c8ecba76ed814e8947abb8679b.tar.gz
Replace StrongARM property with v4 and v5 properties.
Diffstat (limited to 'sim/arm/wrapper.c')
-rw-r--r--sim/arm/wrapper.c79
1 files changed, 42 insertions, 37 deletions
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index b7b7a62d098..b5ecd31cebd 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -122,11 +122,12 @@ sim_write (sd, addr, buffer, size)
int size;
{
int i;
+
init ();
+
for (i = 0; i < size; i++)
- {
- ARMul_WriteByte (state, addr + i, buffer[i]);
- }
+ ARMul_WriteByte (state, addr + i, buffer[i]);
+
return size;
}
@@ -208,40 +209,44 @@ sim_create_inferior (sd, abfd, argv, env)
mach = bfd_get_mach (abfd);
- switch (mach) {
- default:
- (*sim_callback->printf_filtered) (sim_callback,
- "Unknown machine type; please update sim_create_inferior.\n");
- /* fall through */
-
- case 0: /* arm */
- /* We wouldn't set the machine type with earlier toolchains, so we
- explicitly select a processor capable of supporting all ARM
- 32bit mode. */
- /* fall through */
-
- case 5: /* armv4 */
- case 6: /* armv4t */
- case 7: /* armv5 */
- case 8: /* armv5t */
- ARMul_SelectProcessor (state, STRONGARM);
- /* Reset mode to ARM. A gdb user may rerun a program that had entered
- THUMB mode from the start and cause the ARM-mode startup code to be
- executed in THUMB mode. */
- ARMul_SetCPSR (state, USER32MODE);
- break;
-
- case 3: /* armv3 */
- case 4: /* armv3m */
- ARMul_SelectProcessor (state, ARM600);
- break;
-
- case 1: /* armv2 */
- case 2: /* armv2a */
- ARMul_SelectProcessor (state, ARM2);
- break;
- }
-
+ switch (mach)
+ {
+ default:
+ (*sim_callback->printf_filtered) (sim_callback,
+ "Unknown machine type; please update sim_create_inferior.\n");
+ /* fall through */
+
+ case 0: /* arm */
+ /* We wouldn't set the machine type with earlier toolchains, so we
+ explicitly select a processor capable of supporting all ARM
+ 32bit mode. */
+ /* fall through */
+
+ case 5: /* armv4 */
+ case 6: /* armv4t */
+ case 7: /* armv5 */
+ case 8: /* armv5t */
+ if (mach == 7 || mach == 8)
+ ARMul_SelectProcessor (state, ARM_v5_Prop);
+ else
+ ARMul_SelectProcessor (state, ARM_v4_Prop);
+ /* Reset mode to ARM. A gdb user may rerun a program that had entered
+ THUMB mode from the start and cause the ARM-mode startup code to be
+ executed in THUMB mode. */
+ ARMul_SetCPSR (state, USER32MODE);
+ break;
+
+ case 3: /* armv3 */
+ case 4: /* armv3m */
+ ARMul_SelectProcessor (state, ARM_Lock_Prop);
+ break;
+
+ case 1: /* armv2 */
+ case 2: /* armv2a */
+ ARMul_SelectProcessor (state, ARM_Fix26_Prop);
+ break;
+ }
+
if (argv != NULL)
{
/*