openpower-isa.git
2 years agoswitch off XER.so reading on "setvl.", it makes no sense
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 11:09:33 +0000 (12:09 +0100)]
switch off XER.so reading on "setvl.", it makes no sense
https://bugs.libre-soc.org/show_bug.cgi?id=914

2 years agoRevert "support assembling svp64 instructions with custom suffixes, like sv.maxu"
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 09:45:44 +0000 (10:45 +0100)]
Revert "support assembling svp64 instructions with custom suffixes, like sv.maxu"

This reverts commit 0e80cab3b809d432354ca05464e95dc53db11b64.

"sv.ffmadds." is inserted as a 32-bit operation instead of as a ".long"
"sv.ffmadds" on the other hand is correctly converted to ".long"

2 years agoadd two instructions demoing broken commit 0e80cab3b809d43
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 09:45:41 +0000 (10:45 +0100)]
add two instructions demoing broken commit  0e80cab3b809d43

2 years agofix issue with cpython 3.7
Jacob Lifshay [Mon, 29 Aug 2022 08:04:31 +0000 (01:04 -0700)]
fix issue with cpython 3.7

2 years agosvp64_utf_8_validation.py works!
Jacob Lifshay [Mon, 29 Aug 2022 07:32:55 +0000 (00:32 -0700)]
svp64_utf_8_validation.py works!

2 years agosupport assembling svp64 instructions with custom suffixes, like sv.maxu
Jacob Lifshay [Mon, 29 Aug 2022 07:28:33 +0000 (00:28 -0700)]
support assembling svp64 instructions with custom suffixes, like sv.maxu

2 years agoallow tests to pass None in order to not have to match so, ca, and ov
Jacob Lifshay [Mon, 29 Aug 2022 07:27:12 +0000 (00:27 -0700)]
allow tests to pass None in order to not have to match so, ca, and ov

2 years agolog memory in a more fancy format, like hexdump -C
Jacob Lifshay [Mon, 29 Aug 2022 07:25:36 +0000 (00:25 -0700)]
log memory in a more fancy format, like hexdump -C

2 years agostop printing log silence state
Jacob Lifshay [Sun, 28 Aug 2022 17:49:47 +0000 (10:49 -0700)]
stop printing log silence state

2 years agoinitialise overflow to zero in setvl, unconditionally.
Luke Kenneth Casson Leighton [Fri, 26 Aug 2022 18:39:05 +0000 (19:39 +0100)]
initialise overflow to zero in setvl, unconditionally.
add two new CTR-mode/Rc=1 setvl. tests, to confirm that overflow
does/does-not occur correctly when CTR is used as input to set VL

2 years agosigh, update setvl tests, to spec, and ISACaller
Luke Kenneth Casson Leighton [Fri, 26 Aug 2022 15:02:18 +0000 (16:02 +0100)]
sigh, update setvl tests, to spec, and ISACaller
https://libre-soc.org/openpower/sv/setvl/
see Rc=1 section: it is possible to have Rc=1, RT=0, RA!=0 which
means "set VL but do not set RT" which *still* requires that Rc=1
be updated - not from RT but from VL

2 years agoadd setvl unit tests for overflow condition.
Luke Kenneth Casson Leighton [Fri, 26 Aug 2022 14:40:01 +0000 (15:40 +0100)]
add setvl unit tests for overflow condition.
TODO, update spec to match: when VL attempted to be set > MAXVL

2 years agoput back overflow in setvl, TODO actually set an overflow variable
Luke Kenneth Casson Leighton [Fri, 26 Aug 2022 14:18:32 +0000 (15:18 +0100)]
put back overflow in setvl, TODO actually set an overflow variable

2 years agookaaaay, long story. using GPR(_RT) <- something will *not* get
Luke Kenneth Casson Leighton [Fri, 26 Aug 2022 14:17:26 +0000 (15:17 +0100)]
okaaaay, long story. using GPR(_RT) <- something will *not* get
detected by parser.py as an output register.  therefore, the modified
registers were (SVSTATE, CTR) *not* (RT, SVSTATE, CTR).
this resulted in *SVSTATE* being tested for Rc=1, not RT.
added unit tests to catch "setvl."

