openpower-isa.git
20 months agosilence default LogKind for CI, to avoid pytest running out of memory due to storing...
Jacob Lifshay [Wed, 31 Aug 2022 04:24:09 +0000 (21:24 -0700)]
silence default LogKind for CI, to avoid pytest running out of memory due to storing stdout

20 months agotarget_addr in b and bc pseudo-code has no corresponding
Luke Kenneth Casson Leighton [Wed, 31 Aug 2022 13:33:56 +0000 (14:33 +0100)]
target_addr in b and bc pseudo-code has no corresponding
field in Section 1.6.  actually, target_addr=LI for b and target_addr=BI
for bc
therefore make the pseudo-code actually do exactly that

20 months agobcd.mdwn: fix cbcdtd operands
Dmitry Selyutin [Tue, 30 Aug 2022 18:41:05 +0000 (21:41 +0300)]
bcd.mdwn: fix cbcdtd operands

20 months agobcd.mdwn: fix cdtbcd operands
Dmitry Selyutin [Tue, 30 Aug 2022 18:36:36 +0000 (21:36 +0300)]
bcd.mdwn: fix cdtbcd operands

20 months agofixedlogical.mdwn: fix bpermd operands
Dmitry Selyutin [Tue, 30 Aug 2022 18:29:51 +0000 (21:29 +0300)]
fixedlogical.mdwn: fix bpermd operands

20 months agopagereader: validate input
Dmitry Selyutin [Tue, 30 Aug 2022 12:27:35 +0000 (15:27 +0300)]
pagereader: validate input

20 months agoremove space from arguments in popcnt, should not have been there
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 16:14:25 +0000 (17:14 +0100)]
remove space from arguments in popcnt, should not have been there

20 months agoRevert "format code"
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 13:21:14 +0000 (14:21 +0100)]
Revert "format code"

This reverts commit 61faa7c3c443a260eaeb58b111ebd464a2031e06.

20 months agoRevert "fix comment location"
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 13:21:06 +0000 (14:21 +0100)]
Revert "fix comment location"

This reverts commit 2ba62128ffb197e41a9a7b518a915ebe839d8a71.

20 months agoRevert "use a decorator for constructing CUSTOM_INSNS"
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 13:20:49 +0000 (14:20 +0100)]
Revert "use a decorator for constructing CUSTOM_INSNS"

This reverts commit 63fd4ebc03ea0a7d51a1cf8d215affe45e0f0b33.

20 months agoRevert "make sv.instr use CUSTOM_INSNS by default for assembling instr"
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 13:20:38 +0000 (14:20 +0100)]
Revert "make sv.instr use CUSTOM_INSNS by default for assembling instr"

This reverts commit 9be3b61b6a3037fdcf087f692e9145678e571a35.

20 months agoRevert "switch ci tests to verbose"
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 13:20:29 +0000 (14:20 +0100)]
Revert "switch ci tests to verbose"

This reverts commit 4053433d420915d9cb777f62fdc10d0b29178dda.

20 months agoRevert "remove dead code, sv.svstep and sv.fcoss are now handled by CUSTOM_INSNS"
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 13:20:20 +0000 (14:20 +0100)]
Revert "remove dead code, sv.svstep and sv.fcoss are now handled by CUSTOM_INSNS"

This reverts commit cfd0215fc6f716317eb22d04d965028eb794965b.

20 months agoRevert "remove fuck-up by programmerjake not reading the specification for svstep"
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 13:20:08 +0000 (14:20 +0100)]
Revert "remove fuck-up by programmerjake not reading the specification for svstep"

This reverts commit 1a06aea1fe266a75af713ac9815306696a1ffa4e.

20 months agoremove fuck-up by programmerjake not reading the specification for svstep
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 13:10:12 +0000 (14:10 +0100)]
remove fuck-up by programmerjake not reading the specification for svstep
https://libre-soc.org/openpower/sv/svstep/

