notaz.gp2x.de
/
ia32rtools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
60fe410
)
cvt_data: use .hword (consistent 2 bytes), offsets from ;.org
author
notaz
<notasas@gmail.com>
Sun, 23 Feb 2014 00:18:00 +0000
(
02:18
+0200)
committer
notaz
<notasas@gmail.com>
Sun, 23 Feb 2014 00:18:00 +0000
(
02:18
+0200)
tools/cvt_data.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/cvt_data.c
b/tools/cvt_data.c
index
044857b
..
2decf33
100644
(file)
--- a/
tools/cvt_data.c
+++ b/
tools/cvt_data.c
@@
-138,7
+138,7
@@
static const char *type_name(enum dx_type type)
case DXT_BYTE:
return ".byte";
case DXT_WORD:
case DXT_BYTE:
return ".byte";
case DXT_WORD:
- return ".word";
+ return ".
h
word";
case DXT_DWORD:
return ".long";
case DXT_QUAD:
case DXT_DWORD:
return ".long";
case DXT_QUAD:
@@
-501,8
+501,18
@@
int main(int argc, char *argv[])
asmln++;
p = sskip(line);
asmln++;
p = sskip(line);
- if (*p == 0 || *p == ';')
+ if (*p == 0)
+ continue;
+
+ if (*p == ';') {
+ if (IS_START(p, ";org") && sscanf(p + 5, "%Xh", &i) == 1) {
+ // ;org is only seen at section start, so assume . addr 0
+ i &= 0xfff;
+ if (i != 0)
+ fprintf(fout, "\t\t .skip 0x%x\n", i);
+ }
continue;
continue;
+ }
for (wordc = 0; wordc < ARRAY_SIZE(words); wordc++) {
p = sskip(next_word_s(words[wordc], sizeof(words[0]), p));
for (wordc = 0; wordc < ARRAY_SIZE(words); wordc++) {
p = sskip(next_word_s(words[wordc], sizeof(words[0]), p));