openpower-isa.git
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

21 months agoremove pack/unpack modes from power_insn.py, they no longer exist
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 17:11:33 +0000 (18:11 +0100)]
remove pack/unpack modes from power_insn.py, they no longer exist

21 months agoselectable_int: drop redundant operators
Dmitry Selyutin [Sat, 17 Sep 2022 15:42:17 +0000 (18:42 +0300)]
selectable_int: drop redundant operators

21 months agopower_insn: support vec2/vec3/vec4
Dmitry Selyutin [Sat, 17 Sep 2022 13:54:01 +0000 (16:54 +0300)]
power_insn: support vec2/vec3/vec4

21 months agopower_insn: support specifiers
Dmitry Selyutin [Sat, 17 Sep 2022 13:52:34 +0000 (16:52 +0300)]
power_insn: support specifiers

21 months agopower_fields: fix comparison operators
Dmitry Selyutin [Sat, 17 Sep 2022 13:51:50 +0000 (16:51 +0300)]
power_fields: fix comparison operators

21 months agopower_insn: refactor and fix RM mappings
Dmitry Selyutin [Sat, 17 Sep 2022 13:03:30 +0000 (16:03 +0300)]
power_insn: refactor and fix RM mappings

21 months agopower_fields: fix field slicing
Dmitry Selyutin [Sat, 17 Sep 2022 12:57:40 +0000 (15:57 +0300)]
power_fields: fix field slicing

21 months agopower_insn: fix mapping bits accessors
Dmitry Selyutin [Sat, 17 Sep 2022 12:44:28 +0000 (15:44 +0300)]
power_insn: fix mapping bits accessors

21 months agopower_fields: support traversing over instances
Dmitry Selyutin [Sat, 17 Sep 2022 12:41:59 +0000 (15:41 +0300)]
power_fields: support traversing over instances

21 months agopower_insn: drop redundant table
Dmitry Selyutin [Sat, 17 Sep 2022 09:13:35 +0000 (12:13 +0300)]
power_insn: drop redundant table

21 months agopower_fields: inherit docstrings upon remap
Dmitry Selyutin [Sat, 17 Sep 2022 09:13:11 +0000 (12:13 +0300)]
power_fields: inherit docstrings upon remap

21 months agoadd vec2/3/4 test_pysvp64dis test
Luke Kenneth Casson Leighton [Sat, 17 Sep 2022 15:53:28 +0000 (16:53 +0100)]
add vec2/3/4 test_pysvp64dis test

21 months agocomments on test_9_fptrans
Luke Kenneth Casson Leighton [Fri, 16 Sep 2022 21:44:45 +0000 (22:44 +0100)]
comments on test_9_fptrans

21 months agotest_power_decoder: mark minor_19.csv as opint
Dmitry Selyutin [Fri, 16 Sep 2022 19:50:40 +0000 (22:50 +0300)]
test_power_decoder: mark minor_19.csv as opint

21 months agotest_pysvp64dis: test fptrans
Dmitry Selyutin [Fri, 16 Sep 2022 16:54:04 +0000 (19:54 +0300)]
test_pysvp64dis: test fptrans

21 months agoselectable_int: replace bit_count with bit_length
Dmitry Selyutin [Fri, 16 Sep 2022 16:54:04 +0000 (19:54 +0300)]
selectable_int: replace bit_count with bit_length

21 months agosv_binutils_fptrans: adopt script for reuse
Dmitry Selyutin [Fri, 16 Sep 2022 16:54:04 +0000 (19:54 +0300)]
sv_binutils_fptrans: adopt script for reuse

21 months agopower_insn: postpone updating per-instruction operands
Dmitry Selyutin [Fri, 16 Sep 2022 14:39:51 +0000 (17:39 +0300)]
power_insn: postpone updating per-instruction operands

21 months agopower_insn: perform faster PPC database lookups
Dmitry Selyutin [Thu, 15 Sep 2022 20:56:49 +0000 (23:56 +0300)]
power_insn: perform faster PPC database lookups

21 months agosv_binutils_fptrans: fix disassembly
Dmitry Selyutin [Wed, 14 Sep 2022 23:04:35 +0000 (02:04 +0300)]
sv_binutils_fptrans: fix disassembly

21 months agosv_binutils_fptrans: fptrans binutils generator
Dmitry Selyutin [Wed, 14 Sep 2022 23:04:35 +0000 (02:04 +0300)]
sv_binutils_fptrans: fptrans binutils generator

