+
+print OUT<<ENDOFISIRN;
+
+static int $arch\_opcode_start = -1;
+static int $arch\_opcode_end = -1;
+
+/** Return the opcode number of the first $arch opcode. */
+int get_$arch\_opcode_first(void) {
+ return $arch\_opcode_start;
+}
+
+/** Return the opcode number of the last $arch opcode + 1. */
+int get_$arch\_opcode_last(void) {
+ return $arch\_opcode_end;
+}
+
+/** Return non-zero if the given node is a $arch machine node. */
+int is_$arch\_irn(const ir_node *node) {
+ unsigned opc = (unsigned)get_irn_opcode(node);
+
+ assert($arch\_opcode_start > 0 && "missing opcode init");
+ assert($arch\_opcode_end > 0 && "missing opcode init");
+
+ if (opc - (unsigned)$arch\_opcode_start < (unsigned)($arch\_opcode_end - $arch\_opcode_start))
+ return 1;
+
+ return 0;
+}
+
+int get_$arch\_irn_opcode(const ir_node *node) {
+ assert(is_$arch\_irn(node));
+ return get_irn_opcode(node) - $arch\_opcode_start;
+}
+
+ENDOFISIRN
+