openpower-isa.git
11 months agoadd gbbd (bmatflip) test case - just the one for now
Luke Kenneth Casson Leighton [Mon, 27 Nov 2023 13:55:53 +0000 (13:55 +0000)]
add gbbd (bmatflip) test case - just the one for now

11 months agowhitespace
Luke Kenneth Casson Leighton [Mon, 27 Nov 2023 13:45:12 +0000 (13:45 +0000)]
whitespace

11 months agoadd gbbd to minor_22.csv, add OP_BMAT to power_enums.py
Luke Kenneth Casson Leighton [Mon, 27 Nov 2023 13:29:18 +0000 (13:29 +0000)]
add gbbd to minor_22.csv, add OP_BMAT to power_enums.py

11 months agoadd first gather instruction pseudocode
Luke Kenneth Casson Leighton [Mon, 27 Nov 2023 13:14:43 +0000 (13:14 +0000)]
add first gather instruction pseudocode

11 months agoproject standard is to use c standard string specifiers NOT format
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 18:08:36 +0000 (18:08 +0000)]
project standard is to use c standard string specifiers NOT format
NOT php-style "f"

11 months agoproject standard is to use c standard string specifiers NOT format
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 18:07:33 +0000 (18:07 +0000)]
project standard is to use c standard string specifiers NOT format
NOT php-style "f"

11 months agoproject standard is to use c standard string specifiers NOT format
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 18:05:30 +0000 (18:05 +0000)]
project standard is to use c standard string specifiers NOT format
NOT php-style "f"

11 months agoproject standard is to use c standard string specifiers NOT format
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 18:02:43 +0000 (18:02 +0000)]
project standard is to use c standard string specifiers NOT format
NOT php-style "f"

11 months agobug 1228: dcbt* to match against nop, not dc* in ISACaller
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 17:45:53 +0000 (17:45 +0000)]
bug 1228: dcbt* to match against nop, not dc* in ISACaller

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 agobug 1231: all dc* instructions to be treated as nop
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 11:32:28 +0000 (11:32 +0000)]
bug 1231: all dc* instructions to be treated as nop

https://bugs.libre-soc.org/show_bug.cgi?id=1231#c1

11 months agoelf/simple_cases: deepcopy is unnecessary, call dict.copy 1169-elf-support
Jacob Lifshay [Fri, 1 Dec 2023 20:57:34 +0000 (12:57 -0800)]
elf/simple_cases: deepcopy is unnecessary, call dict.copy

11 months agobug 1169: elf-support correct syntax errors
Luke Kenneth Casson Leighton [Fri, 1 Dec 2023 17:49:51 +0000 (17:49 +0000)]
bug 1169: elf-support correct syntax errors

11 months agobug 1169: elf support, minor coding style adjustment, clearer
Luke Kenneth Casson Leighton [Fri, 1 Dec 2023 14:42:25 +0000 (14:42 +0000)]
bug 1169: elf support, minor coding style adjustment, clearer

11 months agoopenpower/test/elf/simple_cases: add some simple ELF test cases
Jacob Lifshay [Fri, 1 Dec 2023 09:17:05 +0000 (01:17 -0800)]
openpower/test/elf/simple_cases: add some simple ELF test cases

11 months agoadd utilities for testing ELF files
Jacob Lifshay [Fri, 1 Dec 2023 07:55:41 +0000 (23:55 -0800)]
add utilities for testing ELF files

11 months agoSimRunner: support running an ELFFile
Jacob Lifshay [Fri, 1 Dec 2023 07:54:48 +0000 (23:54 -0800)]
SimRunner: support running an ELFFile

11 months agoISACaller: support loading an ELFFile
Jacob Lifshay [Fri, 1 Dec 2023 07:51:08 +0000 (23:51 -0800)]
ISACaller: support loading an ELFFile

11 months agomem.py: add load_elf
Jacob Lifshay [Fri, 1 Dec 2023 07:46:50 +0000 (23:46 -0800)]
mem.py: add load_elf