21 months agopower_insn: support instruction bytes conversion
Dmitry Selyutin [Wed, 14 Sep 2022 23:04:12 +0000 (02:04 +0300)]
power_insn: support instruction bytes conversion

21 months agoselectable_int: allow setting multiple bit
Dmitry Selyutin [Wed, 14 Sep 2022 22:50:10 +0000 (01:50 +0300)]
selectable_int: allow setting multiple bit

21 months agopower_insn: allow accessing instruction bits
Dmitry Selyutin [Wed, 14 Sep 2022 22:49:15 +0000 (01:49 +0300)]
power_insn: allow accessing instruction bits

21 months agoadd minor_4.csv for maddld/maddhdu/maddhd and to insn_db.csv
Luke Kenneth Casson Leighton [Thu, 15 Sep 2022 20:48:28 +0000 (21:48 +0100)]
add minor_4.csv for maddld/maddhdu/maddhd and to insn_db.csv
also add test_pysvp64dis.py to check it asm/disasms

21 months agofix sprset mtspr/mfspr pseudocode with wrong definition of
Luke Kenneth Casson Leighton [Thu, 15 Sep 2022 00:46:14 +0000 (01:46 +0100)]
fix sprset mtspr/mfspr pseudocode with wrong definition of
spr, not existent in the Power v3.0 spec.

https://bugs.libre-soc.org/show_bug.cgi?id=917#c54
works fine, required removal of hack in ISACaller to uppercase spr
to SPR

21 months agoadd svp64 fptrans tests
Jacob Lifshay [Wed, 14 Sep 2022 15:35:03 +0000 (08:35 -0700)]
add svp64 fptrans tests

21 months agoinclude *all* fprs/gprs/cr-fields in SimState
Jacob Lifshay [Wed, 14 Sep 2022 15:33:55 +0000 (08:33 -0700)]
include *all* fprs/gprs/cr-fields in SimState

21 months agofix sv_analysis for fpown and frootn
Jacob Lifshay [Wed, 14 Sep 2022 15:33:10 +0000 (08:33 -0700)]
fix sv_analysis for fpown and frootn

21 months agofix some typos
Jacob Lifshay [Wed, 14 Sep 2022 15:31:34 +0000 (08:31 -0700)]
fix some typos

21 months agopower_insn: support signed operands
Dmitry Selyutin [Tue, 13 Sep 2022 19:12:37 +0000 (22:12 +0300)]
power_insn: support signed operands

21 months agopower_insn: support branch RM
Dmitry Selyutin [Tue, 13 Sep 2022 12:18:41 +0000 (15:18 +0300)]
power_insn: support branch RM

21 months agopower_insn: support CR RM
Dmitry Selyutin [Tue, 13 Sep 2022 11:48:40 +0000 (14:48 +0300)]
power_insn: support CR RM

21 months agopower_enums: convert SVExtra to RegType
Dmitry Selyutin [Tue, 13 Sep 2022 13:09:52 +0000 (16:09 +0300)]
power_enums: convert SVExtra to RegType

21 months agopower_insn: refactor RM mapping
Dmitry Selyutin [Mon, 12 Sep 2022 19:28:52 +0000 (22:28 +0300)]
power_insn: refactor RM mapping

21 months agosv_binutils: support multiple opcodes; minor fixes
Dmitry Selyutin [Mon, 12 Sep 2022 19:28:24 +0000 (22:28 +0300)]
sv_binutils: support multiple opcodes; minor fixes

21 months agocorrect assrmbler in test_pysvpy4dis.py
Luke Kenneth Casson Leighton [Tue, 13 Sep 2022 19:31:45 +0000 (20:31 +0100)]
correct assrmbler in test_pysvpy4dis.py

21 months agofix X-FORM lines for fptrans -- I forgot Rc
Jacob Lifshay [Tue, 13 Sep 2022 18:01:29 +0000 (11:01 -0700)]
fix X-FORM lines for fptrans -- I forgot Rc

21 months agoadd missing X-FORM lines for fptrans
Jacob Lifshay [Tue, 13 Sep 2022 17:59:22 +0000 (10:59 -0700)]
add missing X-FORM lines for fptrans

21 months agoadd comment that fptrans test cases output values are probably not all correct
Jacob Lifshay [Tue, 13 Sep 2022 17:30:55 +0000 (10:30 -0700)]
add comment that fptrans test cases output values are probably not all correct

[skip ci]

21 months agoadd new fptrans unit tests
Jacob Lifshay [Tue, 13 Sep 2022 17:19:57 +0000 (10:19 -0700)]
add new fptrans unit tests