2 years agoRevert "fix setvl. not setting CR0 properly"
Luke Kenneth Casson Leighton [Fri, 26 Aug 2022 13:51:16 +0000 (14:51 +0100)]
Revert "fix setvl. not setting CR0 properly"

This reverts commit f48aefa37b06a398e953ce3bd877d7b2bbfb6213.

the approach of explicitly setting CR0 in pseudocode is not ok.
ISACaller.handle_comparison is the correct place to do it - and
i am not certain that there are special-cases needed (unlike svstep)

2 years agocode-shuffle on if/elif/nots in sv/trans/svp64.py
Luke Kenneth Casson Leighton [Fri, 26 Aug 2022 01:41:21 +0000 (02:41 +0100)]
code-shuffle on if/elif/nots in sv/trans/svp64.py

2 years agoworking on svp64_utf_8_validation.py -- still broken, though an empty string works...
Jacob Lifshay [Fri, 26 Aug 2022 08:49:05 +0000 (01:49 -0700)]
working on svp64_utf_8_validation.py -- still broken, though an empty string works now!

2 years agoadd more logging
Jacob Lifshay [Fri, 26 Aug 2022 08:47:57 +0000 (01:47 -0700)]
add more logging

2 years agoadd original instruction as a comment, improving debuggability
Jacob Lifshay [Fri, 26 Aug 2022 08:46:41 +0000 (01:46 -0700)]
add original instruction as a comment, improving debuggability

2 years agoadd support for comments in instructions
Jacob Lifshay [Fri, 26 Aug 2022 08:46:06 +0000 (01:46 -0700)]
add support for comments in instructions

2 years agoadd some logging
Jacob Lifshay [Fri, 26 Aug 2022 08:44:39 +0000 (01:44 -0700)]
add some logging

2 years agofix setvl. not setting CR0 properly
Jacob Lifshay [Fri, 26 Aug 2022 08:42:40 +0000 (01:42 -0700)]
fix setvl. not setting CR0 properly

2 years agoconvert more `print`s to `log`s
Jacob Lifshay [Fri, 26 Aug 2022 05:37:21 +0000 (22:37 -0700)]
convert more `print`s to `log`s

2 years agoinclude original svp64 instruction in comment on prefix
Jacob Lifshay [Fri, 26 Aug 2022 05:36:09 +0000 (22:36 -0700)]
include original svp64 instruction in comment on prefix

makes it much nicer when reading instruction traces

2 years agolog rather than print SKIPPED
Jacob Lifshay [Fri, 26 Aug 2022 05:35:26 +0000 (22:35 -0700)]
log rather than print SKIPPED

2 years agomake logging more configurable
Jacob Lifshay [Fri, 26 Aug 2022 05:31:40 +0000 (22:31 -0700)]
make logging more configurable

2 years agofix typo
Jacob Lifshay [Fri, 26 Aug 2022 04:07:26 +0000 (21:07 -0700)]
fix typo

2 years agoupdate comments
Luke Kenneth Casson Leighton [Fri, 26 Aug 2022 01:35:58 +0000 (02:35 +0100)]
update comments

2 years agoadd qemu-system-ppc to .gitlab-ci.yml
Jacob Lifshay [Thu, 25 Aug 2022 10:00:54 +0000 (03:00 -0700)]
add qemu-system-ppc to .gitlab-ci.yml

2 years agomark all known-broken tests so CI passes
Jacob Lifshay [Thu, 25 Aug 2022 09:34:58 +0000 (02:34 -0700)]
mark all known-broken tests so CI passes

2 years agoskip gdb tests when gdb isn't found
Jacob Lifshay [Thu, 25 Aug 2022 09:33:52 +0000 (02:33 -0700)]
skip gdb tests when gdb isn't found

2 years agoallow crtl tests to run in parallel
Jacob Lifshay [Thu, 25 Aug 2022 09:32:10 +0000 (02:32 -0700)]
allow crtl tests to run in parallel

