summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andrew Waterman <waterman@cs.berkeley.edu>2015-09-28 11:53:21 -0700
committerGravatar Andrew Waterman <waterman@cs.berkeley.edu>2015-09-28 11:54:03 -0700
commit76f508c8b75ba5d19f1d4570b0c9366aafef557f (patch)
tree6ea682706ef5aae2cf3cf8a6a87b9d9cadc77075
parent2669f5ed5520442657ed3ad1327b37e1cc933fec (diff)
In C headers, keep instructions in original input order
-rwxr-xr-xparse-opcodes4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-opcodes b/parse-opcodes
index 6159bd1..63654c9 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -161,7 +161,7 @@ def make_c(match,mask):
print '/* Automatically generated by parse-opcodes */'
print '#ifndef RISCV_ENCODING_H'
print '#define RISCV_ENCODING_H'
- for name in sorted(match.iterkeys()):
+ for name in namelist:
name2 = name.upper().replace('.','_')
print '#define MATCH_%s %s' % (name2, hex(match[name]))
print '#define MASK_%s %s' % (name2, hex(mask[name]))
@@ -172,7 +172,7 @@ def make_c(match,mask):
print '#endif'
print '#ifdef DECLARE_INSN'
- for name in sorted(match.iterkeys()):
+ for name in namelist:
name2 = name.replace('.','_')
print 'DECLARE_INSN(%s, MATCH_%s, MASK_%s)' % (name2, name2.upper(), name2.upper())
print '#endif'