notaz.gp2x.de
/
ia32rtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
translate: extra check
[ia32rtools.git]
/
run_sed.sh
diff --git
a/run_sed.sh
b/run_sed.sh
index
115ab6a
..
29df071
100755
(executable)
--- a/
run_sed.sh
+++ b/
run_sed.sh
@@
-12,7
+12,7
@@
for sym in $usyms; do
done
echo "\
done
echo "\
-s/^\(loc[r_].*[0-9A-F]:\)[^:]\(.*\;\)/\1:\t\2/g;\
+s/^\(
[ +-]\?
loc[r_].*[0-9A-F]:\)[^:]\(.*\;\)/\1:\t\2/g;\
s/dd[[:blank:]]rva/dd/;\
s/\<fldcw\>\t\[esp+4+var_4\]/fldcw\tword ptr \[esp\]/;\
s/\<large \(.*fs:\)/\1/;\
s/dd[[:blank:]]rva/dd/;\
s/\<fldcw\>\t\[esp+4+var_4\]/fldcw\tword ptr \[esp\]/;\
s/\<large \(.*fs:\)/\1/;\
@@
-24,14
+24,18
@@
s/\<pushf\>/pushfd/;\
s/\<popf\>/popfd/;\
s/\(\<j[mn]\?[abceglopszp]e\?\>\)\tloc_/\1\tnear ptr loc_/;\
s/\<jmp\tsub_/jmp\tnear ptr sub_/;\
s/\<popf\>/popfd/;\
s/\(\<j[mn]\?[abceglopszp]e\?\>\)\tloc_/\1\tnear ptr loc_/;\
s/\<jmp\tsub_/jmp\tnear ptr sub_/;\
-'
StarCraft.asm
" >> $f
+'
$1
" >> $f
. $f
# manual fixup:
# - 'end start' -> 'end'
. $f
# manual fixup:
# - 'end start' -> 'end'
-# - '
lea ecx, [ecx+0]
' -> align
+# - '
mov edi, edi', 'lea ...
' -> align
# - add 'near ptr' to some jumps
# - add 'near ptr' to some jumps
-# - 'cmp [ebp+edx+0], cl' -> 'cmp [e
dx+ebp
+0], cl'
+# - 'cmp [ebp+edx+0], cl' -> 'cmp [e
bp+edx*1
+0], cl'
# - 0FFxxh constants - masm treats a byte, ONLY sometimes prefix with 'word ptr'
# - jmp near:
# - jmp _strchr
# - 0FFxxh constants - masm treats a byte, ONLY sometimes prefix with 'word ptr'
# - jmp near:
# - jmp _strchr
+# - search for 'dword_xx+N', make byte/word, also word->byte
+# - get rid of type propagation, regenerate as 'simple' var_
+# - convert ds:0[eax*4] -> [eax*4+0] (h hotkey)
+# - rm function chunks - they're funcs reached by tailcalls (usually)