2 years agonmigen.info is being cyber-squatted, has to be removed for now
Luke Kenneth Casson Leighton [Thu, 25 Aug 2022 09:23:40 +0000 (10:23 +0100)]
nmigen.info is being cyber-squatted, has to be removed for now

2 years agoadd XFAIL because the file improperly accesses pdecode2.e.imm_data
Jacob Lifshay [Thu, 25 Aug 2022 06:53:44 +0000 (23:53 -0700)]
add XFAIL because the file improperly accesses pdecode2.e.imm_data

2 years agoadd more generated output to .gitignore
Jacob Lifshay [Thu, 25 Aug 2022 06:52:33 +0000 (23:52 -0700)]
add more generated output to .gitignore

2 years agoadd missing assemblers to .gitlab-ci.yml
Jacob Lifshay [Thu, 25 Aug 2022 06:45:38 +0000 (23:45 -0700)]
add missing assemblers to .gitlab-ci.yml

2 years agoadd missing on_SmtExpr methods
Jacob Lifshay [Thu, 25 Aug 2022 06:44:36 +0000 (23:44 -0700)]
add missing on_SmtExpr methods

2 years agofix assembling `sv.add.`
Jacob Lifshay [Thu, 25 Aug 2022 06:09:55 +0000 (23:09 -0700)]
fix assembling `sv.add.`

2 years agoformat .../trans/svp64.py
Jacob Lifshay [Thu, 25 Aug 2022 06:02:16 +0000 (23:02 -0700)]
format .../trans/svp64.py

2 years agomake pytest ignore non-test classes, these're the last pytest collection warnings
Jacob Lifshay [Thu, 25 Aug 2022 05:36:38 +0000 (22:36 -0700)]
make pytest ignore non-test classes, these're the last pytest collection warnings

2 years agoconvert all test_caller*.py to work with pytest/unittest test discovery
Jacob Lifshay [Thu, 25 Aug 2022 05:33:51 +0000 (22:33 -0700)]
convert all test_caller*.py to work with pytest/unittest test discovery

all the removed code had no benefit because each file only tested
one *TestCase* class, the removed code was only useful for
selecting between multiple *TestCase* classes

2 years agofix deprecated imports
Jacob Lifshay [Thu, 25 Aug 2022 05:07:00 +0000 (22:07 -0700)]
fix deprecated imports

2 years agoremove last uses of soc
Jacob Lifshay [Thu, 25 Aug 2022 04:19:36 +0000 (21:19 -0700)]
remove last uses of soc

2 years agoformat test/runner.py
Jacob Lifshay [Thu, 25 Aug 2022 04:18:45 +0000 (21:18 -0700)]
format test/runner.py

2 years agochange test cases to use TestRunnerBase in order to not need soc
Jacob Lifshay [Thu, 25 Aug 2022 04:14:21 +0000 (21:14 -0700)]
change test cases to use TestRunnerBase in order to not need soc

2 years agoremove non-orthogonal ldst_shift
Luke Kenneth Casson Leighton [Wed, 24 Aug 2022 12:30:00 +0000 (13:30 +0100)]
remove non-orthogonal ldst_shift

2 years agofix annoying typo, comment-out asm_process()
Luke Kenneth Casson Leighton [Wed, 24 Aug 2022 12:29:01 +0000 (13:29 +0100)]
fix annoying typo, comment-out asm_process()

2 years agoduplicate RM CSV entries gone after re-run of sv_analysis.py
Luke Kenneth Casson Leighton [Wed, 24 Aug 2022 12:20:50 +0000 (13:20 +0100)]
duplicate RM CSV entries gone after re-run of sv_analysis.py
due to corrections in CSV files, using patterns instead of repeated binary

2 years agohmm tdi/twi are kinda valid as svp64 prefixable
Luke Kenneth Casson Leighton [Wed, 24 Aug 2022 12:16:46 +0000 (13:16 +0100)]
hmm tdi/twi are kinda valid as svp64 prefixable

