Bug 680 - bpermd XLEN update needs refinement
Summary: bpermd XLEN update needs refinement
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Specification (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- enhancement
Assignee: Dmitry Selyutin
URL:
Depends on:
Blocks: 671
  Show dependency treegraph
 
Reported: 2021-08-30 14:27 BST by Luke Kenneth Casson Leighton
Modified: 2022-05-12 16:57 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 Luke Kenneth Casson Leighton 2021-08-30 14:27:42 BST

    
Comment 1 Luke Kenneth Casson Leighton 2021-08-30 14:29:17 BST
https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=5fee1b0a044b78890c747d359f7bfed8c8c585dd

@@ -468,11 +468,11 @@ Pseudo-code:
     perm <- [0] * 8
     for i = 0 to 7
        index <- (RS)[8*i:8*i+7]
-       if index <u 64 then
+       if index <u XLEN then
             perm[i] <- (RB)[index]
        else
             perm[i] <- 0
-    RA <- [0]*56 || perm[0:7]
+    RA <- [0]*(XLEN-8) || perm[0:7]

the for-loop for i = 0 to 7 needs adjusting otherwise
it will overrun RS.  for i = 0 to (XLEN/8-1) would
probably do the trick.

see https://bugs.libre-soc.org/show_bug.cgi?id=671#c26
Comment 2 Dmitry Selyutin 2021-08-31 08:04:18 BST
(In reply to Luke Kenneth Casson Leighton from comment #1)
> https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;
> h=5fee1b0a044b78890c747d359f7bfed8c8c585dd

Nice catch, thank you! Pushed the fixup.

https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=d37f57284c5649d7b420a43b89f2ee579efcca35
Comment 3 Dmitry Selyutin 2021-09-04 19:25:54 BST
Should this one be closed?
Comment 4 Luke Kenneth Casson Leighton 2021-09-04 19:37:27 BST
(In reply to dmitry.selyutin from comment #3)
> Should this one be closed?

once linked on your homepage, so it's not forgotten when it comes
to RFPs, yes.
Comment 5 Dmitry Selyutin 2021-09-04 19:50:41 BST
(In reply to Luke Kenneth Casson Leighton from comment #4)
> (In reply to dmitry.selyutin from comment #3)
> once linked on your homepage, so it's not forgotten when it comes
> to RFPs, yes.

Done