Commit Graph

42 Commits

Author SHA1 Message Date
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 9e87995802 e2k: Panic if it was not possible to copy CR to a new thread.
Signed-off-by: Denis Drakhnya <numas13@gmail.com>
2022-06-10 11:48:19 +03:00
Denis Drakhnia 62637ca653 e2k: Add systrace print for access_hw_stacks.
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 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 5cb3b40f2d e2k: Set correct NR macro for pread/pwrite. 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 861a2b6fb6 e2k: Init CRs, make gcc happy. 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 0b7f461be7 e2k: Remove pshtp and window base. 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 06df1e9168 e2k: Impl e2k_longjmp2 syscall. 2022-06-10 11:48:16 +03:00
Denis Drakhnia ad6bc687e4 target: e2k: HACK: Tag storage for procedure stack. 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 57b3469cda target: e2k: Impl speculative execution. 2022-06-10 11:48:13 +03:00
Denis Drakhnia 281f6af159 target: e2k: Remove unneeded ip change in syscall. 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 d2646eb82b target: e2k: Update TODO messages. 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 5601f6e45a target: e2k: Reorg wd. 2022-06-10 11:48:13 +03:00
Denis Drakhnia 9105937fd9 target: e2k: Reord pcsp. 2022-06-10 11:48:13 +03:00
Denis Drakhnia ab13f761a2 target: e2k: Reorg psp. 2022-06-10 11:48:13 +03:00
Denis Drakhnia 468277c315 target: e2k: Remove helper unimpl. 2022-06-10 11:48:12 +03:00
Denis Drakhnia 938d78d836 target: e2k: Fix load instrs. 2022-06-10 11:48:12 +03:00
Denis Drakhnia d05841bd16 target: e2k: Fix ct in gdb. 2022-06-10 11:48:12 +03:00
Denis Drakhnia c3e5a53689 target: e2k: Read NR in gdb. 2022-06-10 11:48:12 +03:00
Denis Drakhnia c40cc30f26 target: e2k: Reorg + basic gdb debugging. 2022-06-10 11:48:12 +03:00
Alibek Omarov 9cf42881f6 target: e2k: initial gdb support 2022-06-10 11:48:12 +03:00
Denis Drakhnia ff2d059db8 target: e2k: Add procedure stack. 2022-06-10 11:48:11 +03:00
Denis Drakhnia 2eba228ecb target: e2k: Rotate window registers in syscall. 2022-06-10 11:48:11 +03:00
Denis Drakhnia 0198775b67 target: e2k: Add basic call (without saving regs). 2022-06-10 11:48:11 +03:00
Denis Drakhnia 54feb6fbe3 target: e2k: Fix bugs. 2022-06-10 11:48:11 +03:00
Denis Drakhnia 37acf287ad target: e2k: Impl rotated pregs. 2022-06-10 11:48:11 +03:00
Denis Drakhnia 725d1d5acf target: e2k: Add basic syscall support. 2022-06-10 11:48:11 +03:00
Denis Drakhnia 11c80f0227 target: e2k: Try to impl syscall. 2022-06-10 11:48:11 +03:00
Denis Drakhnia ff5127d36a target: e2k: unpack long instructions. 2022-06-10 11:48:10 +03:00
Alibek Omarov c42af9ff35 disas: import disassmebler from binutils 2022-06-10 11:48:10 +03:00
Alibek Omarov 8c78e941dd target: e2k: add cpu definitions 2022-06-10 11:48:10 +03:00
Alibek Omarov d52c541b62 linux-user: add loading ELFs for e2kg 2022-06-10 11:48:10 +03:00