openpower-isa.git
9 months agobug 676: add start of svp64 maxloc, based on pospopcount
Luke Kenneth Casson Leighton [Mon, 18 Dec 2023 10:59:49 +0000 (10:59 +0000)]
bug 676: add start of svp64 maxloc, based on pospopcount

9 months agobug 1236: add extra argument to svstep: RA.
Luke Kenneth Casson Leighton [Sat, 16 Dec 2023 08:37:31 +0000 (08:37 +0000)]
bug 1236: add extra argument to svstep: RA.

9 months agobug 676: put maxloc.py test data into array
Luke Kenneth Casson Leighton [Fri, 15 Dec 2023 23:28:53 +0000 (23:28 +0000)]
bug 676: put maxloc.py test data into array

9 months agoremove unneeded tests
Luke Kenneth Casson Leighton [Fri, 15 Dec 2023 23:26:23 +0000 (23:26 +0000)]
remove unneeded tests

9 months agobug 672: add python-based maxloc.py for unit testing
Luke Kenneth Casson Leighton [Fri, 15 Dec 2023 23:25:16 +0000 (23:25 +0000)]
bug 672: add python-based maxloc.py for unit testing

9 months agobug 676: add first cut at maxloc copy/paste from ddffirst test
Luke Kenneth Casson Leighton [Fri, 15 Dec 2023 23:23:37 +0000 (23:23 +0000)]
bug 676: add first cut at maxloc copy/paste from ddffirst test

