#! /usr/bin/env python
-# $Id$
# x86 instructions and prefixes data and code generation
#
# Copyright (C) 2002-2007 Peter Johnson
# POSSIBILITY OF SUCH DAMAGE.
#
# NOTE: operands are arranged in NASM / Intel order (e.g. dest, src)
+rcstag = "$Id$"
+scriptname = rcstag.split()[1]
+scriptrev = rcstag.split()[2]
ordered_cpus = [
"086", "186", "286", "386", "486", "586", "686", "K6", "Athlon", "P3",
nasm_insns[keyword] = newinsn
def output_insns(f, parser, insns):
+ print >>f, "/* Generated by %s r%s, do not edit */" % \
+ (scriptname, scriptrev)
print >>f, """%%ignore-case
%%language=ANSI-C
%%compare-strncmp
all_operands.extend(form.operands)
# Output operands list
+ print >>f, "/* Generated by %s r%s, do not edit */" % \
+ (scriptname, scriptrev)
print >>f, "static const x86_info_operand insn_operands[] = {"
print >>f, " ",
print >>f, ",\n ".join(str(x) for x in all_operands)