summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/build_tmp_decl.sh
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-12-01 22:57:10 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-12-01 22:57:10 (GMT)
commit5b5b36dc862a3c7bcfa3e0db74efcf2806988706 (patch)
tree0c631ee484f2325ad182a5e527f1a6508ddf2d9a /src/arch/arm/v7/build_tmp_decl.sh
parent97d1cc10210cf4ec237e1d9a8b23b120ddef47c5 (diff)
Recognized Thumb 16 instructions and most of the Thumb 32 ones.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@430 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm/v7/build_tmp_decl.sh')
-rwxr-xr-xsrc/arch/arm/v7/build_tmp_decl.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/arch/arm/v7/build_tmp_decl.sh b/src/arch/arm/v7/build_tmp_decl.sh
new file mode 100755
index 0000000..1236e81
--- /dev/null
+++ b/src/arch/arm/v7/build_tmp_decl.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+
+arch=$1
+header="opcodes/opcodes_$arch.h"
+headertmp="opcodes/opcodes_tmp_$arch.h"
+
+echo "#ifndef ${arch}_def_tmp_h" > $headertmp
+echo "#define ${arch}_def_tmp_h" >> $headertmp
+
+target=armv7_read_${arch}_instr
+
+needed=`grep $target $arch.c | sed "s/.*\(${target}_[^(]*\).*/\1/" | sort | uniq`
+
+for n in $needed; do
+
+ echo " $n..."
+
+ grep -q $n $header
+ if [ $? -ne 0 ]; then
+
+ echo "#define $n(r) NULL" >> $headertmp
+
+ else
+
+ echo "$n foudn in $header"
+
+ fi
+
+done
+
+echo "#endif" >> $headertmp
+
+
+