[Libre-soc-bugs] [Bug 845] binutils: drop svmagic and deal with the prefix instead

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Jul 28 10:56:56 BST 2022


https://bugs.libre-soc.org/show_bug.cgi?id=845

--- Comment #2 from Dmitry Selyutin <ghostmansd at gmail.com> ---
The rest of this task will need more tuning. We'll basically have to implement
what we have for assembler, but in an opposite direction.

Let's assume the code below.

sv.addi %r3, %r1, 125
sv.extsw./ff=eq 5, 67

With the current objdump, this code is printed as below:

   0:   00 00 40 05     .long 0x5400000
   4:   7d 00 61 38     addi    r3,r1,125
   8:   04 02 40 05     .long 0x5400204
   c:   b5 07 65 7c     extsw.  r5,r3

I already managed to make objdump recognize this as a whole instruction, and
even added our prefix:

   0:   00 00 40 05     sv.addi r3,r1,125
   4:   7d 00 61 38 
   8:   04 02 40 05     sv.extsw. r5,r3
   c:   b5 07 65 7c

The rest, like reconstructing the operands and qualifiers, will take much more
time. We'll basically have to invent custom "extraction" routines for each and
every operand, and also perhaps hack other stuff around to affect the
instruction name with qualifiers.

Stay tuned.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list