Bug 1098 - Fix instructions which have extra conflicts
Summary: Fix instructions which have extra conflicts
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks: 1093
  Show dependency treegraph
 
Reported: 2023-05-31 18:44 BST by Dmitry Selyutin
Modified: 2023-06-03 19:19 BST (History)
1 user (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Selyutin 2023-05-31 18:44:07 BST
These instructions don't pass the check[0] for conflicts between extras:

rlwimi
rlwimi.
fishmv
rldimi
rldimi.

[0] https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/decoder/power_insn.py;h=41a0c88e88f7dbeb21ef8df15b2e2205e20b196f;hb=refs/heads/master#l1269
Comment 1 Dmitry Selyutin 2023-05-31 19:21:44 BST
I've added all broken instructions into tests:

https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=0e9a5694dfe415126a8e1a32456c1f801bfebc03
Comment 2 Dmitry Selyutin 2023-06-03 16:23:06 BST
Luke, I've assigned this to you since you did the actual fix and I only did some bits of analysis and discovered the issue.
Comment 3 Luke Kenneth Casson Leighton 2023-06-03 18:20:19 BST
(In reply to Dmitry Selyutin from comment #2)
> Luke, I've assigned this to you since you did the actual fix and I only did
> some bits of analysis and discovered the issue.

i think i can work it out, the Idx0-3 need to have to be filtered by "None",
which at the moment is getting confused with "Idx0".  i need to investigate
more.
Comment 4 Luke Kenneth Casson Leighton 2023-06-03 19:19:36 BST
i found it.

* "in1/in2/in3/CR in" are all (implicitly) of type SelType.SRC
* "out/out2/CR out" are all SelType.DST

despite the register RA sometimes being both.  i added this:

             for (reg, seltype, idx) in extra(reg.alias):
+                if keytype != seltype: # only check SRC-to-SRC and DST-to-DST
+                    continue

and the problem goes away

https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=de0ebb3