openpower-isa.git
21 months agoadd bc_ctr and bc_cti but not used yet
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 21:00:15 +0000 (22:00 +0100)]
add bc_ctr and bc_cti but not used yet

21 months agoprint out reg num in _check_regs, useful debug
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 20:56:44 +0000 (21:56 +0100)]
print out reg num in _check_regs, useful debug

21 months agotest_pysvp64dis: test els specifier
Dmitry Selyutin [Mon, 19 Sep 2022 20:29:31 +0000 (23:29 +0300)]
test_pysvp64dis: test els specifier

21 months agopower_insn: support els specifier
Dmitry Selyutin [Mon, 19 Sep 2022 20:27:45 +0000 (23:27 +0300)]
power_insn: support els specifier

21 months agocut cruft in caller.py
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 17:22:42 +0000 (18:22 +0100)]
cut cruft in caller.py

21 months agocodemorph on rc handling
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 16:04:05 +0000 (17:04 +0100)]
codemorph on rc handling

21 months agocodemorph
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 15:56:01 +0000 (16:56 +0100)]
codemorph

21 months agofirst interation (ha ha) src/dst iterators for ISACaller
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 15:44:54 +0000 (16:44 +0100)]
first interation (ha ha) src/dst iterators for ISACaller

21 months agocodemorph reduce indentation
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 14:30:26 +0000 (15:30 +0100)]
codemorph reduce indentation

21 months agocode cleanup on ISACaller write_output
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 14:21:31 +0000 (15:21 +0100)]
code cleanup on ISACaller write_output

21 months agorename to avoid conflict pred_dz from pred_dst_zero
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 12:31:23 +0000 (13:31 +0100)]
rename to avoid conflict pred_dz from pred_dst_zero

21 months agoanother code-morph splitting out the src/dst mask preparation
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 12:25:03 +0000 (13:25 +0100)]
another code-morph splitting out the src/dst mask preparation
from actual use of it to perform skipping (advancing src/dst step)

21 months agoadd function for calling a simulation
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 08:15:18 +0000 (09:15 +0100)]
add function for calling a simulation

21 months agoanother code-morph working towards getting the predicate-skipping
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 07:37:45 +0000 (08:37 +0100)]
another code-morph working towards getting the predicate-skipping
into the iterator-looping

21 months agowhitespace
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 07:22:26 +0000 (08:22 +0100)]
whitespace

21 months agocode-morph in StepLoop work towards splitting into iterators
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 07:21:54 +0000 (08:21 +0100)]
code-morph in StepLoop work towards splitting into iterators

21 months agoadd svstate param to constructor of StepLoop, ISACaller
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 07:12:41 +0000 (08:12 +0100)]
add svstate param to constructor of StepLoop, ISACaller

21 months agomove two big step/loop functions into separate class out of ISACaller
Luke Kenneth Casson Leighton [Mon, 19 Sep 2022 07:02:48 +0000 (08:02 +0100)]
move two big step/loop functions into separate class out of ISACaller

21 months agopower_insn: perform cleanup; turn comments into docstrings
Dmitry Selyutin [Sun, 18 Sep 2022 21:57:09 +0000 (00:57 +0300)]
power_insn: perform cleanup; turn comments into docstrings

21 months agocode-comments identifying tables
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 21:19:43 +0000 (22:19 +0100)]
code-comments identifying tables

21 months agosimplify predicate mask reporting. assign dw=sw=mask then test 2P
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 21:17:22 +0000 (22:17 +0100)]
simplify predicate mask reporting. assign dw=sw=mask then test 2P
and assign sw new value

21 months agouse widths.get(dw/sw) and test empty/non-empty after.
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 21:08:04 +0000 (22:08 +0100)]
use widths.get(dw/sw) and test empty/non-empty after.

21 months agofix predicate mask case when smask was zero but mmode was not
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 20:59:57 +0000 (21:59 +0100)]
fix predicate mask case when smask was zero but mmode was not
quick/easy way: use predicates.get((mmode,smask)) and if empty skip
added stack of tests, 1P and 2P, to test_pysvp64dis.py