20 months agocorrect the bitmanip pseudocode to remove spaces from instruction declarations
Luke Kenneth Casson Leighton [Tue, 30 Aug 2022 12:22:50 +0000 (13:22 +0100)]
correct the bitmanip pseudocode to remove spaces from instruction declarations
ternlogi RT,RA,RB,TLI not ternlog RT,   RA,     RB,     TLI

20 months agopagereader.ISA: support iteration
Dmitry Selyutin [Tue, 30 Aug 2022 10:01:26 +0000 (13:01 +0300)]
pagereader.ISA: support iteration

20 months agopysvp64dis: stop interation upon empty suffix
Dmitry Selyutin [Tue, 30 Aug 2022 08:57:39 +0000 (11:57 +0300)]
pysvp64dis: stop interation upon empty suffix

20 months agopower_insn: fix Fields methods
Dmitry Selyutin [Tue, 30 Aug 2022 08:47:44 +0000 (11:47 +0300)]
power_insn: fix Fields methods

20 months agoselectable_int: support slicing by iterable
Dmitry Selyutin [Tue, 30 Aug 2022 08:47:16 +0000 (11:47 +0300)]
selectable_int: support slicing by iterable

20 months agoremove dead code, sv.svstep and sv.fcoss are now handled by CUSTOM_INSNS
Jacob Lifshay [Tue, 30 Aug 2022 07:51:16 +0000 (00:51 -0700)]
remove dead code, sv.svstep and sv.fcoss are now handled by CUSTOM_INSNS

20 months agoswitch ci tests to verbose
Jacob Lifshay [Tue, 30 Aug 2022 07:50:28 +0000 (00:50 -0700)]
switch ci tests to verbose

20 months agomake sv.instr use CUSTOM_INSNS by default for assembling instr
Jacob Lifshay [Tue, 30 Aug 2022 07:32:21 +0000 (00:32 -0700)]
make sv.instr use CUSTOM_INSNS by default for assembling instr

20 months agouse a decorator for constructing CUSTOM_INSNS
Jacob Lifshay [Tue, 30 Aug 2022 06:14:31 +0000 (23:14 -0700)]
use a decorator for constructing CUSTOM_INSNS

20 months agofix comment location
Jacob Lifshay [Tue, 30 Aug 2022 06:12:52 +0000 (23:12 -0700)]
fix comment location

20 months agoformat code
Jacob Lifshay [Tue, 30 Aug 2022 05:53:52 +0000 (22:53 -0700)]
format code

20 months agosvp64dis: simplify database lookups
Dmitry Selyutin [Tue, 30 Aug 2022 07:29:23 +0000 (10:29 +0300)]
svp64dis: simplify database lookups

20 months agopower_insn: fix representation
Dmitry Selyutin [Tue, 30 Aug 2022 07:08:52 +0000 (10:08 +0300)]
power_insn: fix representation

20 months agopower_insn: remove obsolete comment
Dmitry Selyutin [Tue, 30 Aug 2022 07:07:47 +0000 (10:07 +0300)]
power_insn: remove obsolete comment

20 months agopysvp64dis: remove obsolete imports
Dmitry Selyutin [Tue, 30 Aug 2022 07:06:54 +0000 (10:06 +0300)]
pysvp64dis: remove obsolete imports

20 months agopower_insn: rename unit field to function
Dmitry Selyutin [Mon, 29 Aug 2022 18:16:18 +0000 (21:16 +0300)]
power_insn: rename unit field to function

20 months agopower_insn: convert PO field name to lower case
Dmitry Selyutin [Mon, 29 Aug 2022 16:54:00 +0000 (19:54 +0300)]
power_insn: convert PO field name to lower case

20 months agoadd a "ffmadds." test, not yet actually checking Rc=1
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 20:37:34 +0000 (21:37 +0100)]
add a "ffmadds." test, not yet actually checking Rc=1