2 years agoha ha very funny, sv.andi does not exist, only "sv.andi."
Luke Kenneth Casson Leighton [Wed, 24 Aug 2022 12:14:00 +0000 (13:14 +0100)]
ha ha very funny, sv.andi does not exist, only "sv.andi."
fix assumption in sv/trans/svp64.py on that one
(also correct mistaken change)

2 years agoworking on svp64 utf-8 validation -- still broken
Jacob Lifshay [Wed, 24 Aug 2022 11:36:25 +0000 (04:36 -0700)]
working on svp64 utf-8 validation -- still broken

2 years agofix translation of instructions that require Rc=True, like `sv.andi.`
Jacob Lifshay [Wed, 24 Aug 2022 11:35:10 +0000 (04:35 -0700)]
fix translation of instructions that require Rc=True, like `sv.andi.`

2 years agoadd self.subTest and src_loc_at support to TestAccumulatorBase
Jacob Lifshay [Wed, 24 Aug 2022 11:33:27 +0000 (04:33 -0700)]
add self.subTest and src_loc_at support to TestAccumulatorBase

2 years agomisc cleanup
Jacob Lifshay [Wed, 24 Aug 2022 11:31:43 +0000 (04:31 -0700)]
misc cleanup

2 years agofinished writing svp64 utf-8 validation algorithm -- still buggy
Jacob Lifshay [Wed, 24 Aug 2022 05:14:25 +0000 (22:14 -0700)]
finished writing svp64 utf-8 validation algorithm -- still buggy

2 years agoadd WIP svp64 utf-8 validation algorithm
Jacob Lifshay [Tue, 23 Aug 2022 09:19:19 +0000 (02:19 -0700)]
add WIP svp64 utf-8 validation algorithm

2 years agouse bitpattern in minor_30.csv to give a single match for
Luke Kenneth Casson Leighton [Thu, 18 Aug 2022 00:00:12 +0000 (01:00 +0100)]
use bitpattern in minor_30.csv to give a single match for
rldic and others.  two lines were being used 0000 and 0001,
replaced with 000-

2 years agosv_binutils: support functions
Dmitry Selyutin [Wed, 17 Aug 2022 19:15:24 +0000 (22:15 +0300)]
sv_binutils: support functions

2 years agopower_insn: support function property
Dmitry Selyutin [Wed, 17 Aug 2022 19:13:11 +0000 (22:13 +0300)]
power_insn: support function property

2 years agopower_insn: fix sv_extra algorithm
Dmitry Selyutin [Wed, 17 Aug 2022 18:43:58 +0000 (21:43 +0300)]
power_insn: fix sv_extra algorithm

2 years agopower_enums: fix conversion from selector to reg
Dmitry Selyutin [Wed, 17 Aug 2022 18:43:37 +0000 (21:43 +0300)]
power_enums: fix conversion from selector to reg

2 years agoagain part of the removal of LD/ST-with-shift, take out
Luke Kenneth Casson Leighton [Wed, 17 Aug 2022 16:18:09 +0000 (17:18 +0100)]
again part of the removal of LD/ST-with-shift, take out
the early detection of a LD/ST operation that was formerly needed
for the SVP64.RM decoding to use a completely different 32-bit encoding.
we established with the whole LD/ST-with-shift experiment that this
was a really, really bad idea

2 years agopysvp64dis: rename the script due to name conflicts
Dmitry Selyutin [Tue, 16 Aug 2022 14:00:22 +0000 (17:00 +0300)]
pysvp64dis: rename the script due to name conflicts

2 years agopysvp64dis: switch to SelectableInt class
Dmitry Selyutin [Mon, 15 Aug 2022 20:02:56 +0000 (23:02 +0300)]
pysvp64dis: switch to SelectableInt class

2 years agopysvp64dis: introduce disassembler script
Dmitry Selyutin [Mon, 15 Aug 2022 19:30:32 +0000 (22:30 +0300)]
pysvp64dis: introduce disassembler script

2 years agocodeshuffle
Luke Kenneth Casson Leighton [Mon, 15 Aug 2022 18:30:18 +0000 (19:30 +0100)]
codeshuffle