21 months agono, better than hack-job, stop CROpSimpleRM deriving from MRBaseRM
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 20:34:39 +0000 (21:34 +0100)]
no, better than hack-job, stop CROpSimpleRM deriving from MRBaseRM
that way it can handle "/rg" on its own

21 months agobit of a hack-job, a base class MRBaseRM - MapReduce RM - was confused
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 20:32:14 +0000 (21:32 +0100)]
bit of a hack-job, a base class MRBaseRM - MapReduce RM - was confused
there is no need to report "/mr" on a "Simple" mode, which was deriving
from MRBaseRM

21 months agocorrect COopFF3RM and CRopSimpleRM: extra sz field and sz/dz/zz bit 6
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 20:20:00 +0000 (21:20 +0100)]
correct COopFF3RM and CRopSimpleRM: extra sz field and sz/dz/zz bit 6

21 months agopower_insn: introduce common mr/mrr RM class
Dmitry Selyutin [Sun, 18 Sep 2022 19:34:25 +0000 (22:34 +0300)]
power_insn: introduce common mr/mrr RM class

21 months agopower_insn: support ff/pr predicates
Dmitry Selyutin [Sun, 18 Sep 2022 18:55:49 +0000 (21:55 +0300)]
power_insn: support ff/pr predicates

21 months agopysvp64asm: restore original BO
Dmitry Selyutin [Sun, 18 Sep 2022 19:17:33 +0000 (22:17 +0300)]
pysvp64asm: restore original BO

21 months agopower_insn: fix CR ops classes naming
Dmitry Selyutin [Sun, 18 Sep 2022 18:56:22 +0000 (21:56 +0300)]
power_insn: fix CR ops classes naming

21 months agopower_insn: fix coding style
Dmitry Selyutin [Sun, 18 Sep 2022 18:37:44 +0000 (21:37 +0300)]
power_insn: fix coding style

21 months agopower_insn: introduce common dz/sz RM classes
Dmitry Selyutin [Sun, 18 Sep 2022 18:36:19 +0000 (21:36 +0300)]
power_insn: introduce common dz/sz RM classes

21 months agopower_insn: introduce common zz RM class
Dmitry Selyutin [Sun, 18 Sep 2022 18:21:24 +0000 (21:21 +0300)]
power_insn: introduce common zz RM class

21 months agopower_insn: introduce common Sat RM class
Dmitry Selyutin [Sun, 18 Sep 2022 18:18:20 +0000 (21:18 +0300)]
power_insn: introduce common Sat RM class

21 months agopower_insn: introduce common FFPRRc0 RM class
Dmitry Selyutin [Sun, 18 Sep 2022 18:16:43 +0000 (21:16 +0300)]
power_insn: introduce common FFPRRc0 RM class

21 months agopower_insn: simplify RM classes naming
Dmitry Selyutin [Sun, 18 Sep 2022 18:05:37 +0000 (21:05 +0300)]
power_insn: simplify RM classes naming

21 months agoadd first attempt at swapping inner/outer vl/subvl loops pack/unpack
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 19:20:06 +0000 (20:20 +0100)]
add first attempt at swapping inner/outer vl/subvl loops pack/unpack
no swap still fine, swap is borked

21 months agoadd new svstep mode setting up pack/unpack
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 19:18:49 +0000 (20:18 +0100)]
add new svstep mode setting up pack/unpack
in simplev.mdwn pseudocode

21 months agosigh, check length of string returned, if non-zero add space
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 17:33:01 +0000 (18:33 +0100)]
sigh, check length of string returned, if non-zero add space

21 months agosort out CR RM Mode (sz/dz bits moved, consistent)
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 17:31:35 +0000 (18:31 +0100)]
sort out CR RM Mode (sz/dz bits moved, consistent)

21 months agoadd comments (links to URLs) into power_insns.py for RM modes
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 17:28:50 +0000 (18:28 +0100)]
add comments (links to URLs) into power_insns.py for RM modes

21 months agoremove f"" use simpler code, easier to read
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 17:25:21 +0000 (18:25 +0100)]
remove f"" use simpler code, easier to read

