diff options
Diffstat (limited to 'sim/bfin/interp.c')
-rw-r--r-- | sim/bfin/interp.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index 58bec8b..f63690c 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -703,7 +703,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, { bu16 emuexcpt = 0x25; sim_do_commandf (sd, "memory-size 0x%x", BFIN_DEFAULT_MEM_SIZE); - sim_write (sd, 0, (void *)&emuexcpt, 2); + sim_write (sd, 0, &emuexcpt, 2); } /* Check for/establish the a reference program image. */ @@ -791,7 +791,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, /* Push the Ehdr onto the stack. */ *sp -= sizeof (ehdr); elf_addrs[3] = *sp; - sim_write (sd, *sp, (void *)&ehdr, sizeof (ehdr)); + sim_write (sd, *sp, &ehdr, sizeof (ehdr)); if (STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG) sim_io_printf (sd, " Elf_Ehdr: %#x\n", *sp); @@ -850,9 +850,9 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, max_load_addr = max (paddr + memsz, max_load_addr); *sp -= 12; - sim_write (sd, *sp+0, (void *)&paddr, 4); /* loadseg.addr */ - sim_write (sd, *sp+4, (void *)&vaddr, 4); /* loadseg.p_vaddr */ - sim_write (sd, *sp+8, (void *)&memsz, 4); /* loadseg.p_memsz */ + sim_write (sd, *sp+0, &paddr, 4); /* loadseg.addr */ + sim_write (sd, *sp+4, &vaddr, 4); /* loadseg.p_vaddr */ + sim_write (sd, *sp+8, &memsz, 4); /* loadseg.p_memsz */ ++nsegs; } else if (phdrs[i].p_type == PT_DYNAMIC) @@ -885,7 +885,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, /* Push the summary loadmap info onto the stack last. */ *sp -= 4; sim_write (sd, *sp+0, null, 2); /* loadmap.version */ - sim_write (sd, *sp+2, (void *)&nsegs, 2); /* loadmap.nsegs */ + sim_write (sd, *sp+2, &nsegs, 2); /* loadmap.nsegs */ ret = true; skip_fdpic_init: @@ -1012,10 +1012,10 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, auxvt_size += 8; \ sp -= 4; \ auxvt = (val); \ - sim_write (sd, sp, (void *)&auxvt, 4); \ + sim_write (sd, sp, &auxvt, 4); \ sp -= 4; \ auxvt = (at); \ - sim_write (sd, sp, (void *)&auxvt, 4) + sim_write (sd, sp, &auxvt, 4) unsigned int egid = getegid (), gid = getgid (); unsigned int euid = geteuid (), uid = getuid (); bu32 auxvt_size = 0; @@ -1043,15 +1043,15 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, SET_SPREG (sp); /* First push the argc value. */ - sim_write (sd, sp, (void *)&argc, 4); + sim_write (sd, sp, &argc, 4); sp += 4; /* Then the actual argv strings so we know where to point argv[]. */ for (i = 0; i < argc; ++i) { unsigned len = strlen (argv[i]) + 1; - sim_write (sd, sp_flat, (void *)argv[i], len); - sim_write (sd, sp, (void *)&sp_flat, 4); + sim_write (sd, sp_flat, argv[i], len); + sim_write (sd, sp, &sp_flat, 4); sp_flat += len; sp += 4; } @@ -1062,8 +1062,8 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, for (i = 0; i < envc; ++i) { unsigned len = strlen (env[i]) + 1; - sim_write (sd, sp_flat, (void *)env[i], len); - sim_write (sd, sp, (void *)&sp_flat, 4); + sim_write (sd, sp_flat, env[i], len); + sim_write (sd, sp, &sp_flat, 4); sp_flat += len; sp += 4; } @@ -1093,7 +1093,7 @@ bfin_os_init (SIM_DESC sd, SIM_CPU *cpu, char * const *argv) while (argv[i]) { bu32 len = strlen (argv[i]); - sim_write (sd, cmdline, (void *)argv[i], len); + sim_write (sd, cmdline, argv[i], len); cmdline += len; sim_write (sd, cmdline, &byte, 1); ++cmdline; |