9 months agofixedsync.mdwn: change sync from v3.1B version to v3.0B version
Jacob Lifshay [Tue, 16 Jan 2024 09:18:58 +0000 (01:18 -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.

9 months agobug 1034: make sv.crternlogi test a vector-vector-scalar on *0,*16,31
Luke Kenneth Casson Leighton [Mon, 29 Jan 2024 14:05:36 +0000 (14:05 +0000)]
bug 1034: make sv.crternlogi test a vector-vector-scalar on *0,*16,31

9 months agoshorten call to ISACaller.prep_namespace
Luke Kenneth Casson Leighton [Mon, 29 Jan 2024 14:04:59 +0000 (14:04 +0000)]
shorten call to ISACaller.prep_namespace

9 months agobug 1034: cut/paste error on crternlogi, 4*BT+32 should be just BT+32
Luke Kenneth Casson Leighton [Mon, 29 Jan 2024 13:31:22 +0000 (13:31 +0000)]
bug 1034: cut/paste error on crternlogi, 4*BT+32 should be just BT+32

9 months agobug 1034: clarify CR field encoding (extra/value)
Luke Kenneth Casson Leighton [Sun, 28 Jan 2024 21:46:07 +0000 (21:46 +0000)]
bug 1034: clarify CR field encoding (extra/value)

9 months agowhoops
Luke Kenneth Casson Leighton [Sun, 28 Jan 2024 20:45:14 +0000 (20:45 +0000)]
whoops

9 months agoadd BA_BFB decode to PPCRecord and SVP64Record
Luke Kenneth Casson Leighton [Sun, 28 Jan 2024 20:42:50 +0000 (20:42 +0000)]
add BA_BFB decode to PPCRecord and SVP64Record

9 months agobug 1034: add first version of sv.crternlogi unit test
Luke Kenneth Casson Leighton [Sat, 27 Jan 2024 20:18:07 +0000 (20:18 +0000)]
bug 1034: add first version of sv.crternlogi unit test

9 months agobug 1034: yet again move crternlogi due to size of operands
Luke Kenneth Casson Leighton [Sat, 27 Jan 2024 11:57:10 +0000 (11:57 +0000)]
bug 1034: yet again move crternlogi due to size of operands

9 months agobug 10344: had to move crfternlogi to TLI-Form
Luke Kenneth Casson Leighton [Sat, 27 Jan 2024 11:14:38 +0000 (11:14 +0000)]
bug 10344: had to move crfternlogi to TLI-Form

9 months agobug 1034: add crbinlog and crternlogi, rename crbinlog to crfbinlog
Luke Kenneth Casson Leighton [Thu, 25 Jan 2024 17:28:05 +0000 (17:28 +0000)]
bug 1034: add crbinlog and crternlogi, rename crbinlog to crfbinlog

10 months agobug 1034: properly qualify crbinlog and crternlogi in sv_analysys.py
Luke Kenneth Casson Leighton [Sat, 20 Jan 2024 18:33:10 +0000 (18:33 +0000)]
bug 1034: properly qualify crbinlog and crternlogi in sv_analysys.py

10 months agobug 1034: add crbinlog unit test, fix binlog test, move maddsub*
Luke Kenneth Casson Leighton [Sat, 20 Jan 2024 14:58:46 +0000 (14:58 +0000)]
bug 1034: add crbinlog unit test, fix binlog test, move maddsub*

10 months agobug 1034: add crbinlog and binlog, unit test binlog done
Luke Kenneth Casson Leighton [Sat, 20 Jan 2024 14:14:27 +0000 (14:14 +0000)]
bug 1034: add crbinlog and binlog, unit test binlog done

10 months agobug 1034: add crternlogi. involved adding a new CR field BFA_BFB_BF sigh
Luke Kenneth Casson Leighton [Wed, 17 Jan 2024 14:56:16 +0000 (14:56 +0000)]
bug 1034: add crternlogi. involved adding a new CR field BFA_BFB_BF sigh

10 months agobug 1251: WIP stbcx removed
Luke Kenneth Casson Leighton [Sun, 14 Jan 2024 19:36:18 +0000 (19:36 +0000)]
bug 1251: WIP stbcx removed

10 months agofix memory locations in linked-list test_caller_svp64_ldst.py
Luke Kenneth Casson Leighton [Mon, 8 Jan 2024 13:53:39 +0000 (13:53 +0000)]
fix memory locations in linked-list test_caller_svp64_ldst.py

10 months agofptrans.mdwn: don't parenthesize register being assigned to
Jacob Lifshay [Tue, 9 Jan 2024 08:01:44 +0000 (00:01 -0800)]
fptrans.mdwn: don't parenthesize register being assigned to

Fixes: https://bugs.libre-soc.org/show_bug.cgi?id=1247
11 months agowhitespace
Luke Kenneth Casson Leighton [Thu, 21 Dec 2023 17:22:52 +0000 (17:22 +0000)]
whitespace

11 months ago.gitlab-ci.yml: re-add maxschedchunk, it provides massive speedups -- ~2x on CI
Jacob Lifshay [Tue, 19 Dec 2023 01:46:13 +0000 (17:46 -0800)]
.gitlab-ci.yml: re-add maxschedchunk, it provides massive speedups -- ~2x on CI

this essentially reverts bfb9d7f312ebb5f394414b5e1ea8f03728af4489

on CI, bfb9d7f312ebb5f394414b5e1ea8f03728af4489 took 5h45m:
https://salsa.debian.org/Kazan-team/mirrors/openpower-isa/-/jobs/5038101
the parent commit took 2h37m:
https://salsa.debian.org/Kazan-team/mirrors/openpower-isa/-/jobs/5034703

11 months agobug 1183: correct comments from cut/paste
Luke Kenneth Casson Leighton [Fri, 15 Dec 2023 23:22:16 +0000 (23:22 +0000)]
bug 1183: correct comments from cut/paste

11 months agoremove pytest option which hard-codes assumptions about installed version
lkcl [Wed, 13 Dec 2023 22:36:45 +0000 (22:36 +0000)]
remove pytest option which hard-codes assumptions about installed version

11 months agoelf/simple_cases: disable case_static_glibc for now, re-enable when we work on it... 1228-elf-dynamic
Jacob Lifshay [Tue, 12 Dec 2023 18:20:03 +0000 (10:20 -0800)]
elf/simple_cases: disable case_static_glibc for now, re-enable when we work on it again.

11 months agoadd make_gdb_vm_image.sh script, it doesn't work yet but could be useful
Jacob Lifshay [Tue, 12 Dec 2023 18:11:04 +0000 (10:11 -0800)]
add make_gdb_vm_image.sh script, it doesn't work yet but could be useful

see https://bugs.libre-soc.org/show_bug.cgi?id=1228#c15

11 months agoload_elf: dump a sequence of gdb commands for easy debugging
Jacob Lifshay [Thu, 7 Dec 2023 08:55:22 +0000 (00:55 -0800)]
load_elf: dump a sequence of gdb commands for easy debugging

dumps a sequence of gdb commands that can easily be copied from
the output and pasted into gdb to reset the stack to what load_elf
uses, instead of what gdb's execve does.

11 months agoMemMMap: fix brk_syscall -- use unrounded input address as heap end
Jacob Lifshay [Thu, 7 Dec 2023 08:53:20 +0000 (00:53 -0800)]
MemMMap: fix brk_syscall -- use unrounded input address as heap end

it should use the input address as given when tracking the end of
the heap and returning addresses. it still needs to align addresses
when mapping/unmapping pages.

11 months agoload_elf: add forgotten auxv entries
Jacob Lifshay [Thu, 7 Dec 2023 08:52:48 +0000 (00:52 -0800)]
load_elf: add forgotten auxv entries

11 months agoload_elf: copy linux's auxv, argv, and env layout
Jacob Lifshay [Thu, 7 Dec 2023 07:36:14 +0000 (23:36 -0800)]
load_elf: copy linux's auxv, argv, and env layout

11 months agoload_elf: match linux better for statically-linked binaries
Jacob Lifshay [Wed, 6 Dec 2023 09:11:56 +0000 (01:11 -0800)]
load_elf: match linux better for statically-linked binaries

we still need more auxv entries, but the rest should match close
enough now.

11 months agoelf/simple_cases: enable debug info for statically-linked glibc demo
Jacob Lifshay [Wed, 6 Dec 2023 09:09:42 +0000 (01:09 -0800)]
elf/simple_cases: enable debug info for statically-linked glibc demo

11 months agoMemMMap: raise error for bad load/fetch addresses when emulating mmap
Jacob Lifshay [Wed, 6 Dec 2023 09:08:25 +0000 (01:08 -0800)]
MemMMap: raise error for bad load/fetch addresses when emulating mmap

11 months agocaller.py: don't try to make zero-sized memory accesses, they error
Jacob Lifshay [Wed, 6 Dec 2023 09:07:42 +0000 (01:07 -0800)]
caller.py: don't try to make zero-sized memory accesses, they error

11 months agotest/elf/__init__: make objdump go to default log kind -- it's quieter
Jacob Lifshay [Wed, 6 Dec 2023 09:06:26 +0000 (01:06 -0800)]
test/elf/__init__: make objdump go to default log kind -- it's quieter

11 months agocaller.py: implement writev syscall
Jacob Lifshay [Mon, 4 Dec 2023 10:15:47 +0000 (02:15 -0800)]
caller.py: implement writev syscall

11 months agofixedsync.mdwn: add sync instruction
Jacob Lifshay [Mon, 4 Dec 2023 10:15:30 +0000 (02:15 -0800)]
fixedsync.mdwn: add sync instruction

11 months agoMemMMap: use modified_pages.discard instead of remove since pages may not be modified
Jacob Lifshay [Mon, 4 Dec 2023 10:13:52 +0000 (02:13 -0800)]
MemMMap: use modified_pages.discard instead of remove since pages may not be modified

11 months agotest/ldst: add fixedsync tests for b/h/w/d ll/sc, but not quadword
Jacob Lifshay [Mon, 4 Dec 2023 09:45:23 +0000 (01:45 -0800)]
test/ldst: add fixedsync tests for b/h/w/d ll/sc, but not quadword

quadword probably doesn't work correctly and probably requires a bit of work

11 months agomajor/minor_62: add FIXMEs to lq/stq to match the FIXMEs on lqarx/stqcx.
Jacob Lifshay [Mon, 4 Dec 2023 09:43:26 +0000 (01:43 -0800)]
major/minor_62: add FIXMEs to lq/stq to match the FIXMEs on lqarx/stqcx.

11 months agofixedsync/minor_31: add stqcx. because I'm adding the others anyway
Jacob Lifshay [Mon, 4 Dec 2023 09:42:31 +0000 (01:42 -0800)]
fixedsync/minor_31: add stqcx. because I'm adding the others anyway

11 months agofixedsync/minor_31: add lqarx because I'm adding the others anyway
Jacob Lifshay [Mon, 4 Dec 2023 09:41:04 +0000 (01:41 -0800)]
fixedsync/minor_31: add lqarx because I'm adding the others anyway

11 months agominor_62.csv: add unofficial and comment2 fields
Jacob Lifshay [Mon, 4 Dec 2023 09:37:29 +0000 (01:37 -0800)]
minor_62.csv: add unofficial and comment2 fields

11 months agomajor.csv: add unofficial and comment2 fields
Jacob Lifshay [Mon, 4 Dec 2023 09:36:57 +0000 (01:36 -0800)]
major.csv: add unofficial and comment2 fields

11 months agofixedsync.mdwn: implement other sizes: lbarx lharx ldarx stbcx. sthcx. stdcx.
Jacob Lifshay [Mon, 4 Dec 2023 08:23:09 +0000 (00:23 -0800)]
fixedsync.mdwn: implement other sizes: lbarx lharx ldarx stbcx. sthcx. stdcx.

still unimplemented: lqarx and stqcx.

11 months agofixedsync.mdwn: fix stwcx. pseudocode
Jacob Lifshay [Mon, 4 Dec 2023 08:21:15 +0000 (00:21 -0800)]
fixedsync.mdwn: fix stwcx. pseudocode

11 months agoISACaller: add PowerISA spec. reference for real_page_size
Jacob Lifshay [Mon, 4 Dec 2023 08:19:31 +0000 (00:19 -0800)]
ISACaller: add PowerISA spec. reference for real_page_size

11 months agoISACaller: implement real_addr pseudo-code helper
Jacob Lifshay [Mon, 4 Dec 2023 08:18:10 +0000 (00:18 -0800)]
ISACaller: implement real_addr pseudo-code helper

11 months agotest/state: support memory in ExpectedState
Jacob Lifshay [Mon, 4 Dec 2023 08:17:02 +0000 (00:17 -0800)]
test/state: support memory in ExpectedState

11 months agoadd initial lwarx unit test and pseudocode
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 20:30:27 +0000 (20:30 +0000)]
add initial lwarx unit test and pseudocode

11 months agoadd WIP lrsc mdwn for stbcx
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 18:42:57 +0000 (18:42 +0000)]
add WIP lrsc mdwn for stbcx

