From 5e60fcf8088985b7dd8e6a5cd6e5d093e5b70399 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 29 May 2011 04:11:39 -0700 Subject: [sim,opcodes] improved sim build and run performance --- parse-opcodes | 105 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 46 deletions(-) (limited to 'parse-opcodes') diff --git a/parse-opcodes b/parse-opcodes index 5a34318..4cf0b84 100755 --- a/parse-opcodes +++ b/parse-opcodes @@ -85,51 +85,64 @@ def make_disasm_table(match,mask): print '#define MATCH_%s %s' % (name2, hex(match)) print '#define MASK_%s %s' % (name2, hex(mask[name])) -def make_switch(match,mask): - opcode_mask = ((1<<(opcode_base+opcode_size))-(1<> 0x%x) & 0x%x)' % (opcode_base,(1<> %d) & %d)\n' % (switch_base, (1<> start) & ((1 << len) - 1) @@ -826,6 +839,6 @@ elif sys.argv[1] == '-verilog': elif sys.argv[1] == '-disasm': make_disasm_table(match,mask) elif sys.argv[1] == '-switch': - make_switch(match,mask) + make_switch(match,mask,sys.argv[2]) else: assert 0 -- cgit v1.2.3