21 months agoreverse decode_bo inv/eq/lt/le/etc. thing
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 16:33:32 +0000 (17:33 +0100)]
reverse decode_bo inv/eq/lt/le/etc. thing
rather than piss about modifying the table itself, do an MSB0-LSB0 swap

21 months agodumb. accidentally removed test-call
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 16:17:04 +0000 (17:17 +0100)]
dumb. accidentally removed test-call

21 months agoadd unit tests for Rc=1 ffirst/predicate-result
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 16:14:04 +0000 (17:14 +0100)]
add unit tests for Rc=1 ffirst/predicate-result
to test_pysvp64dis.py

21 months agotest_pysvp64dis: test RC1/~RC1 in ff/pr
Dmitry Selyutin [Sun, 18 Sep 2022 16:05:42 +0000 (19:05 +0300)]
test_pysvp64dis: test RC1/~RC1 in ff/pr

21 months agopower_insn: fix Rc operand accessor
Dmitry Selyutin [Sun, 18 Sep 2022 16:05:11 +0000 (19:05 +0300)]
power_insn: fix Rc operand accessor

21 months agopower_insn: support RC1/~RC1 in ff/pr
Dmitry Selyutin [Sun, 18 Sep 2022 15:32:33 +0000 (18:32 +0300)]
power_insn: support RC1/~RC1 in ff/pr

21 months agocomment principle behind new tables in power_insn.py
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 15:23:20 +0000 (16:23 +0100)]
comment principle behind new tables in power_insn.py
https://libre-soc.org/irclog/%23libre-soc.2022-09-18.log.html#t2022-09-18T16:22:37

21 months agoredo branch mode as a table, in power_insn.py
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 15:17:59 +0000 (16:17 +0100)]
redo branch mode as a table, in power_insn.py

21 months agopower_insn: adjust table comments
Dmitry Selyutin [Sun, 18 Sep 2022 15:17:05 +0000 (18:17 +0300)]
power_insn: adjust table comments

21 months agopower_insn: another minor ld/st imm table cleanup
Dmitry Selyutin [Sun, 18 Sep 2022 15:13:40 +0000 (18:13 +0300)]
power_insn: another minor ld/st imm table cleanup

21 months agopysvp64asm: make zz also set src_zero
Dmitry Selyutin [Sun, 18 Sep 2022 15:12:24 +0000 (18:12 +0300)]
pysvp64asm: make zz also set src_zero

21 months agopower_insn: minor CR cleanup
Dmitry Selyutin [Sun, 18 Sep 2022 15:08:18 +0000 (18:08 +0300)]
power_insn: minor CR cleanup

21 months agopower_insn: minor cleanup
Dmitry Selyutin [Sun, 18 Sep 2022 15:06:00 +0000 (18:06 +0300)]
power_insn: minor cleanup

21 months agocode-morph CR ops to table in power_insn.py
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 15:06:37 +0000 (16:06 +0100)]
code-morph CR ops to table in power_insn.py
put 3/5-bit detection into one of the options to search in mask/val form

21 months agocode-morph in power_insn.py - move table-search to separate area
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 14:52:41 +0000 (15:52 +0100)]
code-morph in power_insn.py - move table-search to separate area

21 months agoLDST_IDX Mode converted to table
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 14:50:25 +0000 (15:50 +0100)]
LDST_IDX Mode converted to table
(and fixed bug double-LDST_IMM test) in power_insn.py

21 months agopower_insn: support m/sm/dm specifiers
Dmitry Selyutin [Sun, 18 Sep 2022 14:08:52 +0000 (17:08 +0300)]
power_insn: support m/sm/dm specifiers

21 months agopower_insn: pass record to specifiers
Dmitry Selyutin [Sun, 18 Sep 2022 13:54:01 +0000 (16:54 +0300)]
power_insn: pass record to specifiers

21 months agoreplace LDST_IMM mode with mask/value match table in power_insn.py
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 14:13:33 +0000 (15:13 +0100)]
replace LDST_IMM mode with mask/value match table in power_insn.py

21 months agoremove (invalid) NormalSaturationExtRM mode from power_insn.py
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 14:07:49 +0000 (15:07 +0100)]
remove (invalid) NormalSaturationExtRM mode from power_insn.py
(was in SUBVL>1 which is now gone)

