summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2016-02-22 16:18:43 -0500
committerGravatar Benjamin Barenblat <bbaren@google.com>2016-02-22 16:18:43 -0500
commit039497169da8a9495e10d3765ea73ed157650926 (patch)
tree955a5fd8756056a25fb0ac6bce3b385b1d718c18
parent74e86d2f4f72751a4d7db9786d1f2a7f2b99df61 (diff)
Go: Emit all instructions
Changes to the RISC-V Go implementation obviate the need for GO_UNUSED_INSTRUCTIONS.
-rwxr-xr-xparse-opcodes32
1 files changed, 1 insertions, 31 deletions
diff --git a/parse-opcodes b/parse-opcodes
index f336999..a6e0c87 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -4,35 +4,6 @@ import math
import sys
import tokenize
-# Instructions not used by the RISC-V Go port (and which should therefore not be
-# emitted).
-GO_UNUSED_INSTRUCTIONS = set((
- 'addiw',
- 'csrrc',
- 'csrrci',
- 'csrrs',
- 'csrrsi',
- 'csrrw',
- 'csrrwi',
- 'ebreak',
- 'ecall',
- 'eret',
- 'fcvt.d.s',
- 'fcvt.s.d',
- 'fsgnjx.d',
- 'fsgnjx.s',
- 'hrts',
- 'lw',
- 'mrth',
- 'mrts',
- 'sfence.vm',
- 'slli.rv32',
- 'srai.rv32',
- 'sret',
- 'srli.rv32',
- 'wfi',
-))
-
namelist = []
match = {}
mask = {}
@@ -822,8 +793,7 @@ def make_go():
print 'func encode(a int16) *inst {'
print '\tswitch a {'
for name in namelist:
- if name not in GO_UNUSED_INSTRUCTIONS:
- print_go_insn(name)
+ print_go_insn(name)
print '\t}'
print '\tlog.Fatalf("opcode: missing %v (bug in parse-opcodes)", a)'
print '\treturn nil'