20 months agoremove insertion of instruction as a comment
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 19:44:52 +0000 (20:44 +0100)]
remove insertion of instruction as a comment

20 months agogaah what a frickin mess
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 19:42:02 +0000 (20:42 +0100)]
gaah what a frickin mess

20 months agofix test_issuer.py nosvp64 mul, "mullw." was getting
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 19:33:14 +0000 (20:33 +0100)]
fix test_issuer.py nosvp64 mul, "mullw." was getting
XER.SO override into handle_comparison when it should not

20 months agosv_binutils: hack
Dmitry Selyutin [Mon, 29 Aug 2022 04:50:27 +0000 (07:50 +0300)]
sv_binutils: hack

20 months agosv_binutils: remove unused imports
Dmitry Selyutin [Mon, 29 Aug 2022 04:46:05 +0000 (07:46 +0300)]
sv_binutils: remove unused imports

20 months agosv_binutils: generate instruction getters/setters
Dmitry Selyutin [Sun, 28 Aug 2022 21:47:22 +0000 (00:47 +0300)]
sv_binutils: generate instruction getters/setters

20 months agosv_binutils: perform massive refactoring
Dmitry Selyutin [Sun, 28 Aug 2022 17:48:23 +0000 (20:48 +0300)]
sv_binutils: perform massive refactoring

20 months agoselectable_int: deprecate obsolete mappings
Dmitry Selyutin [Sun, 28 Aug 2022 08:22:03 +0000 (11:22 +0300)]
selectable_int: deprecate obsolete mappings

20 months agosv_binutils: deprecate obsolete fields
Dmitry Selyutin [Sun, 28 Aug 2022 11:24:16 +0000 (14:24 +0300)]
sv_binutils: deprecate obsolete fields

20 months agocaller.py: switch to new fields
Dmitry Selyutin [Sun, 28 Aug 2022 08:21:12 +0000 (11:21 +0300)]
caller.py: switch to new fields

20 months agopysvp64asm: switch to new fields
Dmitry Selyutin [Fri, 26 Aug 2022 21:30:09 +0000 (00:30 +0300)]
pysvp64asm: switch to new fields

20 months agopower_fields: support traversal
Dmitry Selyutin [Sun, 28 Aug 2022 10:45:05 +0000 (13:45 +0300)]
power_fields: support traversal

20 months agopower_insn: simplify fields
Dmitry Selyutin [Sun, 28 Aug 2022 12:58:35 +0000 (15:58 +0300)]
power_insn: simplify fields

20 months agoselectable_int: support FSI integer conversion
Dmitry Selyutin [Thu, 25 Aug 2022 19:48:17 +0000 (22:48 +0300)]
selectable_int: support FSI integer conversion

20 months agoselectable_int: introduce more checks
Dmitry Selyutin [Thu, 25 Aug 2022 19:30:03 +0000 (22:30 +0300)]
selectable_int: introduce more checks

20 months agoselectable_int: fix FSI negate method
Dmitry Selyutin [Sat, 20 Aug 2022 16:57:30 +0000 (19:57 +0300)]
selectable_int: fix FSI negate method

20 months agopower_insn: switch to new fields
Dmitry Selyutin [Fri, 19 Aug 2022 10:48:20 +0000 (13:48 +0300)]
power_insn: switch to new fields

20 months agopower_fields: introduce new-style fields classes
Dmitry Selyutin [Fri, 19 Aug 2022 04:39:11 +0000 (07:39 +0300)]
power_fields: introduce new-style fields classes

20 months agopower_fields: move BitRange to selectable_int
Dmitry Selyutin [Fri, 19 Aug 2022 08:01:08 +0000 (11:01 +0300)]
power_fields: move BitRange to selectable_int

20 months agoselectable_int: support FSI.__len__ method
Dmitry Selyutin [Fri, 19 Aug 2022 04:53:35 +0000 (07:53 +0300)]
selectable_int: support FSI.__len__ method