21 months agoadd fptrans support to isa caller
Jacob Lifshay [Tue, 13 Sep 2022 17:19:06 +0000 (10:19 -0700)]
add fptrans support to isa caller

21 months agoadd fp support to TestRunnerBase
Jacob Lifshay [Tue, 13 Sep 2022 17:18:40 +0000 (10:18 -0700)]
add fp support to TestRunnerBase

21 months agoadd first pack/unpack to ISACaller
Luke Kenneth Casson Leighton [Tue, 13 Sep 2022 15:23:54 +0000 (16:23 +0100)]
add first pack/unpack to ISACaller

21 months agoadd setter/getter properties to SVP64State, minor code-morph in ISACaller
Luke Kenneth Casson Leighton [Tue, 13 Sep 2022 13:42:53 +0000 (14:42 +0100)]
add setter/getter properties to SVP64State, minor code-morph in ISACaller

21 months agoremove pack/unpack from SVP64RMModeDecode, it is now in SVSTATE
Luke Kenneth Casson Leighton [Tue, 13 Sep 2022 13:38:15 +0000 (14:38 +0100)]
remove pack/unpack from SVP64RMModeDecode, it is now in SVSTATE

21 months agoadd batch of instructions from
Luke Kenneth Casson Leighton [Tue, 13 Sep 2022 12:15:31 +0000 (13:15 +0100)]
add batch of instructions from
https://bugs.libre-soc.org/show_bug.cgi?id=917#c25

21 months agoadd hack overloaded meaning of destwid to be pack/unpack.
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 21:36:29 +0000 (22:36 +0100)]
add hack overloaded meaning of destwid to be pack/unpack.
only supposed to be used on sv.setvl

21 months agopower_insn: refactor RM mapping
Dmitry Selyutin [Mon, 12 Sep 2022 19:28:52 +0000 (22:28 +0300)]
power_insn: refactor RM mapping

21 months agosv_binutils: support multiple opcodes; minor fixes
Dmitry Selyutin [Mon, 12 Sep 2022 19:28:24 +0000 (22:28 +0300)]
sv_binutils: support multiple opcodes; minor fixes

21 months agopower_insn: call sv_spec_leave unconditionally
Dmitry Selyutin [Mon, 12 Sep 2022 18:04:43 +0000 (21:04 +0300)]
power_insn: call sv_spec_leave unconditionally

21 months agopower_enums: consider CRIn2Sel
Dmitry Selyutin [Mon, 12 Sep 2022 17:35:29 +0000 (20:35 +0300)]
power_enums: consider CRIn2Sel

21 months agopower_insn: fix RCOE check
Dmitry Selyutin [Mon, 12 Sep 2022 17:32:49 +0000 (20:32 +0300)]
power_insn: fix RCOE check

21 months agopower_insn: introduce pseudo cr_in2
Dmitry Selyutin [Sun, 11 Sep 2022 20:40:40 +0000 (23:40 +0300)]
power_insn: introduce pseudo cr_in2

21 months agopower_enums: strict selectors conversion
Dmitry Selyutin [Sun, 11 Sep 2022 19:55:25 +0000 (22:55 +0300)]
power_enums: strict selectors conversion

21 months agopower_insn: fix typo
Dmitry Selyutin [Sun, 11 Sep 2022 18:45:28 +0000 (21:45 +0300)]
power_insn: fix typo

21 months agopower_insn: support BRANCH and CR mode stubs
Dmitry Selyutin [Sun, 11 Sep 2022 18:15:52 +0000 (21:15 +0300)]
power_insn: support BRANCH and CR mode stubs

21 months agopower_insn: refactor register operands
Dmitry Selyutin [Sun, 11 Sep 2022 12:42:20 +0000 (15:42 +0300)]
power_insn: refactor register operands

21 months agoadd pseudocode for all fptrans ops
Jacob Lifshay [Mon, 12 Sep 2022 17:23:20 +0000 (10:23 -0700)]
add pseudocode for all fptrans ops

21 months agoadd fptrans helpers, switching existing uses to new helpers
Jacob Lifshay [Mon, 12 Sep 2022 17:04:03 +0000 (10:04 -0700)]
add fptrans helpers, switching existing uses to new helpers

21 months agoadd hphint and pack/unpack into SVSTATE SPR layout
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 16:33:49 +0000 (17:33 +0100)]
add hphint and pack/unpack into SVSTATE SPR layout

21 months agoadd fptrans ops to src/openpower/sv/trans/svp64.py
Jacob Lifshay [Mon, 12 Sep 2022 16:04:44 +0000 (09:04 -0700)]
add fptrans ops to src/openpower/sv/trans/svp64.py