11 months agomem.py: fix SIGBUS when accessing file mapped by mmap_syscall
Jacob Lifshay [Fri, 1 Dec 2023 07:40:51 +0000 (23:40 -0800)]
mem.py: fix SIGBUS when accessing file mapped by mmap_syscall

this fixes SIGBUS errors caused by accessing beyond the end of a
file but still in the last page of the file, which is a valid thing to
do, except that we have to account for host pages having a different
size than emulated pages and map zeros to fill out the rest of the
emulated page.

11 months agocaller.py: implement write syscall
Jacob Lifshay [Fri, 1 Dec 2023 07:29:18 +0000 (23:29 -0800)]
caller.py: implement write syscall

11 months agocaller.py: implement exit_group syscall
Jacob Lifshay [Fri, 1 Dec 2023 07:27:48 +0000 (23:27 -0800)]
caller.py: implement exit_group syscall

11 months agoISACaller: fix syscall emulation
Jacob Lifshay [Fri, 1 Dec 2023 07:15:45 +0000 (23:15 -0800)]
ISACaller: fix syscall emulation

there were two bugs fixed:
1. sc emulation was missing a `return`, so it tried to run sc
   again after running sc and rfid, giving the wrong CIA and
   MSR values.
2. the code to replace and restore the instruction with rfid
   had the wrong endian on the load, so it was corrupting the
   instruction for the next time it was used. I just deleted
   the save/replace/restore code since it isn't needed anymore.

I then changed the syscall tests to ensure both the
bugs above don't happen again.

11 months agosetup: add pyelftools v0.30 as dependency
Jacob Lifshay [Thu, 30 Nov 2023 03:04:26 +0000 (19:04 -0800)]
setup: add pyelftools v0.30 as dependency

11 months agoadd g++-powerpc64le-linux-gnu to .gitlab-ci.yml
Jacob Lifshay [Mon, 27 Nov 2023 05:43:46 +0000 (21:43 -0800)]
add g++-powerpc64le-linux-gnu to .gitlab-ci.yml

11 months agoadd mmap_syscall tests
Jacob Lifshay [Mon, 27 Nov 2023 03:14:21 +0000 (19:14 -0800)]
add mmap_syscall tests

11 months agoimplement MemMMap.mmap_syscall
Jacob Lifshay [Mon, 27 Nov 2023 03:13:25 +0000 (19:13 -0800)]
implement MemMMap.mmap_syscall

11 months agoadd ppc_flags.py so we can get the ppc versions of all the flags we need
Jacob Lifshay [Mon, 27 Nov 2023 03:11:35 +0000 (19:11 -0800)]
add ppc_flags.py so we can get the ppc versions of all the flags we need

tells gcc to dump all #defines, and parses that.

11 months agoreplace print() with log()
Luke Kenneth Casson Leighton [Fri, 1 Dec 2023 17:57:12 +0000 (17:57 +0000)]
replace print() with log()

11 months agoreplace print() with log()
Luke Kenneth Casson Leighton [Fri, 1 Dec 2023 17:54:16 +0000 (17:54 +0000)]
replace print() with log()

11 months agoreplace print() with log()
Luke Kenneth Casson Leighton [Fri, 1 Dec 2023 17:52:24 +0000 (17:52 +0000)]
replace print() with log()

11 months agopytest: try to improve scheduling programmerjake/powmod
Jacob Lifshay [Thu, 30 Nov 2023 22:55:08 +0000 (14:55 -0800)]
pytest: try to improve scheduling

11 months agotest_caller_svp64_powmod: rename to test_aaa_caller_svp64_powmod so pytest tries...
Jacob Lifshay [Thu, 30 Nov 2023 22:54:05 +0000 (14:54 -0800)]
test_caller_svp64_powmod: rename to test_aaa_caller_svp64_powmod so pytest tries to run it earlier

