aboutsummaryrefslogtreecommitdiff
path: root/parse-opcodes
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@eecs.berkeley.edu>2014-01-21 16:17:24 -0800
committerAndrew Waterman <waterman@eecs.berkeley.edu>2014-01-21 16:18:18 -0800
commit5eb8edb1a5a9978ac7458bd1c4397a5a90e44bfe (patch)
tree90112e67073be5697d18d964c5e72cd4bfb2f4c6 /parse-opcodes
parent637bf90f93c8101848c67a32be35cce3d79e21c4 (diff)
downloadriscv-opcodes-5eb8edb1a5a9978ac7458bd1c4397a5a90e44bfe.zip
riscv-opcodes-5eb8edb1a5a9978ac7458bd1c4397a5a90e44bfe.tar.gz
riscv-opcodes-5eb8edb1a5a9978ac7458bd1c4397a5a90e44bfe.tar.bz2
Add DECLARE_CAUSE macro
Diffstat (limited to 'parse-opcodes')
-rwxr-xr-xparse-opcodes5
1 files changed, 5 insertions, 0 deletions
diff --git a/parse-opcodes b/parse-opcodes
index 6b55d5d..3cd0c27 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -118,6 +118,11 @@ def make_c(match,mask):
print 'DECLARE_CSR(%s, CSR_%s)' % (name, name.upper())
print '#endif'
+ print '#ifdef DECLARE_CAUSE'
+ for num, name in csrs:
+ print 'DECLARE_CAUSE("%s", CAUSE_%s)' % (name, name.upper().replace(' ', '_'))
+ print '#endif'
+
def yank(num,start,len):
return (num >> start) & ((1 << len) - 1)