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
bed634d944
e2k: Use %pfpfr for f32 and f64 operations.
...
%fpcr and %fpsr have been used for the operations but
%pfpfr must be used instead.
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
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
47c93f9dec
e2k: Skip breakpoints into fake kernel address space.
...
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia
3cf004027d
e2k: Increase PCS and PS sizes.
...
Dynamically expanding the stack has not yet been
implemented, but sometimes applications require
larger stacks.
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
26b9e9a1e4
e2k: Impl basic unix signals support.
2022-06-10 11:48:19 +03:00
Denis Drakhnia
8a56f792b7
e2k: Probe AAU read access once per page.
2022-06-10 11:48:18 +03:00
Denis Drakhnia
00502466f2
e2k: Always ignore lock load.
2022-06-10 11:48:18 +03:00
Alibek Omarov
400947bba3
e2k: implement fsqrttd/fxsqrttxx through ignoring what fsqrtid/fxsqrt{i,u}xx does
2022-06-10 11:48:18 +03:00
Denis Drakhnia
65675ac1cf
e2k: Check address before MOVA memory read.
2022-06-10 11:48:18 +03:00
Denis Drakhnia
7c4ff94e5f
e2k: Impl basic init thread support.
2022-06-10 11:48:18 +03:00
Alibek Omarov
f56cad7923
e2k: implement detecting ISA version by ELF flags, throw an error for protected mode and x86 recompiled binaries for now
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
0b7f461be7
e2k: Remove pshtp and window base.
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
d37ee639b1
e2k: Add {u,s}{div,mod}x instrs.
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
60faf17466
target: e2k: HACK: Unlock mem addr forces %MLOCK condition.
2022-06-10 11:48:16 +03:00
Denis Drakhnia
1a52b6054b
target: e2k: Add temps for FX/SIMD ops.
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
Alibek Omarov
ebb2b2485f
target: e2k: add basic fpu instructions
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
4646e43803
target: e2k: Add tlb_fill handler.
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
4a572f8263
target: e2k: Add xregs.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
65ffbc6d30
target: e2k: Reading %ilcr for gdb.
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
31e084720a
target: e2k: Add basic mova{b,h,w,d} impl.
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
Alibek Omarov
df21ab3d70
target: e2k: define CPUs we're testing against, define gdb arch
2022-06-10 11:48:14 +03:00
Denis Drakhnia
7bdf849174
target: e2k: Add clarification to gen_tag funcs.
2022-06-10 11:48:14 +03:00
Denis Drakhnia
683d96b8fa
target: e2k: Partial staa{d,w} implementation.
2022-06-10 11:48:13 +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
Denis Drakhnia
f37d246c90
target: e2k: Make gdb happier.
2022-06-10 11:48:13 +03:00
Denis Drakhnia
2ec66c49c5
target: e2k: Reorg cr1.
2022-06-10 11:48:13 +03:00
Denis Drakhnia
5601f6e45a
target: e2k: Reorg wd.
2022-06-10 11:48:13 +03:00
Denis Drakhnia
dd3aa7283a
target: e2k: Reorg br.
2022-06-10 11:48:13 +03:00
Denis Drakhnia
9105937fd9
target: e2k: Reord pcsp.
2022-06-10 11:48:13 +03:00