Bug 945 - binutils: support fmvis/fishmv instructions
Summary: binutils: support fmvis/fishmv instructions
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- major
Assignee: Dmitry Selyutin
URL: https://libre-soc.org/openpower/sv/in...
Depends on:
Blocks:
 
Reported: 2022-10-07 09:29 BST by Konstantinos Margaritis (markos)
Modified: 2023-03-28 09:13 BST (History)
3 users (show)

See Also:
NLnet milestone: NLnet.2021-08-071.cavatools
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: 958
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 Konstantinos Margaritis (markos) 2022-10-07 09:29:29 BST
Trying to compile the following code:

...
        # Load 2.0f constant in fpr 1 , will be needed for SHR macro
        fmvis c_2, 0x4000
...

with:

/usr/local/bin/powerpc64le-linux-gnu-as -mlibresoc -mregnames  -o imdct36_svp64_real.o imdct36_svp64_real.s
imdct36_svp64_real.s: Assembler messages:
imdct36_svp64_real.s:92: Error: unrecognized opcode: `fmvis'

Similarly for fishmv.
Comment 1 Dmitry Selyutin 2022-10-07 15:49:52 BST
I checked it, these both will need custom handlers. Also, since we want to be good citizens, we must also add tests. Anyway, these don't look as difficult as say svshape2 was, perhaps I'll complete it even today.
Comment 2 Luke Kenneth Casson Leighton 2022-10-07 17:31:08 BST
(In reply to Dmitry Selyutin from comment #1)
> I checked it, these both will need custom handlers. Also, since we want to
> be good citizens, we must also add tests. Anyway, these don't look as
> difficult as say svshape2 was, perhaps I'll complete it even today.

they're exactly the same as... as... addpcis, which is also DX-Form.
p68 v3.0B.  i picked an existing Form very deliberately.

DX-Form

  51 # V3.0B 1.6.6 DX-FORM
  52     |0    |6   |11   |16   |26   |31
  53     | PO  |  RT|   d1|   d0|   XO|d2
  54     | PO  | FRS|   d1|   d0|   XO|d2

addpcis RT,D

    D <- d0||d1||d2

fmvis FRS, D

    bf16 = d0 || d1 || d2 # create BF16 immediate

so the only addition should be using FRS instead of RT.

for the tests you could probably even directly copy the addpcis tests
and just change the instruction name!
Comment 3 Dmitry Selyutin 2022-10-09 13:58:26 BST
Support for fishmv and fmvis has been added; as usual, binutils rebuild is required.
Comment 4 Dmitry Selyutin 2023-03-28 09:13:27 BST
As parent task is completed, I'm marking this as resolved.