21 months agoreduce NORMAL svp64 mode down to a mask-value search
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 14:04:22 +0000 (15:04 +0100)]
reduce NORMAL svp64 mode down to a mask-value search

21 months agoremove subvector mode from power_insn.py
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 13:45:32 +0000 (14:45 +0100)]
remove subvector mode from power_insn.py

21 months agoadapt test_12_mr to /mrr and /mr modes, svm is gone, /mr is missing
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 13:34:15 +0000 (14:34 +0100)]
adapt test_12_mr to /mrr and /mr modes, svm is gone, /mr is missing

21 months agotest_pysvp64dis: test mrr/svm specifiers
Dmitry Selyutin [Sun, 18 Sep 2022 09:07:57 +0000 (12:07 +0300)]
test_pysvp64dis: test mrr/svm specifiers

21 months agopower_fields: fix __lt__ operator
Dmitry Selyutin [Sun, 18 Sep 2022 10:40:56 +0000 (13:40 +0300)]
power_fields: fix __lt__ operator

21 months agopower_insn: support mrr specifier
Dmitry Selyutin [Sun, 18 Sep 2022 09:29:58 +0000 (12:29 +0300)]
power_insn: support mrr specifier

21 months agopower_insn: support svm specifier
Dmitry Selyutin [Sun, 18 Sep 2022 09:07:17 +0000 (12:07 +0300)]
power_insn: support svm specifier

21 months agopower_insn: sync RM modes
Dmitry Selyutin [Sun, 18 Sep 2022 10:26:19 +0000 (13:26 +0300)]
power_insn: sync RM modes

21 months agoremove subvector mode from sv/trans/svp64.py
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 13:29:50 +0000 (14:29 +0100)]
remove subvector mode from sv/trans/svp64.py

21 months agopower_insn: support w/dw/sw specifiers
Dmitry Selyutin [Sun, 18 Sep 2022 09:01:04 +0000 (12:01 +0300)]
power_insn: support w/dw/sw specifiers

21 months agopower_insn: decouple branch modes
Dmitry Selyutin [Sun, 18 Sep 2022 08:52:13 +0000 (11:52 +0300)]
power_insn: decouple branch modes

21 months agopower_insn: decouple cr_op modes
Dmitry Selyutin [Sun, 18 Sep 2022 08:46:49 +0000 (11:46 +0300)]
power_insn: decouple cr_op modes

21 months agochange sv/trans/svp64.py source/dest elwidth assembler naming
Luke Kenneth Casson Leighton [Sun, 18 Sep 2022 08:50:08 +0000 (09:50 +0100)]
change sv/trans/svp64.py source/dest elwidth assembler naming
https://libre-soc.org/irclog/%23libre-soc.2022-09-18.log.html#t2022-09-18T09:40:40

21 months agotest_pysvp64dis: test sw specifier
Dmitry Selyutin [Sun, 18 Sep 2022 08:31:02 +0000 (11:31 +0300)]
test_pysvp64dis: test sw specifier

21 months agopower_insn: support sw specifier
Dmitry Selyutin [Sun, 18 Sep 2022 08:29:36 +0000 (11:29 +0300)]
power_insn: support sw specifier

21 months agopower_insn: decouple common normal and ld/st RM
Dmitry Selyutin [Sun, 18 Sep 2022 08:26:34 +0000 (11:26 +0300)]
power_insn: decouple common normal and ld/st RM

21 months agopower_insn: support ew specifier
Dmitry Selyutin [Sun, 18 Sep 2022 08:09:07 +0000 (11:09 +0300)]
power_insn: support ew specifier

21 months agopower_insn: simplify subvl disassembly
Dmitry Selyutin [Sun, 18 Sep 2022 08:06:04 +0000 (11:06 +0300)]
power_insn: simplify subvl disassembly

21 months agoadd sat/satu test_12_sat to test_pysvp64dis.py
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 20:52:50 +0000 (21:52 +0100)]
add sat/satu test_12_sat to test_pysvp64dis.py

