Denis Drakhnia
a1a54bb46f
e2k: basic v7 support
2024-04-25 20:09:01 +03:00
Denis Drakhnia
8e133a3e89
e2k: set default procedure stack size to page size
2024-04-25 20:09:01 +03:00
Denis Drakhnia
b3a68870d5
e2k: do not use wreg pointer for register spill/fill
2024-04-25 20:09:01 +03:00
Denis Drakhnia
a3ede2fce9
e2k: remove unused break_restore_state
2024-04-25 20:09:01 +03:00
Denis Drakhnia
4a415ddafa
e2k: use pointer to access regs in a window
2024-04-25 20:09:00 +03:00
Denis Drakhnia
0df54fb097
e2k: write tags only if enabled
2024-04-25 20:09:00 +03:00
Denis Drakhnia
35e9165962
e2k: do not modify registers for setwd
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
d4961a8a3e
e2k: refactor GPR reads and writes
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
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
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
1d0e52b6a0
e2k: Bug fixes.
...
Fix time fields in stat64.
Restore and save a breakpoint frame in a signal
handler. This will fix a segfault if a signal will
be raised while a cpu is in a breakpoint.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:20 +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
17be44b21b
e2k: Use one large array for registers.
...
Previously was used two separate arrays for low and
high halves of a register. Now we can pass direct
pointer to a register into helpers instead of copying
the halves into a temporary buffer and pass pointer to
that buffer.
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
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
7198f44549
e2k: Always SPILL/FILL in FX window mode.
...
It will fix 'finish' command in gdb.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia
5e66da5f7d
e2k: Delete top CRs from cpu state.
...
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia
05304bd1f3
e2k: Fix compiler warnings.
...
Remove unused static functions.
Replace a misused not operator by bitwise not.
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
23a0139ee6
e2k: Remove control.c
2022-06-10 11:48:17 +03:00
Denis Drakhnia
0b7f461be7
e2k: Remove pshtp and window base.
2022-06-10 11:48:17 +03:00
Denis Drakhnia
28aafb053c
e2k: Restore usage of env CRs.
...
Fixes syscall e2k_longjmp2.
2022-06-10 11:48:17 +03:00
Denis Drakhnia
e4e22e089c
e2k: Prepare to remove CRs from env.
2022-06-10 11:48:16 +03:00
Denis Drakhnia
06df1e9168
e2k: Impl e2k_longjmp2 syscall.
2022-06-10 11:48:16 +03:00
Denis Drakhnia
1c16338c6d
target: e2k: Correctly save/restore wdbl.
2022-06-10 11:48:16 +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
1dd030c321
target: e2k: Add e2k_todo{,_illop} macros.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
4646e43803
target: e2k: Add tlb_fill handler.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
8143c8c7e8
target: e2k: Clear registers in new allocated range of window.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
4a13be8f68
target: e2k: Fix incorrect registers view in gdb after exception.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
8cac70df0e
target: e2k: Fix gdb run till exit from func.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
d402c52f4a
target: e2k: %cr0 must hold pregs and ip of previous procedure.
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
5b444c9356
target: e2k: Add dbl window modifier.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
381868f71a
target: e2k: Return aligned pointer from getsp.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
83e2503867
target: e2k: HACK: Add stack for USD registers.
...
CPU must restore `USD` after calls but I don't know how it should be implemented.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
bd027ff219
target: e2k: Force ps pop in FX mode.
2022-06-10 11:48:15 +03:00
Denis Drakhnia
4a572f8263
target: e2k: Add xregs.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
a19227acd9
target: e2k: Log msg if wd.fx is setted.
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
a357666e69
target: e2k: Log msg if dbl is setted.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
db10b6d8a4
target: e2k: Reorg reg file.
2022-06-10 11:48:13 +03:00
Denis Drakhnia
a008c8d102
target: e2k: Add registers tags.
2022-06-10 11:48:13 +03:00