11 months agotake every opportunity *not* to go onto a separate line with commas
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 10:11:28 +0000 (10:11 +0000)]
take every opportunity *not* to go onto a separate line with commas

bad:
-        log("is priv", instr_is_privileged, hex(self.msr.value),
-            self.msr[MSRb.PR])

good:
-        if instr_is_privileged and self.msr[MSRb.PR] == 1:
+        PR = self.msr[MSRb.PR]
+        log("is priv", instr_is_privileged, hex(self.msr.value), PR)
+        if instr_is_privileged and PR == 1:

11 months agoelf/simple_cases: add hello world statically-linked to glibc
Jacob Lifshay [Sun, 3 Dec 2023 08:51:13 +0000 (00:51 -0800)]
elf/simple_cases: add hello world statically-linked to glibc

it errors when reaching stwcx.

11 months agocaller.py: implement readlink/readlinkat syscalls
Jacob Lifshay [Sun, 3 Dec 2023 09:23:04 +0000 (01:23 -0800)]
caller.py: implement readlink/readlinkat syscalls

11 months agocaller.py: implement a pile of syscalls
Jacob Lifshay [Sun, 3 Dec 2023 08:49:08 +0000 (00:49 -0800)]
caller.py: implement a pile of syscalls

this implements read, mmap, mmap2, brk, openat, uname, and newuname.