11 months agospeed up CI by disabling logging and VCD generation
Jacob Lifshay [Thu, 30 Nov 2023 22:21:36 +0000 (14:21 -0800)]
speed up CI by disabling logging and VCD generation

11 months agotest/runner: allow disabling VCD using SIM_NO_VCD=1 env var
Jacob Lifshay [Thu, 30 Nov 2023 22:20:54 +0000 (14:20 -0800)]
test/runner: allow disabling VCD using SIM_NO_VCD=1 env var

11 months agopowmod asm tests pass!
Jacob Lifshay [Tue, 17 Oct 2023 05:22:50 +0000 (22:22 -0700)]
powmod asm tests pass!

11 months agoswitch powmod to using new divmod implementation -- test not enabled yet
Jacob Lifshay [Mon, 16 Oct 2023 23:09:07 +0000 (16:09 -0700)]
switch powmod to using new divmod implementation -- test not enabled yet

11 months agocall log, not print
Jacob Lifshay [Mon, 16 Oct 2023 23:08:44 +0000 (16:08 -0700)]
call log, not print

11 months agomake parser work for pypy
Jacob Lifshay [Mon, 16 Oct 2023 22:39:17 +0000 (15:39 -0700)]
make parser work for pypy

pypy's ast classes' constructors seem to only work if all arguments or
no arguments are passed, not only some of them.

11 months agoadd comments telling people to keep the asm and python versions in sync
Jacob Lifshay [Mon, 16 Oct 2023 04:17:09 +0000 (21:17 -0700)]
add comments telling people to keep the asm and python versions in sync

11 months agodivmod: asm version of Knuth's algorithm D works!
Jacob Lifshay [Mon, 16 Oct 2023 04:06:02 +0000 (21:06 -0700)]
divmod: asm version of Knuth's algorithm D works!

11 months agoadd labels to DIVMOD REGEX log
Jacob Lifshay [Mon, 16 Oct 2023 03:59:36 +0000 (20:59 -0700)]
add labels to DIVMOD REGEX log

11 months agoput DIVMOD REGEX under new LogType: LogType.OutputMatching
Jacob Lifshay [Mon, 16 Oct 2023 03:54:12 +0000 (20:54 -0700)]
put DIVMOD REGEX under new LogType: LogType.OutputMatching

11 months agoWIP divmod: finished writing out asm knuth's algorithm d, still buggy
Jacob Lifshay [Fri, 13 Oct 2023 22:13:15 +0000 (15:13 -0700)]
WIP divmod: finished writing out asm knuth's algorithm d, still buggy

11 months agoWIP getting asm version of knuth's algorithm d working
Jacob Lifshay [Thu, 12 Oct 2023 03:29:51 +0000 (20:29 -0700)]
WIP getting asm version of knuth's algorithm d working

11 months agoWIP divmod: implemented division by single word
Jacob Lifshay [Wed, 11 Oct 2023 05:07:17 +0000 (22:07 -0700)]
WIP divmod: implemented division by single word

11 months agosupport ignoring integer registers for ExpectedState
Jacob Lifshay [Wed, 11 Oct 2023 05:05:49 +0000 (22:05 -0700)]
support ignoring integer registers for ExpectedState

11 months agoconvert assigned values to SVSHAPE when writing to SVSHAPE[0-3] SPRs
Jacob Lifshay [Wed, 11 Oct 2023 05:03:38 +0000 (22:03 -0700)]
convert assigned values to SVSHAPE when writing to SVSHAPE[0-3] SPRs

this makes mtspr SVSHAPE0, reg properly maintain ISACaller invariants

11 months agoadd WIP Knuth's algorithm D assembly
Jacob Lifshay [Tue, 10 Oct 2023 04:05:17 +0000 (21:05 -0700)]
add WIP Knuth's algorithm D assembly