2 years agoswap complicated bits, simplify ISACaller, reduce indent level
Luke Kenneth Casson Leighton [Mon, 15 Aug 2022 18:27:00 +0000 (19:27 +0100)]
swap complicated bits, simplify ISACaller, reduce indent level

2 years agodebug print for ISACaller pack/unpack
Luke Kenneth Casson Leighton [Mon, 15 Aug 2022 18:21:57 +0000 (19:21 +0100)]
debug print for ISACaller pack/unpack

2 years agoextract pack/unpack as separate bits, and also do elwidth extraction
Luke Kenneth Casson Leighton [Mon, 15 Aug 2022 16:38:13 +0000 (17:38 +0100)]
extract pack/unpack as separate bits, and also do elwidth extraction
at the same time.  reason: pack/unpack is shared with elwidth_src

2 years agoadd rest of missing stuff for cached-property git dependency
Jacob Lifshay [Sun, 14 Aug 2022 22:31:45 +0000 (15:31 -0700)]
add rest of missing stuff for cached-property git dependency

2 years agodang missed *another* argument in ISACaller on the function-morphing
Luke Kenneth Casson Leighton [Sun, 14 Aug 2022 21:36:50 +0000 (22:36 +0100)]
dang missed *another* argument in ISACaller on the function-morphing

2 years agosv_binutils: consider only SVP64 instructions
Dmitry Selyutin [Sat, 13 Aug 2022 19:06:26 +0000 (22:06 +0300)]
sv_binutils: consider only SVP64 instructions

2 years agosv_binutils: do not generate svp64_opindex_rm_field
Dmitry Selyutin [Sat, 13 Aug 2022 18:11:13 +0000 (21:11 +0300)]
sv_binutils: do not generate svp64_opindex_rm_field

2 years agosv_binutils: support opcodes
Dmitry Selyutin [Fri, 12 Aug 2022 13:32:32 +0000 (16:32 +0300)]
sv_binutils: support opcodes

2 years agosv_binutils: migrate to instructions db
Dmitry Selyutin [Fri, 12 Aug 2022 12:17:10 +0000 (15:17 +0300)]
sv_binutils: migrate to instructions db

2 years agopower_insn.py: introduce instruction database
Dmitry Selyutin [Thu, 4 Aug 2022 21:02:11 +0000 (00:02 +0300)]
power_insn.py: introduce instruction database

2 years agoisatables: introduce instruction database CSV
Dmitry Selyutin [Thu, 4 Aug 2022 20:52:30 +0000 (23:52 +0300)]
isatables: introduce instruction database CSV

2 years agopower_enums: map in/out to extra
Dmitry Selyutin [Thu, 4 Aug 2022 20:06:45 +0000 (23:06 +0300)]
power_enums: map in/out to extra

2 years agopower_enums: introduce SVMode enum
Dmitry Selyutin [Tue, 2 Aug 2022 19:27:39 +0000 (22:27 +0300)]
power_enums: introduce SVMode enum

2 years agopower_enums: introduce SVExtraReg enum
Dmitry Selyutin [Tue, 2 Aug 2022 18:27:42 +0000 (21:27 +0300)]
power_enums: introduce SVExtraReg enum

2 years agopower_enums: introduce SVExtraRegType enum
Dmitry Selyutin [Tue, 2 Aug 2022 18:22:27 +0000 (21:22 +0300)]
power_enums: introduce SVExtraRegType enum

2 years agopower_enums: introduce SVExtra alias
Dmitry Selyutin [Tue, 2 Aug 2022 18:23:07 +0000 (21:23 +0300)]
power_enums: introduce SVExtra alias

2 years agopower_enums: introduce RegType enum
Dmitry Selyutin [Tue, 2 Aug 2022 17:27:34 +0000 (20:27 +0300)]
power_enums: introduce RegType enum

2 years agopower_enums: allow SVPtype aliases
Dmitry Selyutin [Tue, 2 Aug 2022 12:50:07 +0000 (15:50 +0300)]
power_enums: allow SVPtype aliases

