]> granicus.if.org Git - yasm/commitdiff
Mark gen_x86_insn.py outputs as generated, to discourage hand-editing.
authorPeter Johnson <peter@tortall.net>
Wed, 10 Sep 2008 02:42:45 +0000 (02:42 -0000)
committerPeter Johnson <peter@tortall.net>
Wed, 10 Sep 2008 02:42:45 +0000 (02:42 -0000)
Suggested by: Mark Charney

svn path=/trunk/yasm/; revision=2121

modules/arch/x86/gen_x86_insn.py

index a361c483042d854405fc111287b5715ce2e13e45..d9ddb7c49e5cc3d994b38010d3ea60fcfb3c9ccf 100755 (executable)
@@ -1,5 +1,4 @@
 #! /usr/bin/env python
-# $Id$
 # x86 instructions and prefixes data and code generation
 #
 #  Copyright (C) 2002-2007  Peter Johnson
@@ -26,6 +25,9 @@
 # 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",
@@ -538,6 +540,8 @@ def finalize_insns():
                 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
@@ -573,6 +577,8 @@ def output_groups(f):
             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)