21 months agoadd rest of new fptrans ops to CSVs
Jacob Lifshay [Mon, 12 Sep 2022 15:43:40 +0000 (08:43 -0700)]
add rest of new fptrans ops to CSVs

21 months agoremove pack/unpack - now part of sv.setvl
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 15:34:27 +0000 (16:34 +0100)]
remove pack/unpack - now part of sv.setvl

21 months agoadd rudimentary sv.setvl unit test to just check that the syntax
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 15:26:28 +0000 (16:26 +0100)]
add rudimentary sv.setvl unit test to just check that the syntax
is correct.  going beyond RT=0..31 currently fails

21 months agoadd sv.setvl to instructions as a major hack
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 15:25:55 +0000 (16:25 +0100)]
add sv.setvl to instructions as a major hack
so that pack/unpack can be implemented
https://bugs.libre-soc.org/show_bug.cgi?id=871

21 months agosplit out setvl from sv.setvl test in test_pysvp64dis.py
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 14:43:22 +0000 (15:43 +0100)]
split out setvl from sv.setvl test in test_pysvp64dis.py
setvl. still failing (no idea why)

21 months agoadd extra tests "add." "addo" etc. to test_pysvp64dis.py
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 14:31:30 +0000 (15:31 +0100)]
add extra tests "add." "addo" etc. to test_pysvp64dis.py

21 months agodemo that "setvl." is not reconstructed with Rc=1 mode
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 14:29:42 +0000 (15:29 +0100)]
demo that "setvl." is not reconstructed with Rc=1 mode

21 months agosome weird moving of opcodes around, probably because their
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 14:25:21 +0000 (15:25 +0100)]
some weird moving of opcodes around, probably because their
XO changed. looks like the actual RM*.csv definitions themselves
remained the same. TODO: sort opcodes (alphabetically will do it)

21 months agoskip addpcis for now, needs properly qualifying
Luke Kenneth Casson Leighton [Mon, 12 Sep 2022 09:55:11 +0000 (10:55 +0100)]
skip addpcis for now, needs properly qualifying

21 months agofix svanalysis failing due to missing comma in addpcis csv entry
Jacob Lifshay [Mon, 12 Sep 2022 08:15:34 +0000 (01:15 -0700)]
fix svanalysis failing due to missing comma in addpcis csv entry

21 months agoadd new CRIn2Sel for later, for getting rid of CRInSel.BA_BB
Luke Kenneth Casson Leighton [Sun, 11 Sep 2022 20:53:00 +0000 (21:53 +0100)]
add new CRIn2Sel for later, for getting rid of CRInSel.BA_BB

21 months agoBFT does not exist
Luke Kenneth Casson Leighton [Sun, 11 Sep 2022 16:55:41 +0000 (17:55 +0100)]
BFT does not exist

21 months agoadd sv.isel 12,2,3,*99 test to test_pysvp64dis.py
Luke Kenneth Casson Leighton [Sun, 11 Sep 2022 14:03:53 +0000 (15:03 +0100)]
add sv.isel 12,2,3,*99 test to test_pysvp64dis.py

21 months agoadd some CR3 pysvp64dis.py tests, sv.crand
Luke Kenneth Casson Leighton [Sun, 11 Sep 2022 13:37:35 +0000 (14:37 +0100)]
add some CR3 pysvp64dis.py tests, sv.crand

21 months agopower_insn: check exact matches directly in set
Dmitry Selyutin [Sat, 10 Sep 2022 19:38:30 +0000 (22:38 +0300)]
power_insn: check exact matches directly in set

21 months agopower_insn: group opcodes and names
Dmitry Selyutin [Sat, 10 Sep 2022 19:37:51 +0000 (22:37 +0300)]
power_insn: group opcodes and names

21 months agoadd sv.isel asm-disasm tests to test_pysvp64dis.py
Luke Kenneth Casson Leighton [Sun, 11 Sep 2022 11:03:14 +0000 (12:03 +0100)]
add sv.isel asm-disasm tests to test_pysvp64dis.py

21 months agoadd missing addpcis to power_enums.py and minor_19.csv
Luke Kenneth Casson Leighton [Sun, 11 Sep 2022 11:00:56 +0000 (12:00 +0100)]
add missing addpcis to power_enums.py and minor_19.csv

21 months agoconvert minor_19 to bitpattern (for adding addpcis)
Luke Kenneth Casson Leighton [Sun, 11 Sep 2022 10:57:20 +0000 (11:57 +0100)]
convert minor_19 to bitpattern (for adding addpcis)