20 months agoselectable_int: fix check on SI constructor
Luke Kenneth Casson Leighton [Thu, 18 Aug 2022 20:48:58 +0000 (21:48 +0100)]
selectable_int: fix check on SI constructor

Specifying the number of bits *is* allowed, it should mean "override
the length". More unit tests need running to confirm.

20 months agoselectable_int: refactor fields mappings
Dmitry Selyutin [Thu, 18 Aug 2022 11:44:38 +0000 (14:44 +0300)]
selectable_int: refactor fields mappings

20 months agopower_insn: decouple instruction classes
Dmitry Selyutin [Thu, 18 Aug 2022 09:00:06 +0000 (12:00 +0300)]
power_insn: decouple instruction classes

20 months agoselectable_int: canonicalize indentation
Dmitry Selyutin [Thu, 18 Aug 2022 08:58:38 +0000 (11:58 +0300)]
selectable_int: canonicalize indentation

20 months agopysvp64dis: provide BC mode sketch
Dmitry Selyutin [Wed, 17 Aug 2022 20:55:31 +0000 (23:55 +0300)]
pysvp64dis: provide BC mode sketch

20 months agoselectable_int: allow further fields slicing
Dmitry Selyutin [Wed, 17 Aug 2022 20:43:04 +0000 (23:43 +0300)]
selectable_int: allow further fields slicing

20 months agoselectable_int: support fields boolean check
Dmitry Selyutin [Wed, 17 Aug 2022 20:32:48 +0000 (23:32 +0300)]
selectable_int: support fields boolean check

20 months agoselectable_int: allow multi-level fields
Dmitry Selyutin [Wed, 17 Aug 2022 20:18:12 +0000 (23:18 +0300)]
selectable_int: allow multi-level fields

20 months agopysvp64asm: clean import directives
Dmitry Selyutin [Wed, 17 Aug 2022 19:35:35 +0000 (22:35 +0300)]
pysvp64asm: clean import directives

20 months agopysvp64dis: refactor inheritance model
Dmitry Selyutin [Wed, 17 Aug 2022 17:03:20 +0000 (20:03 +0300)]
pysvp64dis: refactor inheritance model

20 months agopysvp64dis: introduce disassemble routine
Dmitry Selyutin [Wed, 17 Aug 2022 14:18:55 +0000 (17:18 +0300)]
pysvp64dis: introduce disassemble routine

20 months agopysvp64dis: consider instruction name
Dmitry Selyutin [Wed, 17 Aug 2022 12:13:06 +0000 (15:13 +0300)]
pysvp64dis: consider instruction name

20 months agopysvp64dis: consult the instruction database
Dmitry Selyutin [Wed, 17 Aug 2022 11:55:26 +0000 (14:55 +0300)]
pysvp64dis: consult the instruction database

20 months agopysvp64dis: accept SelectableInt as an Instruction
Dmitry Selyutin [Wed, 17 Aug 2022 11:52:52 +0000 (14:52 +0300)]
pysvp64dis: accept SelectableInt as an Instruction

20 months agoselectable_int: support int casts
Dmitry Selyutin [Wed, 17 Aug 2022 11:51:30 +0000 (14:51 +0300)]
selectable_int: support int casts

20 months agopower_insn: rename Instruction to Record
Dmitry Selyutin [Wed, 17 Aug 2022 11:50:52 +0000 (14:50 +0300)]
power_insn: rename Instruction to Record

20 months agopower_insn: fix opcode-based lookups
Dmitry Selyutin [Wed, 17 Aug 2022 11:48:50 +0000 (14:48 +0300)]
power_insn: fix opcode-based lookups

20 months agopysvp64dis: introduce Suffix helper class
Dmitry Selyutin [Wed, 17 Aug 2022 10:40:32 +0000 (13:40 +0300)]
pysvp64dis: introduce Suffix helper class

