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

Commit

Permalink
evaluate f ext vars only using already evaluated instr vars
Browse files Browse the repository at this point in the history
  • Loading branch information
techiepriyansh committed Sep 29, 2022
1 parent 46302f7 commit 0639dea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions riscv_isac/InstructionObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ def evaluate_f_ext_sem(self, instr_vars, arch_state, csr_regfile):

f_ext_vars['fcsr'] = int(csr_regfile['fcsr'], 16)

if self.rs1 is not None and self.rs1[1] == 'f':
if 'rs1' in instr_vars and instr_vars['rs1'] is not None and instr_vars['rs1'].startswith('f'):
self.evaluate_reg_sem_f_ext(instr_vars['rs1_val'], instr_vars['flen'], instr_vars['iflen'], "1", f_ext_vars)
if self.rs2 is not None and self.rs2[1] == 'f':
if 'rs2' in instr_vars and instr_vars['rs2'] is not None and instr_vars['rs2'].startswith('f'):
self.evaluate_reg_sem_f_ext(instr_vars['rs2_val'], instr_vars['flen'], instr_vars['iflen'], "2", f_ext_vars)
if self.rs3 is not None and self.rs3[1] == 'f':
if 'rs3' in instr_vars and instr_vars['rs3'] is not None and instr_vars['rs3'].startswith('f'):
self.evaluate_reg_sem_f_ext(instr_vars['rs3_val'], instr_vars['flen'], instr_vars['iflen'], "3", f_ext_vars)

return f_ext_vars
Expand Down

0 comments on commit 0639dea

Please sign in to comment.