11 months agodivmod: assign registers to variables
Jacob Lifshay [Tue, 10 Oct 2023 03:38:30 +0000 (20:38 -0700)]
divmod: assign registers to variables

11 months agoadapt divmod algorithm for putting variables in registers
Jacob Lifshay [Tue, 10 Oct 2023 03:35:40 +0000 (20:35 -0700)]
adapt divmod algorithm for putting variables in registers

11 months agoadd more features for _DivModRegsRegexLogger
Jacob Lifshay [Tue, 10 Oct 2023 03:30:43 +0000 (20:30 -0700)]
add more features for _DivModRegsRegexLogger

11 months agofinish moving Knuth algorithm D into a class
Jacob Lifshay [Tue, 10 Oct 2023 01:25:43 +0000 (18:25 -0700)]
finish moving Knuth algorithm D into a class

11 months agomerely indent function
Jacob Lifshay [Tue, 10 Oct 2023 01:21:40 +0000 (18:21 -0700)]
merely indent function

[skip ci]

11 months agostart adding DivModKnuthAlgorithmD class
Jacob Lifshay [Tue, 10 Oct 2023 01:19:25 +0000 (18:19 -0700)]
start adding DivModKnuthAlgorithmD class

11 months agoformat code
Jacob Lifshay [Tue, 10 Oct 2023 01:18:28 +0000 (18:18 -0700)]
format code

11 months agofinish writing python_divmod_knuth_algorithm_d
Jacob Lifshay [Mon, 9 Oct 2023 04:46:57 +0000 (21:46 -0700)]
finish writing python_divmod_knuth_algorithm_d

11 months agofix generating invalid divmod tests
Jacob Lifshay [Mon, 9 Oct 2023 04:46:14 +0000 (21:46 -0700)]
fix generating invalid divmod tests

11 months agospeed up divmod shift-sub tests by removing most test cases
Jacob Lifshay [Mon, 9 Oct 2023 04:43:00 +0000 (21:43 -0700)]
speed up divmod shift-sub tests by removing most test cases

11 months agoadd WIP knuth algorithm D python implementation
Jacob Lifshay [Sat, 7 Oct 2023 00:08:35 +0000 (17:08 -0700)]
add WIP knuth algorithm D python implementation

11 months agorename divmod algorithm -> divmod_shift_sub in prep for adding divmod based on Knuth...
Jacob Lifshay [Fri, 6 Oct 2023 22:21:07 +0000 (15:21 -0700)]
rename divmod algorithm -> divmod_shift_sub in prep for adding divmod based on Knuth's Algorithm D

11 months agoadd WIP powmod_256 -- asm test is currently disabled since divmod is too slow
Jacob Lifshay [Fri, 6 Oct 2023 02:57:29 +0000 (19:57 -0700)]
add WIP powmod_256 -- asm test is currently disabled since divmod is too slow

11 months agofix assemble to properly look for whole symbols to replace
Jacob Lifshay [Fri, 6 Oct 2023 02:53:45 +0000 (19:53 -0700)]
fix assemble to properly look for whole symbols to replace

previously if there were labels foo and foobar, it would partially
replace foobar giving 0x<addr>bar, which is wrong.

also optimized to use dict instead of linear search for label names

11 months agowhitespace in pseudocode to aid clarity
Luke Kenneth Casson Leighton [Thu, 30 Nov 2023 03:03:14 +0000 (03:03 +0000)]
whitespace in pseudocode to aid clarity

11 months agogot sv.bc working for pospopcount
Luke Kenneth Casson Leighton [Mon, 27 Nov 2023 10:08:43 +0000 (10:08 +0000)]
got sv.bc working for pospopcount

11 months agotry ctrtest mode in pospopcount
Luke Kenneth Casson Leighton [Mon, 27 Nov 2023 09:47:29 +0000 (09:47 +0000)]
try ctrtest mode in pospopcount

11 months agoreduce indentation
Luke Kenneth Casson Leighton [Thu, 23 Nov 2023 07:03:49 +0000 (07:03 +0000)]
reduce indentation