it also stubs out munmap, mprotect, and pkey_mprotect so programs
don't crash cpython.

11 months agoload_elf: set mem.heap_range so brk works
Jacob Lifshay [Sun, 3 Dec 2023 08:47:05 +0000 (00:47 -0800)]
load_elf: set mem.heap_range so brk works

11 months agoMem: speed up log_fancy by using make_sim_state_dict()
Jacob Lifshay [Sun, 3 Dec 2023 08:46:01 +0000 (00:46 -0800)]
Mem: speed up log_fancy by using make_sim_state_dict()

11 months agoppc_flags: include more headers for uname, openat, etc.
Jacob Lifshay [Sun, 3 Dec 2023 08:44:48 +0000 (00:44 -0800)]
ppc_flags: include more headers for uname, openat, etc.

11 months agosyscalls/__init__: log which syscall is made
Jacob Lifshay [Sun, 3 Dec 2023 08:42:51 +0000 (00:42 -0800)]
syscalls/__init__: log which syscall is made

this is very handy when looking at logs, since you no longer have to
manually translate syscall numbers to syscall names.

11 months agoMemMMap/SimState: speed up SimState.get_mem() for large memories
Jacob Lifshay [Sun, 3 Dec 2023 07:57:21 +0000 (23:57 -0800)]
MemMMap/SimState: speed up SimState.get_mem() for large memories

