[Libre-soc-bugs] [Bug 1123] add set[n]bc[r] to the simulator

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Jul 25 04:12:22 BST 2023


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

Jacob Lifshay <programmerjake at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
       The table of|jacob=0                     |jacob=0
  payments (in EUR)|                            |ghostmansd=0
     for this task;|                            |
        TOML format|                            |
           Assignee|programmerjake at gmail.com    |ghostmansd at gmail.com
                 CC|                            |ghostmansd at gmail.com

--- Comment #1 from Jacob Lifshay <programmerjake at gmail.com> ---
Added support for the C-style conditional operator since that's in the PowerISA
spec.
Added set[n]bc[r] but insndb fails to assemble it, and I can't figure out why,
can you try to fix that ghostmansd? backtrace at end.
I had to add the instruction form to fields.text, surprisingly it isn't listed
in PowerISA v3.1B's list of instruction forms.

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

commit b99f9bde3f9c7ce2a3172d96a6536cde011effff
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Mon Jul 24 19:51:46 2023 -0700

    add set[n]bc[r] -- tests broken

commit 89db91417312abd0a19c28138daca9508310f514
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Mon Jul 24 19:50:12 2023 -0700

    add missing test_caller_cr.py

commit af3624a79b0506bfcb2ec96b33f651793eb93fa3
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Mon Jul 24 19:10:37 2023 -0700

    format code

commit 721ba871a81803d3927f4bffc84a60269801a04b
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Mon Jul 24 18:54:45 2023 -0700

    restore use of ? : operator in bfp_ROUND_TO_BFP32/64 pseudocode

    this changes it to match the PowerISA spec. better

commit a65b3700aa3b181b5881fa55d3946dbc26be3967
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Mon Jul 24 18:42:27 2023 -0700

    add support for C conditional operator

    its used by setbc's pseudocode and by the bfp_* functions

<snip>
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/test/cr/cr_cases.py",
line 204, in case_setbc
    prog = Program(list(SVP64Asm([mnemonic + " 3, 10"])), bigendian)
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/asm.py",
line 61, in __iter__
    yield from self.trans
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/asm.py",
line 114, in translate
    yield from self.translate_one(insn)
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/asm.py",
line 89, in translate_one
    insn = WordInstruction.assemble(record=record, arguments=fields)
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/core.py",
line 1753, in assemble
    for operand in cls.static_operands(record=record):
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/core.py",
line 1692, in operands
    yield from record.operands
  File
"/home/jacob/.virtualenvs/libre-soc-venv-3.7/lib/python3.7/site-packages/cached_property.py",
line 36, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/core.py",
line 830, in operands
    return (self.static_operands + self.dynamic_operands)
  File
"/home/jacob/.virtualenvs/libre-soc-venv-3.7/lib/python3.7/site-packages/cached_property.py",
line 36, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/core.py",
line 840, in static_operands
    span=self.section.bitsel,
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/core.py",
line 1137, in __init__
    for idx in operand.span:
  File
"/home/jacob/.virtualenvs/libre-soc-venv-3.7/lib/python3.7/site-packages/cached_property.py",
line 36, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File
"/home/jacob/projects/libreriscv/openpower-isa/src/openpower/insndb/core.py",
line 1007, in span
    return self.record.fields[self.name]
KeyError: 'BI'

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


More information about the libre-soc-bugs mailing list