21 months agopower_insn: fix sat checks
Dmitry Selyutin [Sat, 17 Sep 2022 20:48:34 +0000 (23:48 +0300)]
power_insn: fix sat checks

21 months agopysvp64asm: SVP64 instruction debug logs
Dmitry Selyutin [Sat, 17 Sep 2022 20:42:48 +0000 (23:42 +0300)]
pysvp64asm: SVP64 instruction debug logs

21 months agowhoops. mode-bits need to be put in MSB0 order. sigh
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 20:47:02 +0000 (21:47 +0100)]
whoops. mode-bits need to be put in MSB0 order. sigh

21 months agopower_fields: fix mapping class accessor
Dmitry Selyutin [Sat, 17 Sep 2022 20:26:42 +0000 (23:26 +0300)]
power_fields: fix mapping class accessor

21 months agopower_fields: support boolean checks
Dmitry Selyutin [Sat, 17 Sep 2022 19:54:02 +0000 (22:54 +0300)]
power_fields: support boolean checks

21 months agopower_insn: fix zz specifiers
Dmitry Selyutin [Sat, 17 Sep 2022 19:46:37 +0000 (22:46 +0300)]
power_insn: fix zz specifiers

21 months agopower_insn: drop field length method again
Dmitry Selyutin [Sat, 17 Sep 2022 19:31:42 +0000 (22:31 +0300)]
power_insn: drop field length method again

21 months agopower_insn: decouple base ld/st idx RM
Dmitry Selyutin [Sat, 17 Sep 2022 18:57:27 +0000 (21:57 +0300)]
power_insn: decouple base ld/st idx RM

21 months agopower_insn: decouple base ld/st imm RM
Dmitry Selyutin [Sat, 17 Sep 2022 18:53:08 +0000 (21:53 +0300)]
power_insn: decouple base ld/st imm RM

21 months agopower_insn: decouple base normal RM
Dmitry Selyutin [Sat, 17 Sep 2022 18:43:01 +0000 (21:43 +0300)]
power_insn: decouple base normal RM

21 months agopower_insn: support saturation mode
Dmitry Selyutin [Sat, 17 Sep 2022 16:17:33 +0000 (19:17 +0300)]
power_insn: support saturation mode

21 months agopower_insn: support dz/sz specifiers
Dmitry Selyutin [Sat, 17 Sep 2022 16:07:53 +0000 (19:07 +0300)]
power_insn: support dz/sz specifiers

21 months agoadd zz mode to sv/trans/svp64.py as a hack
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 19:48:57 +0000 (20:48 +0100)]
add zz mode to sv/trans/svp64.py as a hack

21 months agoremove sv.setvl/pk/up/pu - these are all gone in favour of using
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 18:53:34 +0000 (19:53 +0100)]
remove sv.setvl/pk/up/pu - these are all gone in favour of using
a hack-job on svstep 0b11nn

21 months agoadd MASK_SRC to power_insn.py (SVmask_src from enums)
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 18:46:18 +0000 (19:46 +0100)]
add MASK_SRC to power_insn.py (SVmask_src from enums)

21 months agoadd SVmask_src enum, rename fields to EN and NO to make it easier
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 18:37:52 +0000 (19:37 +0100)]
add SVmask_src enum, rename fields to EN and NO to make it easier
to detect/read

21 months agoas a double-check sv_analysis new CSV column "SM" was all set to zero
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 18:31:30 +0000 (19:31 +0100)]
as a double-check sv_analysis new CSV column "SM" was all set to zero
by now changing it to 1, this diff/commit shows exactly which
files are now classified as MASK_SRC=enabled

21 months agoadd a "SM" column into RM*.csv (and LDSTRM*.csv) identifying if MASK_SRC
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 18:23:25 +0000 (19:23 +0100)]
add a "SM" column into RM*.csv (and LDSTRM*.csv) identifying if MASK_SRC
is active.  this makes disassembly much easier, no need to check RM type
or count the number of registers

21 months agoadd sv.add/ew=XX test to test_pysvp64dis.py
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 17:50:41 +0000 (18:50 +0100)]
add sv.add/ew=XX test to test_pysvp64dis.py