make MemMMap use struct.Struct.unpack_from to read a whole page at
once, rather than doing a sequence of loads. This makes an ELF
binary statically-linked to glibc able to run many instructions per
second rather than one every tens of seconds or so.

11 months agoMemMMap: log mmap calls
Jacob Lifshay [Sun, 3 Dec 2023 07:50:57 +0000 (23:50 -0800)]
MemMMap: log mmap calls

11 months agomem.py: make MMapEmuBlock use hex for repr
Jacob Lifshay [Sun, 3 Dec 2023 07:50:08 +0000 (23:50 -0800)]
mem.py: make MMapEmuBlock use hex for repr

11 months agoMem: don't log loads when dumping, you'll see the memory dump anyway
Jacob Lifshay [Sun, 3 Dec 2023 07:45:41 +0000 (23:45 -0800)]
Mem: don't log loads when dumping, you'll see the memory dump anyway

this avoids a giant list of memory-load log messages immediately
followed by a much nicer memory dump, just show the memory dump
without logging every single load needed to create the memory dump.

This also makes memory-dumping faster for large memories.

11 months agoMemMMap: finish implementing brk_syscall
Jacob Lifshay [Sun, 3 Dec 2023 03:23:22 +0000 (19:23 -0800)]
MemMMap: finish implementing brk_syscall

11 months agocaller.py: use yield from on is_ffirst_mode since it's a generator
Jacob Lifshay [Wed, 13 Dec 2023 00:51:33 +0000 (16:51 -0800)]
caller.py: use yield from on is_ffirst_mode since it's a generator

11 months agocaller.py: fix undefined ffirst, hope I guessed the correct value
Jacob Lifshay [Wed, 13 Dec 2023 00:50:27 +0000 (16:50 -0800)]
caller.py: fix undefined ffirst, hope I guessed the correct value

