Skip to content

Commit

Permalink
removed isa argument from decoder plugin setup
Browse files Browse the repository at this point in the history
  • Loading branch information
anku-anand committed May 29, 2022
1 parent c82d51f commit a0b076c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion riscv_isac/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ def compute(trace_file, test_name, cgf, parser_name, decoder_name, detailed, xle
decoderclass = getattr(instructionObjectfile, "disassembler")
decoder_pm.register(decoderclass())
decoder = decoder_pm.hook
decoder.setup(arch="rv"+str(xlen),isa=cgf[cov_labels]['config'])
decoder.setup(arch="rv"+str(xlen))

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

Expand Down
7 changes: 1 addition & 6 deletions riscv_isac/plugins/internaldecoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,8 @@ def init_rvp_dictionary(self):
self.rvp_dict_11[0x00003077] = 'bpick'

@plugins.decoderHookImpl
def setup(self, arch,isa):
def setup(self, arch):
self.arch = arch
self.isa = isa

FIRST2_MASK = 0x00000003
OPCODE_MASK = 0x0000007f
Expand Down Expand Up @@ -1211,10 +1210,6 @@ def arith_ops(self, instrObj):
instrObj.rs2 = rs2
instrObj.rd = rd
elif funct7 == 0b0000100:
# pack and zext.h have same opcode, func3, funct7 only diffrence is in rs2 value
# for zext.h rs2 is always 0, if pack instruction is used with x0 as rs2
# then cannot distinguish from each other, hence using isa to differentiate.
# zext.h is part of Zbb, pack is part of Zbkb
instrObj.instr_name = 'pack'
instrObj.rs1 = rs1
instrObj.rs2 = rs2
Expand Down
2 changes: 1 addition & 1 deletion riscv_isac/plugins/specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class DecoderSpec(object):
@decoderHookSpec
def setup(self,arch,isa):
def setup(self,arch):
pass

@decoderHookSpec
Expand Down

0 comments on commit a0b076c

Please sign in to comment.