The unified diff between revisions [afdbb938..] and [04aa5b48..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/lsi/makeabi'

#
# old_revision [afdbb9388305ae66464ad4acb0437922656e3059]
# new_revision [04aa5b488cdcfccafef4ba9d99749b84e1b76083]
#
# add_file "src/lsi/makeabi"
#  content [007086efc8065fc0857d86ae0fac503e708cb961]
# 
#   set "src/lsi/makeabi"
#  attr "mtn:execute"
# value "true"
#
============================================================
--- /dev/null	
+++ src/lsi/makeabi	007086efc8065fc0857d86ae0fac503e708cb961
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+INFILE=$1
+
+if [ "X${INFILE}" = "X" ]
+then
+	echo "Usage: $0 abispec"
+	exit 1
+fi
+
+ABI=abi.c
+HEADER=abi.lh
+
+FNCOUNT=0
+
+do_function()
+{
+	echo "	vm_intfn_${ARG1}," >>${ABI}
+	echo "fndefint ${ARG1} ${FNCOUNT};" >>${HEADER}
+	FNCOUNT=$((${FNCOUNT}+1))
+}
+
+cat <<EOF >${ABI}
+/* abi.c */
+/* autogenerated - do not edit */
+
+#include "abi.h"
+
+vm_intfn vm_intfn_table[] = {
+EOF
+
+cat <<EOF >${HEADER}
+/* abi.lh */
+/* autogenerated - do not edit */
+
+EOF
+
+while read TYPE ARG1 ARG2
+do
+	case "$TYPE" in
+		function) do_function
+			;;
+	esac
+done <${INFILE}
+
+cat <<EOF >>${ABI}
+};
+
+const int vm_intfn_size = sizeof(vm_intfn_table) / sizeof(vm_intfn);
+EOF