11 months agocaller.py: XLEN must be accessed as self.XLEN
Jacob Lifshay [Wed, 13 Dec 2023 00:49:24 +0000 (16:49 -0800)]
caller.py: XLEN must be accessed as self.XLEN

11 months agoreenable tests
Luke Kenneth Casson Leighton [Sat, 9 Dec 2023 06:47:26 +0000 (06:47 +0000)]
reenable tests

11 months agobug #672: fix sv.minmax dd-ffirst-single unit test
Luke Kenneth Casson Leighton [Sat, 9 Dec 2023 06:40:35 +0000 (06:40 +0000)]
bug #672: fix sv.minmax dd-ffirst-single unit test

11 months agobug #672: invert testing in sv.minmax and add Rc=1
Luke Kenneth Casson Leighton [Fri, 8 Dec 2023 15:38:26 +0000 (15:38 +0000)]
bug #672: invert testing in sv.minmax and add Rc=1

11 months agobug #676: add sv.minmax dd-ffirst-single test
Luke Kenneth Casson Leighton [Fri, 8 Dec 2023 15:21:34 +0000 (15:21 +0000)]
bug #676: add sv.minmax dd-ffirst-single test

11 months agoadded a log func on the expected results for scalar ddffirst
Shriya Sharma [Thu, 7 Dec 2023 20:15:13 +0000 (20:15 +0000)]
added a log func on the expected results for scalar ddffirst

11 months agoadded a log func on the expected results for scalar ddffirst
Shriya Sharma [Thu, 7 Dec 2023 20:04:04 +0000 (20:04 +0000)]
added a log func on the expected results for scalar ddffirst

11 months agoadd repr function to CR field
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 20:00:12 +0000 (20:00 +0000)]
add repr function to CR field

11 months agocorrection to idx
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 19:52:29 +0000 (19:52 +0000)]
correction to idx

11 months agocorrection to ra
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 19:52:02 +0000 (19:52 +0000)]
correction to ra

11 months agocorrection to VL
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 19:51:38 +0000 (19:51 +0000)]
correction to VL

11 months agoadded the expected results for scalar ddffirst
Shriya Sharma [Thu, 7 Dec 2023 19:54:19 +0000 (19:54 +0000)]
added the expected results for scalar ddffirst

11 months agostarting on the unit test for scalar ddffirst
Shriya Sharma [Thu, 7 Dec 2023 19:43:50 +0000 (19:43 +0000)]
starting on the unit test for scalar ddffirst

11 months agobug #1183: add test function sv_cmpi
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 19:28:29 +0000 (19:28 +0000)]
bug #1183: add test function sv_cmpi

based on https://bugs.libre-soc.org/show_bug.cgi?id=1183#c3

11 months agobug #1183: attempt first ddffirst mapreduce mode
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 17:26:15 +0000 (17:26 +0000)]
bug #1183: attempt first ddffirst mapreduce mode

11 months agocorrection syntax error
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 17:52:33 +0000 (17:52 +0000)]
correction syntax error

11 months agobug 672: remove redundant/incorrect comment in pospopcount
Luke Kenneth Casson Leighton [Tue, 5 Dec 2023 14:45:37 +0000 (14:45 +0000)]
bug 672: remove redundant/incorrect comment in pospopcount

11 months agobug 672: pospopcount, cleanup, no functional change
Luke Kenneth Casson Leighton [Fri, 1 Dec 2023 09:05:12 +0000 (09:05 +0000)]
bug 672: pospopcount, cleanup, no functional change

11 months agobug 672: pospopcount, correct NGI Grant
Luke Kenneth Casson Leighton [Thu, 30 Nov 2023 15:26:00 +0000 (15:26 +0000)]
bug 672: pospopcount, correct NGI Grant

11 months agobug #672: more code-comments
Luke Kenneth Casson Leighton [Wed, 29 Nov 2023 19:43:26 +0000 (19:43 +0000)]
bug #672: more code-comments

