summaryrefslogtreecommitdiff
path: root/tools/gen-bits.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gen-bits.sh')
-rwxr-xr-xtools/gen-bits.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gen-bits.sh b/tools/gen-bits.sh
index 951a7d9..01aa9b8 100755
--- a/tools/gen-bits.sh
+++ b/tools/gen-bits.sh
@@ -7,6 +7,10 @@ ofmt="$4"
xfmt="$5"
bfmt="$6"
+gen_bits() {
+ sed -e "s/@BITS@/$1/g; s/@DFMT@/$2/g; s/@OFMT@/$3/g; s/@XFMT@/$4/g; s/@BFMT@/$5/g;" < src/headers/bits-template
+}
+
tools/gen-types-internal.sh "" "" "$bits" < src/headers/bits-header
if test "$bits" = 64 ; then
@@ -33,5 +37,5 @@ else
fi
tools/gen-types-internal.sh "" "" "$bits" < src/headers/bits-${endian}endian
-tools/gen-bits-internal.sh "$bits" "$dfmt" "$ofmt" "$xfmt" "$bfmt"
+gen_bits "$bits" "$dfmt" "$ofmt" "$xfmt" "$bfmt"
exec tools/gen-types-internal.sh "" "" "$bits" < src/headers/bits-footer