aboutsummaryrefslogtreecommitdiff
path: root/parse-opcodes
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2011-04-09 17:37:42 -0700
committerAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2011-04-09 17:37:42 -0700
commit9212085398dee4aecfead02897d8ad3686afe6bc (patch)
treecd3649644b1b60b6ca130522af9524d015c9a6e4 /parse-opcodes
parent474eb8f8c73714e74d0075a588ff75b5d6636b2a (diff)
downloadriscv-opcodes-9212085398dee4aecfead02897d8ad3686afe6bc.zip
riscv-opcodes-9212085398dee4aecfead02897d8ad3686afe6bc.tar.gz
riscv-opcodes-9212085398dee4aecfead02897d8ad3686afe6bc.tar.bz2
[xcc,pk,sim,opcodes] added first RVC instruction
Diffstat (limited to 'parse-opcodes')
-rwxr-xr-xparse-opcodes11
1 files changed, 7 insertions, 4 deletions
diff --git a/parse-opcodes b/parse-opcodes
index 6857c58..45d16db 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -24,6 +24,9 @@ arglut['imm12lo'] = (16,10)
arglut['shamt'] = (15,10)
arglut['shamtw'] = (14,10)
+arglut['crd5'] = (9,5)
+arglut['cimm6'] = (15,10)
+
typelut = {} # 0=unimp,1=j,2=lui,3=imm,4=r,5=r4,6=ish,7=ishw,10=b
typelut[0x00] = 0
typelut[0x03] = 3
@@ -126,18 +129,18 @@ def make_switch(match,mask):
print ' #include "insns/%s.h"' % name2
print ' break;'
print ' }'
- print ' #include "insns/unimp.h"'
+ print ' throw trap_illegal_instruction;'
print ' }'
print ' default:'
print ' {'
- print ' #include "insns/unimp.h"'
+ print ' throw trap_illegal_instruction;'
print ' }'
print ' }'
print ' break;'
print ' }'
print ' default:'
print ' {'
- print ' #include "insns/unimp.h"'
+ print ' throw trap_illegal_instruction;'
print ' }'
print '}'
@@ -781,7 +784,7 @@ for line in sys.stdin:
else:
sys.exit("%s: unknown token %s" % (name,token))
- if cover != 0xFFFFFFFF:
+ if not (cover == 0xFFFFFFFF or cover == 0xFFFF):
sys.exit("%s: not all bits are covered" % name)
for name2,match2 in match.iteritems():