11 months agocomments
Luke Kenneth Casson Leighton [Wed, 29 Nov 2023 19:41:22 +0000 (19:41 +0000)]
comments

11 months agobug #672: shorten pospopcount further
Luke Kenneth Casson Leighton [Wed, 29 Nov 2023 19:36:17 +0000 (19:36 +0000)]
bug #672: shorten pospopcount further

by setting VL=MVL=8 the sv.popcntd/sw=8 will wipe out the unused destinations
to zeros, so no need to clear them manually. loses one additional instruction

11 months agobug #672: pospopcount working with large arrays
Luke Kenneth Casson Leighton [Wed, 29 Nov 2023 19:29:12 +0000 (19:29 +0000)]
bug #672: pospopcount working with large arrays

pospopcount is supposed to be able to handle long arrays of data,
but it turns out that sv.lbzu/pi/dw=8 was calculating an EA in 8-bit,
meaning that it wrapped around to a zero memory address.
now this is resolved the code which has been made shorter actually works

11 months agobug #672: pospopcount using sv.lbzu/pi/dw=8 error
Luke Kenneth Casson Leighton [Wed, 29 Nov 2023 19:27:23 +0000 (19:27 +0000)]
bug #672: pospopcount using sv.lbzu/pi/dw=8 error

COMPLEX! this turns out to be a spec violation where RA (EA)
*must* be treated as 64-bit *NOT* have its width overridden
just because destination elwidth is set to 8-bit.
* source elwidth is supposed to apply to STORE
* dest elwidth is supposed to apply to LOAD
but those are MEMORY DATA not memory ADDRESSes they are
supposed to apply to.

TODO, most likely LDST_IDX needs fixing (RB may also need
an elwidth cancellation/override, have to check the spec)

11 months agobug #672: shorter pospopcount but not fully working
Luke Kenneth Casson Leighton [Wed, 29 Nov 2023 15:06:18 +0000 (15:06 +0000)]
bug #672: shorter pospopcount but not fully working

variant on pospopcount but when 241 array items instead of 240 are used
it produces the wrong answer. under investigation

11 months agoISACaller/parser: kludge: support (RA|0) when elwidth != 64
Jacob Lifshay [Wed, 29 Nov 2023 06:13:25 +0000 (22:13 -0800)]
ISACaller/parser: kludge: support (RA|0) when elwidth != 64

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

11 months agoisatables: update generated csvs
Jacob Lifshay [Wed, 29 Nov 2023 06:12:17 +0000 (22:12 -0800)]
isatables: update generated csvs

11 months agobug #672: pospopcount finally got the right answer
Luke Kenneth Casson Leighton [Tue, 28 Nov 2023 22:45:42 +0000 (22:45 +0000)]
bug #672: pospopcount finally got the right answer

forgot to add popcntd initially, lots of futzing around, still work to do
but it gives a correct answer now

11 months agobug #672: fixing pospopcount assembler
Luke Kenneth Casson Leighton [Tue, 28 Nov 2023 21:03:43 +0000 (21:03 +0000)]
bug #672: fixing pospopcount assembler

there is a lot going on here, this is pushing the boundaries of
what ISAcaller can do (or hasnt been asked to do... until now)
* gbbd (gather bits and bytes double) had to be added
* sw=8,dw=64 had to be fixed (XLEN is actually 64 there
  but source elements have to be ZERO-EXTENDED...)
* a bug in sv.addi/sw=8 was found
  https://bugs.libre-soc.org/show_bug.cgi?id=1221
* some changes to setvl have to be made/written (!)
* sv.bc in CTR-reduction mode needs to potentially be fixed
  or at least properly examined

11 months agofix elwidth overrides when sw=8
Luke Kenneth Casson Leighton [Tue, 28 Nov 2023 20:41:01 +0000 (20:41 +0000)]
fix elwidth overrides when sw=8
the way that XLEN works is it must be MAX(sw,dw) which is not what
was happening, it was fixed at sw (source width)