Dmitry Selyutin [Sun, 14 Jan 2024 12:30:42 +0000 (15:30 +0300)]
oppc/code: drop explicit ctx argument
Dmitry Selyutin [Sun, 14 Jan 2024 12:24:39 +0000 (15:24 +0300)]
oppc/code: introduce ccall
Dmitry Selyutin [Sun, 14 Jan 2024 11:25:17 +0000 (14:25 +0300)]
oppc/code: introduce transient
Dmitry Selyutin [Sun, 14 Jan 2024 12:17:18 +0000 (15:17 +0300)]
oppc/ast: hash node by id
Dmitry Selyutin [Sat, 13 Jan 2024 15:30:02 +0000 (18:30 +0300)]
oppc/main: parse all insndb instructions
Dmitry Selyutin [Sat, 13 Jan 2024 12:33:48 +0000 (15:33 +0300)]
oppc/code: convert everything into calls
Dmitry Selyutin [Sat, 13 Jan 2024 12:30:54 +0000 (15:30 +0300)]
oppc/util: simplify empty statements
Dmitry Selyutin [Fri, 12 Jan 2024 20:47:00 +0000 (23:47 +0300)]
oppc/parser: check for regs in trailerlist
Dmitry Selyutin [Fri, 12 Jan 2024 20:23:36 +0000 (23:23 +0300)]
oppc/code: support ternary conditionals
Dmitry Selyutin [Fri, 12 Jan 2024 20:16:17 +0000 (23:16 +0300)]
oppc/code: support if exprs
Dmitry Selyutin [Fri, 12 Jan 2024 20:13:34 +0000 (23:13 +0300)]
oppc/pseudocode: simplify call arguments
Dmitry Selyutin [Fri, 12 Jan 2024 20:07:18 +0000 (23:07 +0300)]
oppc/code: support for exprs
Dmitry Selyutin [Fri, 12 Jan 2024 19:52:30 +0000 (22:52 +0300)]
oppc/code: support calls
Dmitry Selyutin [Fri, 12 Jan 2024 19:47:48 +0000 (22:47 +0300)]
oppc/code: support subscript assignments
Dmitry Selyutin [Fri, 12 Jan 2024 19:28:58 +0000 (22:28 +0300)]
oppc/code: support subscript exprs
Dmitry Selyutin [Fri, 12 Jan 2024 19:33:05 +0000 (22:33 +0300)]
oppc/code: support XLEN
Dmitry Selyutin [Fri, 12 Jan 2024 19:24:22 +0000 (22:24 +0300)]
oppc: consider subscripts exprs
Dmitry Selyutin [Fri, 12 Jan 2024 19:24:22 +0000 (22:24 +0300)]
oppc/code: support repeat expr
Dmitry Selyutin [Fri, 12 Jan 2024 19:24:22 +0000 (22:24 +0300)]
oppc/code: simplify exprs and regs
Dmitry Selyutin [Fri, 12 Jan 2024 19:24:22 +0000 (22:24 +0300)]
oppc/code: support bitwise operations
Dmitry Selyutin [Fri, 12 Jan 2024 19:24:22 +0000 (22:24 +0300)]
oppc/code: support simple conditions
Dmitry Selyutin [Fri, 12 Jan 2024 19:24:22 +0000 (22:24 +0300)]
oppc/code: support binary mul/div/mod
Dmitry Selyutin [Fri, 12 Jan 2024 19:24:22 +0000 (22:24 +0300)]
oppc/code: support binary add/sub
Dmitry Selyutin [Fri, 12 Jan 2024 19:24:22 +0000 (22:24 +0300)]
oppc/code: refactor unary exprs
Dmitry Selyutin [Wed, 10 Jan 2024 21:09:37 +0000 (00:09 +0300)]
oppc/code: support simple constant unary exprs
Dmitry Selyutin [Wed, 10 Jan 2024 20:49:22 +0000 (23:49 +0300)]
oppc/code: support simple constant assignments
Dmitry Selyutin [Wed, 10 Jan 2024 20:43:59 +0000 (23:43 +0300)]
oppc/code: introduce header and footer
Dmitry Selyutin [Tue, 9 Jan 2024 21:26:03 +0000 (00:26 +0300)]
oppc: introduce C generator skeleton
Dmitry Selyutin [Tue, 9 Jan 2024 19:48:26 +0000 (22:48 +0300)]
oppc: check for special symbols
Dmitry Selyutin [Tue, 9 Jan 2024 18:23:44 +0000 (21:23 +0300)]
oppc: decouple common code
Dmitry Selyutin [Tue, 9 Jan 2024 18:29:45 +0000 (21:29 +0300)]
oppc: simplify ternary conditionals
Dmitry Selyutin [Tue, 9 Jan 2024 18:08:41 +0000 (21:08 +0300)]
oppc: decouple pseudocode module
Dmitry Selyutin [Tue, 9 Jan 2024 15:49:56 +0000 (18:49 +0300)]
oppc: decouple call name class
Dmitry Selyutin [Mon, 8 Jan 2024 20:26:32 +0000 (23:26 +0300)]
oppc: rename Assign classes
Dmitry Selyutin [Mon, 8 Jan 2024 13:19:38 +0000 (16:19 +0300)]
oppc: swap declaration
Dmitry Selyutin [Mon, 8 Jan 2024 12:48:13 +0000 (15:48 +0300)]
oppc: introduce GPRZero class
Dmitry Selyutin [Mon, 8 Jan 2024 08:34:02 +0000 (11:34 +0300)]
pywriter: convert pcode to tree and back to pcode
Dmitry Selyutin [Sun, 7 Jan 2024 22:57:51 +0000 (01:57 +0300)]
oppc: introduce openpower pseudocode
Dmitry Selyutin [Fri, 5 Jan 2024 20:39:48 +0000 (23:39 +0300)]
insndb/db: update walker
Luke Kenneth Casson Leighton [Mon, 8 Jan 2024 13:53:39 +0000 (13:53 +0000)]
fix memory locations in linked-list test_caller_svp64_ldst.py
Jacob Lifshay [Tue, 9 Jan 2024 08:01:44 +0000 (00:01 -0800)]
fptrans.mdwn: don't parenthesize register being assigned to
Fixes: https://bugs.libre-soc.org/show_bug.cgi?id=1247
Luke Kenneth Casson Leighton [Thu, 21 Dec 2023 17:22:52 +0000 (17:22 +0000)]
whitespace
Jacob Lifshay [Tue, 19 Dec 2023 01:46:13 +0000 (17:46 -0800)]
.gitlab-ci.yml: re-add maxschedchunk, it provides massive speedups -- ~2x on CI
this essentially reverts
bfb9d7f312ebb5f394414b5e1ea8f03728af4489
on CI,
bfb9d7f312ebb5f394414b5e1ea8f03728af4489 took 5h45m:
https://salsa.debian.org/Kazan-team/mirrors/openpower-isa/-/jobs/
5038101
the parent commit took 2h37m:
https://salsa.debian.org/Kazan-team/mirrors/openpower-isa/-/jobs/
5034703
Luke Kenneth Casson Leighton [Fri, 15 Dec 2023 23:22:16 +0000 (23:22 +0000)]
bug 1183: correct comments from cut/paste
lkcl [Wed, 13 Dec 2023 22:36:45 +0000 (22:36 +0000)]
remove pytest option which hard-codes assumptions about installed version
Jacob Lifshay [Tue, 12 Dec 2023 18:20:03 +0000 (10:20 -0800)]
elf/simple_cases: disable case_static_glibc for now, re-enable when we work on it again.
Jacob Lifshay [Tue, 12 Dec 2023 18:11:04 +0000 (10:11 -0800)]
add make_gdb_vm_image.sh script, it doesn't work yet but could be useful
see https://bugs.libre-soc.org/show_bug.cgi?id=1228#c15
Jacob Lifshay [Thu, 7 Dec 2023 08:55:22 +0000 (00:55 -0800)]
load_elf: dump a sequence of gdb commands for easy debugging
dumps a sequence of gdb commands that can easily be copied from
the output and pasted into gdb to reset the stack to what load_elf
uses, instead of what gdb's execve does.
Jacob Lifshay [Thu, 7 Dec 2023 08:53:20 +0000 (00:53 -0800)]
MemMMap: fix brk_syscall -- use unrounded input address as heap end
it should use the input address as given when tracking the end of
the heap and returning addresses. it still needs to align addresses
when mapping/unmapping pages.
Jacob Lifshay [Thu, 7 Dec 2023 08:52:48 +0000 (00:52 -0800)]
load_elf: add forgotten auxv entries
Jacob Lifshay [Thu, 7 Dec 2023 07:36:14 +0000 (23:36 -0800)]
load_elf: copy linux's auxv, argv, and env layout
Jacob Lifshay [Wed, 6 Dec 2023 09:11:56 +0000 (01:11 -0800)]
load_elf: match linux better for statically-linked binaries
we still need more auxv entries, but the rest should match close
enough now.
Jacob Lifshay [Wed, 6 Dec 2023 09:09:42 +0000 (01:09 -0800)]
elf/simple_cases: enable debug info for statically-linked glibc demo
Jacob Lifshay [Wed, 6 Dec 2023 09:08:25 +0000 (01:08 -0800)]
MemMMap: raise error for bad load/fetch addresses when emulating mmap
Jacob Lifshay [Wed, 6 Dec 2023 09:07:42 +0000 (01:07 -0800)]
caller.py: don't try to make zero-sized memory accesses, they error
Jacob Lifshay [Wed, 6 Dec 2023 09:06:26 +0000 (01:06 -0800)]
test/elf/__init__: make objdump go to default log kind -- it's quieter
Jacob Lifshay [Mon, 4 Dec 2023 10:15:47 +0000 (02:15 -0800)]
caller.py: implement writev syscall
Jacob Lifshay [Mon, 4 Dec 2023 10:15:30 +0000 (02:15 -0800)]
fixedsync.mdwn: add sync instruction
Jacob Lifshay [Mon, 4 Dec 2023 10:13:52 +0000 (02:13 -0800)]
MemMMap: use modified_pages.discard instead of remove since pages may not be modified
Jacob Lifshay [Mon, 4 Dec 2023 09:45:23 +0000 (01:45 -0800)]
test/ldst: add fixedsync tests for b/h/w/d ll/sc, but not quadword
quadword probably doesn't work correctly and probably requires a bit of work
Jacob Lifshay [Mon, 4 Dec 2023 09:43:26 +0000 (01:43 -0800)]
major/minor_62: add FIXMEs to lq/stq to match the FIXMEs on lqarx/stqcx.
Jacob Lifshay [Mon, 4 Dec 2023 09:42:31 +0000 (01:42 -0800)]
fixedsync/minor_31: add stqcx. because I'm adding the others anyway
Jacob Lifshay [Mon, 4 Dec 2023 09:41:04 +0000 (01:41 -0800)]
fixedsync/minor_31: add lqarx because I'm adding the others anyway
Jacob Lifshay [Mon, 4 Dec 2023 09:37:29 +0000 (01:37 -0800)]
minor_62.csv: add unofficial and comment2 fields
Jacob Lifshay [Mon, 4 Dec 2023 09:36:57 +0000 (01:36 -0800)]
major.csv: add unofficial and comment2 fields
Jacob Lifshay [Mon, 4 Dec 2023 08:23:09 +0000 (00:23 -0800)]
fixedsync.mdwn: implement other sizes: lbarx lharx ldarx stbcx. sthcx. stdcx.
still unimplemented: lqarx and stqcx.
Jacob Lifshay [Mon, 4 Dec 2023 08:21:15 +0000 (00:21 -0800)]
fixedsync.mdwn: fix stwcx. pseudocode
Jacob Lifshay [Mon, 4 Dec 2023 08:19:31 +0000 (00:19 -0800)]
ISACaller: add PowerISA spec. reference for real_page_size
Jacob Lifshay [Mon, 4 Dec 2023 08:18:10 +0000 (00:18 -0800)]
ISACaller: implement real_addr pseudo-code helper
Jacob Lifshay [Mon, 4 Dec 2023 08:17:02 +0000 (00:17 -0800)]
test/state: support memory in ExpectedState
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 20:30:27 +0000 (20:30 +0000)]
add initial lwarx unit test and pseudocode
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 18:42:57 +0000 (18:42 +0000)]
add WIP lrsc mdwn for stbcx
Luke Kenneth Casson Leighton [Sun, 3 Dec 2023 10:11:28 +0000 (10:11 +0000)]
take every opportunity *not* to go onto a separate line with commas
bad:
- log("is priv", instr_is_privileged, hex(self.msr.value),
- self.msr[MSRb.PR])
good:
- if instr_is_privileged and self.msr[MSRb.PR] == 1:
+ PR = self.msr[MSRb.PR]
+ log("is priv", instr_is_privileged, hex(self.msr.value), PR)
+ if instr_is_privileged and PR == 1:
Jacob Lifshay [Sun, 3 Dec 2023 08:51:13 +0000 (00:51 -0800)]
elf/simple_cases: add hello world statically-linked to glibc
it errors when reaching stwcx.
Jacob Lifshay [Sun, 3 Dec 2023 09:23:04 +0000 (01:23 -0800)]
caller.py: implement readlink/readlinkat syscalls
Jacob Lifshay [Sun, 3 Dec 2023 08:49:08 +0000 (00:49 -0800)]
caller.py: implement a pile of syscalls
this implements read, mmap, mmap2, brk, openat, uname, and newuname.
it also stubs out munmap, mprotect, and pkey_mprotect so programs
don't crash cpython.
Jacob Lifshay [Sun, 3 Dec 2023 08:47:05 +0000 (00:47 -0800)]
load_elf: set mem.heap_range so brk works
Jacob Lifshay [Sun, 3 Dec 2023 08:46:01 +0000 (00:46 -0800)]
Mem: speed up log_fancy by using make_sim_state_dict()
Jacob Lifshay [Sun, 3 Dec 2023 08:44:48 +0000 (00:44 -0800)]
ppc_flags: include more headers for uname, openat, etc.
Jacob Lifshay [Sun, 3 Dec 2023 08:42:51 +0000 (00:42 -0800)]
syscalls/__init__: log which syscall is made
this is very handy when looking at logs, since you no longer have to
manually translate syscall numbers to syscall names.
Jacob Lifshay [Sun, 3 Dec 2023 07:57:21 +0000 (23:57 -0800)]
MemMMap/SimState: speed up SimState.get_mem() for large memories
make MemMMap use struct.Struct.unpack_from to read a whole page at
once, rather than doing a sequence of loads. This makes an ELF
binary statically-linked to glibc able to run many instructions per
second rather than one every tens of seconds or so.
Jacob Lifshay [Sun, 3 Dec 2023 07:50:57 +0000 (23:50 -0800)]
MemMMap: log mmap calls
Jacob Lifshay [Sun, 3 Dec 2023 07:50:08 +0000 (23:50 -0800)]
mem.py: make MMapEmuBlock use hex for repr
Jacob Lifshay [Sun, 3 Dec 2023 07:45:41 +0000 (23:45 -0800)]
Mem: don't log loads when dumping, you'll see the memory dump anyway
this avoids a giant list of memory-load log messages immediately
followed by a much nicer memory dump, just show the memory dump
without logging every single load needed to create the memory dump.
This also makes memory-dumping faster for large memories.
Jacob Lifshay [Sun, 3 Dec 2023 03:23:22 +0000 (19:23 -0800)]
MemMMap: finish implementing brk_syscall
Jacob Lifshay [Wed, 13 Dec 2023 00:51:33 +0000 (16:51 -0800)]
caller.py: use yield from on is_ffirst_mode since it's a generator
Jacob Lifshay [Wed, 13 Dec 2023 00:50:27 +0000 (16:50 -0800)]
caller.py: fix undefined ffirst, hope I guessed the correct value
Jacob Lifshay [Wed, 13 Dec 2023 00:49:24 +0000 (16:49 -0800)]
caller.py: XLEN must be accessed as self.XLEN
Luke Kenneth Casson Leighton [Sat, 9 Dec 2023 06:47:26 +0000 (06:47 +0000)]
reenable tests
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
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
Luke Kenneth Casson Leighton [Fri, 8 Dec 2023 15:21:34 +0000 (15:21 +0000)]
bug #676: add sv.minmax dd-ffirst-single test
Shriya Sharma [Thu, 7 Dec 2023 20:15:13 +0000 (20:15 +0000)]
added 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
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 20:00:12 +0000 (20:00 +0000)]
add repr function to CR field
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 19:52:29 +0000 (19:52 +0000)]
correction to idx
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 19:52:02 +0000 (19:52 +0000)]
correction to ra
Luke Kenneth Casson Leighton [Thu, 7 Dec 2023 19:51:38 +0000 (19:51 +0000)]
correction to VL
Shriya Sharma [Thu, 7 Dec 2023 19:54:19 +0000 (19:54 +0000)]
added the expected results for scalar ddffirst
Shriya Sharma [Thu, 7 Dec 2023 19:43:50 +0000 (19:43 +0000)]
starting on the unit test for scalar ddffirst