Commit MetaInfo

Revisionff674c28452c7b556e19660355d25230dc41fbb5 (tree)
Time2015-06-09 16:04:13
AuthorYoshinori Sato <ysato@user...>
CommiterYoshinori Sato

Log Message

h8300 address space is 24bit.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

Change Summary

Incremental Difference

--- a/flthdr.c
+++ b/flthdr.c
@@ -167,8 +167,16 @@ process_file(char *ifile, char *ofile)
167167 r = ntohl(relocs[i]);
168168 raddr = flat_get_relocate_addr(r);
169169 printf(" %u\t0x%08lx (0x%08"PRIx32")\t", i, r, raddr);
170+#if defined(TARGET_h8300)
171+ raddr &= ~0x00000001;
172+#endif
170173 fseek_stream(&ifp, sizeof(old_hdr) + raddr, SEEK_SET);
171174 fread_stream(&addr, sizeof(addr), 1, &ifp);
175+#if defined(TARGET_h8300)
176+ addr = ntohl(addr);
177+ if (r & 1)
178+ addr &= 0x00ffffff;
179+#endif
172180 printf("%"PRIx32"\n", addr);
173181 }
174182
Show on old repository browser