Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit a0b076c

Browse files
committed
removed isa argument from decoder plugin setup
1 parent c82d51f commit a0b076c

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

riscv_isac/coverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ def compute(trace_file, test_name, cgf, parser_name, decoder_name, detailed, xle
10591059
decoderclass = getattr(instructionObjectfile, "disassembler")
10601060
decoder_pm.register(decoderclass())
10611061
decoder = decoder_pm.hook
1062-
decoder.setup(arch="rv"+str(xlen),isa=cgf[cov_labels]['config'])
1062+
decoder.setup(arch="rv"+str(xlen))
10631063

10641064
iterator = iter(parser.__iter__()[0])
10651065

riscv_isac/plugins/internaldecoder.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,8 @@ def init_rvp_dictionary(self):
406406
self.rvp_dict_11[0x00003077] = 'bpick'
407407

408408
@plugins.decoderHookImpl
409-
def setup(self, arch,isa):
409+
def setup(self, arch):
410410
self.arch = arch
411-
self.isa = isa
412411

413412
FIRST2_MASK = 0x00000003
414413
OPCODE_MASK = 0x0000007f
@@ -1211,10 +1210,6 @@ def arith_ops(self, instrObj):
12111210
instrObj.rs2 = rs2
12121211
instrObj.rd = rd
12131212
elif funct7 == 0b0000100:
1214-
# pack and zext.h have same opcode, func3, funct7 only diffrence is in rs2 value
1215-
# for zext.h rs2 is always 0, if pack instruction is used with x0 as rs2
1216-
# then cannot distinguish from each other, hence using isa to differentiate.
1217-
# zext.h is part of Zbb, pack is part of Zbkb
12181213
instrObj.instr_name = 'pack'
12191214
instrObj.rs1 = rs1
12201215
instrObj.rs2 = rs2

riscv_isac/plugins/specification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class DecoderSpec(object):
77
@decoderHookSpec
8-
def setup(self,arch,isa):
8+
def setup(self,arch):
99
pass
1010

1111
@decoderHookSpec

0 commit comments

Comments
 (0)