11 months agostarting on pospopcount assembler
Luke Kenneth Casson Leighton [Tue, 21 Nov 2023 17:40:27 +0000 (17:40 +0000)]
starting on pospopcount assembler

11 months agoadd cut/paste copy of strncpy example as basis for pospopcount
Luke Kenneth Casson Leighton [Tue, 21 Nov 2023 12:39:28 +0000 (12:39 +0000)]
add cut/paste copy of strncpy example as basis for pospopcount
https://bugs.libre-soc.org/show_bug.cgi?id=672

11 months agofix vertical-first sv.bc 1210-attempt-to-fix-vf-sv.bc
Jacob Lifshay [Tue, 21 Nov 2023 01:45:23 +0000 (17:45 -0800)]
fix vertical-first sv.bc

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

11 months agoAdded sv.bc in vertical-first test
Andrey Miroshnikov [Fri, 17 Nov 2023 14:55:52 +0000 (14:55 +0000)]
Added sv.bc in vertical-first test

11 months agoadd Z-23 to RT FRS FRT
Luke Kenneth Casson Leighton [Fri, 17 Nov 2023 15:42:07 +0000 (15:42 +0000)]
add Z-23 to RT FRS FRT

11 months agoAdded English language description for stdupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:38:47 +0000 (15:38 +0000)]
Added English language description for stdupsx instruction

11 months agoAdded English language description for sthupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:38:13 +0000 (15:38 +0000)]
Added English language description for sthupsx instruction

11 months agoAdded English language description for sthupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:36:11 +0000 (15:36 +0000)]
Added English language description for sthupsx instruction

11 months agoAdded English language description for stbupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:35:39 +0000 (15:35 +0000)]
Added English language description for stbupsx instruction

11 months agoAdded English language description for ldupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:34:20 +0000 (15:34 +0000)]
Added English language description for ldupsx instruction

11 months agoadd RS/FRT/FRS to Z-23 Form for ls004
Luke Kenneth Casson Leighton [Fri, 17 Nov 2023 15:30:33 +0000 (15:30 +0000)]
add RS/FRT/FRS to Z-23 Form for ls004
https://bugs.libre-soc.org/show_bug.cgi?id=1055

11 months agoAdded English language description for lwaupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:33:42 +0000 (15:33 +0000)]
Added English language description for lwaupsx instruction

11 months agoAdded English language description for lwzupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:32:56 +0000 (15:32 +0000)]
Added English language description for lwzupsx instruction

11 months agoAdded English language description for lhaupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:32:18 +0000 (15:32 +0000)]
Added English language description for lhaupsx instruction

11 months agoAdded English language description for lhzupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:31:08 +0000 (15:31 +0000)]
Added English language description for lhzupsx instruction

11 months agochange ld/st shift to Z23-Form
Luke Kenneth Casson Leighton [Fri, 17 Nov 2023 15:27:48 +0000 (15:27 +0000)]
change ld/st shift to Z23-Form

11 months agoAdded English language description for lfdupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:29:12 +0000 (15:29 +0000)]
Added English language description for lfdupsx instruction

11 months agoAdded English language description for lbzupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:27:31 +0000 (15:27 +0000)]
Added English language description for lbzupsx instruction

11 months agoAdded English language description for stfdux instruction
Shriya Sharma [Fri, 17 Nov 2023 15:24:36 +0000 (15:24 +0000)]
Added English language description for stfdux instruction

11 months agoadd comment/header on ld/st shift instructions
Luke Kenneth Casson Leighton [Fri, 17 Nov 2023 15:20:37 +0000 (15:20 +0000)]
add comment/header on ld/st shift instructions

11 months agoAdded English language description for lfdupsx instruction
Shriya Sharma [Fri, 17 Nov 2023 15:22:08 +0000 (15:22 +0000)]
Added English language description for lfdupsx instruction