2 years agopower_enums: better repr for Function enum
Dmitry Selyutin [Tue, 2 Aug 2022 11:16:26 +0000 (14:16 +0300)]
power_enums: better repr for Function enum

2 years agopower_enums: introduce LDSTLen alias class
Dmitry Selyutin [Tue, 2 Aug 2022 11:07:20 +0000 (14:07 +0300)]
power_enums: introduce LDSTLen alias class

2 years agopower_enums: introduce base enum class
Dmitry Selyutin [Tue, 2 Aug 2022 11:06:39 +0000 (14:06 +0300)]
power_enums: introduce base enum class

2 years agosetup.py: add cached-property dependency
Dmitry Selyutin [Sat, 6 Aug 2022 09:33:41 +0000 (12:33 +0300)]
setup.py: add cached-property dependency

2 years agosv_analysis: decouple CSVs glob code
Dmitry Selyutin [Fri, 12 Aug 2022 13:16:05 +0000 (16:16 +0300)]
sv_analysis: decouple CSVs glob code

2 years agogo with separate bit for Pack/Unpack mode in SVP64RMModeDecode
Luke Kenneth Casson Leighton [Sun, 14 Aug 2022 16:46:04 +0000 (17:46 +0100)]
go with separate bit for Pack/Unpack mode in SVP64RMModeDecode

2 years agoremove LD/ST-shift mode from ISACaller
Luke Kenneth Casson Leighton [Sun, 14 Aug 2022 16:32:58 +0000 (17:32 +0100)]
remove LD/ST-shift mode from ISACaller

2 years agoadd PACK/UNPACK Mode descriptions to power_svp64_rm.py
Luke Kenneth Casson Leighton [Sun, 14 Aug 2022 16:12:26 +0000 (17:12 +0100)]
add PACK/UNPACK Mode descriptions to power_svp64_rm.py
(update comments, first) and add new PACK mode to SVP64RMMode
in poewr_enums.py

2 years agowhoops re-added accidentally-deleted CSV file
Luke Kenneth Casson Leighton [Sat, 13 Aug 2022 21:40:20 +0000 (22:40 +0100)]
whoops re-added accidentally-deleted CSV file

2 years agoremove Pack-Unpack csv files
Luke Kenneth Casson Leighton [Sat, 13 Aug 2022 21:37:20 +0000 (22:37 +0100)]
remove Pack-Unpack csv files

2 years agoremove Pack/Unpack flag entirely from sv_analysis
Luke Kenneth Casson Leighton [Sat, 13 Aug 2022 21:26:24 +0000 (22:26 +0100)]
remove Pack/Unpack flag entirely from sv_analysis

2 years agodisable pack/unpack in sv_analysis.py - going to use bits in
Luke Kenneth Casson Leighton [Sat, 13 Aug 2022 21:21:35 +0000 (22:21 +0100)]
disable pack/unpack in sv_analysis.py - going to use bits in
each mode, now.

2 years agoinvalidate grev cases, replaced by grevlut
Luke Kenneth Casson Leighton [Sat, 13 Aug 2022 17:21:04 +0000 (18:21 +0100)]
invalidate grev cases, replaced by grevlut

2 years agoremove LDSTBREV condition, used for ld-st-with-shift
Luke Kenneth Casson Leighton [Fri, 12 Aug 2022 13:14:44 +0000 (14:14 +0100)]
remove LDSTBREV condition, used for ld-st-with-shift

2 years agoremive svfixedload.mdwn. requires scalar fixed load to be
Luke Kenneth Casson Leighton [Fri, 12 Aug 2022 11:26:54 +0000 (12:26 +0100)]
remive svfixedload.mdwn. requires scalar fixed load to be
added to Power ISA 3 *scalar* instructions

2 years agoremove use of sv ld shifted, replace with els, deprecate the unit test
Luke Kenneth Casson Leighton [Fri, 12 Aug 2022 11:24:02 +0000 (12:24 +0100)]
remove use of sv ld shifted, replace with els, deprecate the unit test