20 months agopysvp64dis: introduce global cached insn database
Dmitry Selyutin [Wed, 17 Aug 2022 10:29:07 +0000 (13:29 +0300)]
pysvp64dis: introduce global cached insn database

20 months agopysvp64dis: refactor prefix handling
Dmitry Selyutin [Wed, 17 Aug 2022 09:53:33 +0000 (12:53 +0300)]
pysvp64dis: refactor prefix handling

20 months agoselectable_int: fix multi-dimensional mappings
Dmitry Selyutin [Wed, 17 Aug 2022 08:42:03 +0000 (11:42 +0300)]
selectable_int: fix multi-dimensional mappings

20 months agoadd some debug logs to SelectableInt to help track down what is going on
Luke Kenneth Casson Leighton [Tue, 16 Aug 2022 23:56:20 +0000 (00:56 +0100)]
add some debug logs to SelectableInt to help track down what is going on

20 months agowhitespace - keep to under 80 chars
Luke Kenneth Casson Leighton [Tue, 16 Aug 2022 23:39:11 +0000 (00:39 +0100)]
whitespace - keep to under 80 chars

20 months agopysvp64dis: introduce Prefix and RM classes
Dmitry Selyutin [Tue, 16 Aug 2022 21:40:39 +0000 (00:40 +0300)]
pysvp64dis: introduce Prefix and RM classes

20 months agoselectable_int: refactor mappings
Dmitry Selyutin [Tue, 16 Aug 2022 21:33:28 +0000 (00:33 +0300)]
selectable_int: refactor mappings

20 months agopysvp64dis: dump to output file; use explicit arguments
Dmitry Selyutin [Tue, 16 Aug 2022 18:43:26 +0000 (21:43 +0300)]
pysvp64dis: dump to output file; use explicit arguments

20 months agoselectable_int: allow fields-based instantiation
Dmitry Selyutin [Tue, 16 Aug 2022 18:21:32 +0000 (21:21 +0300)]
selectable_int: allow fields-based instantiation

20 months agoselectable_int: inherit mapping bits
Dmitry Selyutin [Tue, 16 Aug 2022 18:10:49 +0000 (21:10 +0300)]
selectable_int: inherit mapping bits

20 months agoselectable_int: strengthen type checks
Dmitry Selyutin [Tue, 16 Aug 2022 17:58:26 +0000 (20:58 +0300)]
selectable_int: strengthen type checks

20 months agopysvp64dis: refactor classes; use fields helpers
Dmitry Selyutin [Tue, 16 Aug 2022 14:55:56 +0000 (17:55 +0300)]
pysvp64dis: refactor classes; use fields helpers

20 months agopysvp64dis: fix prefix/suffix properties
Dmitry Selyutin [Tue, 16 Aug 2022 18:29:57 +0000 (21:29 +0300)]
pysvp64dis: fix prefix/suffix properties

20 months agoselectable_int: support fields comparisons
Dmitry Selyutin [Tue, 16 Aug 2022 14:54:55 +0000 (17:54 +0300)]
selectable_int: support fields comparisons

20 months agopysvp64asm: uncomment the remapped instructions
Dmitry Selyutin [Mon, 29 Aug 2022 16:14:04 +0000 (19:14 +0300)]
pysvp64asm: uncomment the remapped instructions

20 months agoadd setvl and other sv* management instructions to the list
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 11:36:33 +0000 (12:36 +0100)]
add setvl and other sv* management instructions to the list
for which OE is ignored.
https://bugs.libre-soc.org/show_bug.cgi?id=914
really the solution here is to add a new CSV column, OE

20 months agoadd logging into ISACaller.handle_overflow to see what gets set
Luke Kenneth Casson Leighton [Mon, 29 Aug 2022 11:13:34 +0000 (12:13 +0100)]
add logging into ISACaller.handle_overflow to see what gets set

20 months 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

20 months 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"

20 months 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

20 months 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

20 months 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!

20 months 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

20 months 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

20 months 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

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

21 months 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

21 months 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

21 months 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