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
Denis Drakhnia
89aa3a80c1
e2k: Remove {GET,SET}_FIELD macros.
2022-06-10 11:48:17 +03:00
Denis Drakhnia
53bb2d49eb
e2k: Small performance improvements.
...
Do not initialize alops_map for every tb.
Reduced alops size.
Delayed window bounds checks.
2022-06-10 11:48:17 +03:00
Denis Drakhnia
5aa3d47668
e2k: Fix decoding of ALES2/5.
2022-06-10 11:48:17 +03:00
Denis Drakhnia
5f665e70ae
e2k: Decode/execute ct cond after alc execution.
2022-06-10 11:48:16 +03:00
Denis Drakhnia
fb1c8adcc7
e2k: Invalidate mlock after each instruction.
2022-06-10 11:48:16 +03:00
Denis Drakhnia
7a667b7ba5
target: e2k: Add short, ext, ext1, ext2 alops table.
2022-06-10 11:48:16 +03:00
Denis Drakhnia
126b8b310c
target: e2k: Add basic FX instrs.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
8881486b62
target: e2k: Remove rptr and tptr from state.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
21b39b8206
target: e2k: Delete hack for saving USD registers on proc call/ret.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
bcc311b773
target: e2k: Fix udivs exception hack.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
6496153694
target: e2k: Impl restore_state_to_opc.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
37b4ee19b0
target: e2k: Remove unneeded regs array in TCG state.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
ad6bc687e4
target: e2k: HACK: Tag storage for procedure stack.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
728e400620
target: e2k: Save PC before reading it in rr{s,d}.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
5b444c9356
target: e2k: Add dbl window modifier.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
9662877725
target: e2k: Do not save IP on every instruction.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
1c03415d9e
target: e2k: Restricted loop_mode implementation.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
bd6208c09f
target: e2k: Fix ctpr size.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
93acd43783
target: e2k: Add staa{b,h} instrs.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
8e033a839e
target: e2k: Hack delay %rN index gen for result.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
1ad7988e9a
target: e2k: Fix based preg.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
7ff1f54b8f
target: e2k: Add mova stubs.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
39bb97e24e
target: e2k: Reorganize tag usage.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
5a1e118992
target: e2k: Fix icont bug.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
db10b6d8a4
target: e2k: Reorg reg file.
2022-06-10 11:48:13 +03:00