Commit Graph

126 Commits

Author SHA1 Message Date
Denis Drakhnia 7458cfadc2 e2k: gettagd write 32-bit result 2024-04-25 20:08:59 +03:00
Denis Drakhnia bec013fab1 e2k: check mrgc tag 2024-04-25 20:08:59 +03:00
Denis Drakhnia ca5b13ca4e e2k: check tag for ct qual 2024-04-25 20:08:59 +03:00
Denis Drakhnia 9044a3bb28 e2k: check predicate registers tags 2024-04-25 20:08:59 +03:00
Denis Drakhnia b7aa8589e9 e2k: track writes to ctprs in disas context 2024-04-25 20:08:59 +03:00
Denis Drakhnia 624fe3175c e2k: gen exception if call wbs is greater than wsz 2024-04-25 20:08:59 +03:00
Denis Drakhnia 0db57d1579 e2k: add gen_rrs 2024-04-25 20:08:59 +03:00
Denis Drakhnia 5afa8efc6e e2k: cpu always spill/fill 32 bytes for every 2 regs 2024-04-25 20:08:59 +03:00
Denis Drakhnia e381e6d3f5 e2k: remove delayed tag check 2024-04-25 20:08:59 +03:00
Denis Drakhnia b3baf0539d e2k: refactor gen stubs 2024-04-25 20:08:59 +03:00
Denis Drakhnia 8a6ee164b5 e2k: remove unused gen_result_init 2024-04-25 20:08:59 +03:00
Denis Drakhnia 6dcaff62e5 e2k: move complex getf{s,d} to helper and optimize for literal 2024-04-25 20:08:59 +03:00
Denis Drakhnia 36ef654ea1 e2k: optimize sxt for imm5 in src1 2024-04-25 20:08:59 +03:00
Denis Drakhnia 1a5aeee39a e2k: refactor preg read/write 2024-04-25 20:08:59 +03:00
Denis Drakhnia d4961a8a3e e2k: refactor GPR reads and writes 2024-04-25 20:08:59 +03:00
Denis Drakhnia 55278b45c5 e2k: use Int128 for X/QP ops 2024-04-25 20:08:59 +03:00
Denis Drakhnia b78874bdb0 e2k: refactor alop src generation 2024-04-25 20:08:59 +03:00
Denis Drakhnia d23cf508ba e2k: gen return only for ctpr3 2024-04-25 20:08:59 +03:00
Denis Drakhnia 335042809b e2k: illop if pc is not aligned by 8 bytes 2024-04-25 20:08:59 +03:00
Denis Drakhnia a84db39085 e2k: v9.0.0 fixes 2024-04-25 20:07:04 +03:00
Denis Drakhnia 0cd2e9c69b e2k: do not dissabmle fake kernel code
Signed-off-by: Denis Drakhnia <numas13@gmail.com>
2022-09-07 21:34:01 +03:00
Denis Drakhnia fb9330bd0e e2k: Add cctop* insns.
Signed-off-by: Denis Drakhnia <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia bcc04e0c5b e2k: Increase the number of NR to 224.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia 0a0655109a e2k: Gen illopc for mirrored ld+st.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia 48290cb80c e2k: Update get/set state regs.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia 21ff5cbef9 e2k: Remove syscall helper.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia c8ed74f626 e2k: Add tags and force_save_alc_dst properties.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia d84636d73a e2k: Restore basic tags support.
Disabled at compile time.
2022-06-10 11:48:20 +03:00
Denis Drakhnia 0c634e952b e2k: Do not generate loop_end for stores outside of loops.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia 52e67df3a1 e2k: Reorg usage of registers.
Till then we had separate stage to write results of
an operations to registers. Now operations will write
result immediately to a destination register. Registers
will be saved to a temporary location if following
operations in a bundle must read them.

The change elliminates additional branches for
conditional operations in the write stage and reduces
data movements.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia ba89b350dc e2k: signals: Save and restore more state.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +03:00
Denis Drakhnia c03d91b7c0 e2k: Fix read and write probe access.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia 6cbcdc4d5c e2k: Implement basic v6 support.
Not tested on a real hardware.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia 8f4de9d485 e2k: Implement basic v5 support.
Add gdb xml files for e2k.
Tags are partially disabled for better performance.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia 6fb98e718e e2k: Move TCG translation parts into single file.
The TCG translation was splitted into multiple files and
it was painful because it has a lot of cross references.

Reorg FX helpers.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia b0a1af39c6 e2k: Add a fake atomic execution.
QEMU has cpu_exec_step_atomic function to run
one instruction in an exclusive mode but we need
to execute multiple instructions in that mode.
I don't want to modify the function.

The solution provides a correct execution of
atomic operations like on real CPU but needs
more testing to prove that it works correctly
in all cases.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia 374e658eb1 e2k: Add access_hw_stacks and backtrace syscalls.
Special system calls for managing hardware stacks.
Required for C++ exceptions.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia f49a9d8df0 e2k: Fix incorrect initialization of mlock.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia e440ebc3db e2k: Basic impl of e2k32-linux-user.
Fix target_stat64 field types in 32-bit mode.
Basic impl of getpl.
Basic impl of ldgd{b,h,w,d}.
Basic impl of stgd{b,h,w,d}.
Add e2k exceptions.
Add Dynamic hw stacks expansion.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia ab620f7a2b e2k: Delete redundant unimplemented messages.
DAM has not been yet implemented. We always generate
a jump to a fixing code. All these messages are redundant.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia e404c06a2d e2k: Fix syscall restart.
We cannot just change the IP address in E2K to restart
the instruction because the same register can be read
and written in the same instruction (and many more
situations), but we can create a fake syscall instruction
and restart it.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia 26b9e9a1e4 e2k: Impl basic unix signals support. 2022-06-10 11:48:19 +03:00
Denis Drakhnia 7237457c44 e2k: Add stub for pref op. 2022-06-10 11:48:18 +03:00
Denis Drakhnia 177922ca64 e2k: Split ALC decode/generate stages. 2022-06-10 11:48:18 +03:00
Denis Drakhnia 7dde6cc100 e2k: ecnt must not decrement if vlc is not set. 2022-06-10 11:48:18 +03:00
Denis Drakhnia 38ef61024d e2k: Fix incorrect epilogue counter decrement. 2022-06-10 11:48:18 +03:00
Denis Drakhnia 9e8c927036 e2k: Add delayed window bounds static/dynamic checks. 2022-06-10 11:48:18 +03:00
Denis Drakhnia 23a0139ee6 e2k: Remove control.c 2022-06-10 11:48:17 +03:00
Denis Drakhnia 9e79810b32 e2k: Fix incorrect restore from a breakpoint. 2022-06-10 11:48:17 +03:00
Denis Drakhnia 3b03e60115 e2k: Disable debug restore checks if not needed.
Do not check illtag if not needed.
2022-06-10 11:48:17 +03:00