Bug 1252 - sync instruction breaks insndb traversal
Summary: sync instruction breaks insndb traversal
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: All Windows
: --- normal
Assignee: Jacob Lifshay
URL:
Depends on:
Blocks:
 
Reported: 2024-01-16 08:22 GMT by Dmitry Selyutin
Modified: 2024-01-16 09:32 GMT (History)
2 users (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 2024-01-16 08:22:28 GMT
Attempting to traverse insndb instruction and all dynamic operands, I observe the following:

  File "/home/ghostmansd/src/openpower-isa/src/openpower/insndb/core.py", line 1007, in span
    return self.record.fields[self.name]
KeyError: 'SC'

The problem can be reproduced with $(pysvp64db operands sync).

Please either rollback this commit or populate fields.text with SC operand.
Comment 1 Dmitry Selyutin 2024-01-16 09:05:09 GMT
Dropped blocking status, decreased priority, since I can skip it by comparing the name.
Comment 2 Jacob Lifshay 2024-01-16 09:08:01 GMT
(In reply to Dmitry Selyutin from comment #1)
> Dropped blocking status, decreased priority, since I can skip it by
> comparing the name.

don't bother, I'm currently fixing this and should be done in a few min...
Comment 3 Jacob Lifshay 2024-01-16 09:32:13 GMT
https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=95d3aa48bd080b75f7301784581a0c7541c3e7fc

commit 95d3aa48bd080b75f7301784581a0c7541c3e7fc
Author: Jacob Lifshay <programmerjake@gmail.com>
Date:   Tue Jan 16 01:18:58 2024 -0800

    fixedsync.mdwn: change sync from v3.1B version to v3.0B version
    
    to use the v3.1B version requires fixing fields.text to use the new
    L and SC fields, which requires deciphering all the places where the
    current L (named L2) field is used and making sure they'll be correct still.
    
    using the old interpretation of sync should be correct, but less optimal,
    assuming OpenPower got their backwards compatibility correct.