• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisão2bb20c887d2222685ea51da8469b251bfd1afaa2 (tree)
Hora2016-01-08 23:32:07
AutorYoshinori Sato <ysato@user...>
CommiterYoshinori Sato

Mensagem de Log

Fix warning for clang.

Mudança Sumário

Diff

--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -28,6 +28,8 @@
2828 #ifdef HAVE_SYS_PARAM_H
2929 #include <sys/param.h>
3030 #endif
31+#include <unistd.h>
32+#include <ctype.h>
3133
3234 #include "bfd.h"
3335 #include "sim-main.h"
@@ -1266,7 +1268,7 @@ static struct memlog *memlog_buffer;
12661268 static int memlogtail;
12671269 static int memlogsize;
12681270
1269-static add_memlog(unsigned long pc, unsigned long addr,
1271+static void add_memlog(unsigned long pc, unsigned long addr,
12701272 enum mem_access_type type, unsigned long data)
12711273 {
12721274 if (!logging)
@@ -1289,7 +1291,7 @@ static int pc;
12891291
12901292 static unsigned char *breg[32];
12911293 static unsigned short *wreg[16];
1292-static unsigned int *lreg[18];
1294+static unsigned int *lreg[19];
12931295
12941296 #define GET_B_REG(X) *(breg[X])
12951297 #define SET_B_REG(X, Y) (*(breg[X])) = (Y)
@@ -1817,10 +1819,11 @@ init_pointers (SIM_DESC sd)
18171819 /* `msize' must be a power of two. */
18181820 if ((memory_size & (memory_size - 1)) != 0)
18191821 {
1822+ memory_size = H8300S_MSIZE;
18201823 (*sim_callback->printf_filtered)
18211824 (sim_callback,
18221825 "init_pointers: bad memory size %d, defaulting to %d.\n",
1823- memory_size, memory_size = H8300S_MSIZE);
1826+ memory_size, H8300S_MSIZE);
18241827 }
18251828
18261829 if (h8_get_memory_buf (sd))
@@ -1962,6 +1965,7 @@ static int intlevel(SIM_DESC sd)
19621965 } else {
19631966 return h8_get_ccr (sd) & 0x80?0x100 << 8:-1;
19641967 }
1968+ return 0;
19651969 }
19661970
19671971 int iosimulation(SIM_DESC, int);
@@ -4722,8 +4726,6 @@ sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
47224726 int i;
47234727
47244728 init_pointers (sd);
4725- if (addr < 0)
4726- return 0;
47274729 for (i = 0; i < size; i++)
47284730 {
47294731 if (addr < memory_size)
@@ -4743,8 +4745,6 @@ int
47434745 sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
47444746 {
47454747 init_pointers (sd);
4746- if (addr < 0)
4747- return 0;
47484748 if (addr < memory_size)
47494749 memcpy (buffer, h8_get_memory_buf (sd) + addr, size);
47504750 else
@@ -5096,6 +5096,8 @@ sim_open (SIM_OPEN_KIND kind,
50965096
50975097 /* Called by gdb to load a program into memory. */
50985098
5099+void init_ioregs(SIM_DESC sd);
5100+
50995101 SIM_RC
51005102 sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
51015103 {
@@ -5243,7 +5245,7 @@ static void save_trace(const char *filename)
52435245 return ;
52445246 }
52455247 for (idx = 0; idx < tracetail; idx++)
5246- fprintf(fp, "0x%06x\n", trace_buffer[idx]);
5248+ fprintf(fp, "0x%06lx\n", trace_buffer[idx]);
52475249 fclose(fp);
52485250 }
52495251
@@ -5261,7 +5263,7 @@ static void show_memlog(int lines)
52615263 for (; lines > 0; --lines)
52625264 {
52635265 (*sim_callback->printf_filtered) (sim_callback,
5264- "0x%06x 0x%06x %s %08x\n",
5266+ "0x%06lx 0x%06lx %s %08lx\n",
52655267 memlog_buffer[idx].pc,
52665268 memlog_buffer[idx].addr,
52675269 memtype_str[memlog_buffer[idx].type],
@@ -5288,7 +5290,7 @@ static void save_memlog(const char *filename)
52885290 return ;
52895291 }
52905292 for (idx = 0; idx < memlogtail; idx++)
5291- fprintf(fp, "0x%06x 0x%06x %s %08x\n",
5293+ fprintf(fp, "0x%06lx 0x%06lx %s %08lx\n",
52925294 memlog_buffer[idx].pc,
52935295 memlog_buffer[idx].addr,
52945296 memtype_str[memlog_buffer[idx].type],
@@ -5296,6 +5298,9 @@ static void save_memlog(const char *filename)
52965298 fclose(fp);
52975299 }
52985300
5301+void sci_open_pty(struct host_callback_struct *callback);
5302+void sci_open_net(struct host_callback_struct *callback, int port);
5303+
52995304 void
53005305 sim_do_command (SIM_DESC sd, const char *cmd)
53015306 {