• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 10 11 12 13 14 ... 117 Next »

Compiling Win32 ARM64
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Compiling Win32 ARM64
05-14-2018, 08:09 PM (This post was last modified: 05-14-2018, 08:16 PM by Gerdya.)
#29
Gerdya Offline
Junior Member
**
Posts: 20
Threads: 1
Joined: Mar 2018
I am going in circles somehow. Its frustrating.
Issue is the following:

After adding few traces the issue most of the time looks like this:
49:22:350 e:\dolphin-master-org\dolphin\source\core\core\powerpc\jitarm64\jit.cpp:562 D[JIT]: JIT64 PC: 8031cb64 SRR0: 803082a4 SRR1: 00003032 FPSCR: 00000004 MSR: 00003032 LR: 8031cb64 r00: 00000000 r01: 80414450 r02: 80407520 r03: 804145a0 r04: 00000001 r05: 00000000 r06: 804144c0 r07: 80414500 r08: 80414543 r09: 0000c200 r10: 0000c208 r11: 80414688 r12: 802b69c0 r13: 804058e0 r14: 00000000 r15: 00000000 r16: 00000000 r17: 00000000 r18: 00000000 r19: 01000000 r20: 80414540 r21: 80414600 r22: 80414640 r23: cc000000 r24: 804145c0 r25: 00000000 r26: 00000000 r27: 00a00000 r28: 80414580 r29: 80414a04 r30: 00000003 r31: 00000001  
49:22:360 e:\dolphin-master-org\dolphin\source\core\core\memtools.cpp:39 N[JIT]: EXCEPTION: CODE:c0000005  ACCESSTYPE:       0  BADADDRESS:00000002CC005020
49:22:361 e:\dolphin-master-org\dolphin\source\core\core\memtools.cpp:39 N[JIT]: EXCEPTION: CODE:c0000005  ACCESSTYPE:       1  BADADDRESS:00000002CC005020
49:22:371 e:\dolphin-master-org\dolphin\source\core\core\memtools.cpp:39 N[JIT]: EXCEPTION: CODE:c0000005  ACCESSTYPE:       0  BADADDRESS:00000002CC005022
49:22:372 e:\dolphin-master-org\dolphin\source\core\core\memtools.cpp:39 N[JIT]: EXCEPTION: CODE:c0000005  ACCESSTYPE:       1  BADADDRESS:00000002CC005022
49:22:381 e:\dolphin-master-org\dolphin\source\core\core\memtools.cpp:39 N[JIT]: EXCEPTION: CODE:c0000005  ACCESSTYPE:       8  BADADDRESS:FFFFFE9261370000

The last line tell us, that we are at an invalid PC location (ACCESS_TYPE=8). Up till then everything looks ok. Issue is, its not deterministic. If i am looking at the logfile, sometimes it works only 800 lines, one run later it might work for 1500 lines - so its extremely hard to catch with the debugger.

I did catch the issue with the debugger once. Reason was wrong trampoline for the fault handler.

00000217`8e0349f0 a9bf47fe stp         lr,xip1,[sp,#-0x10]!
00000217`8e0349f4 2a1903e0 mov         w0,w25
00000217`8e0349f8 d28cd91e mov         lr,#0x66C8
00000217`8e0349fc f2a1e55e movk        lr,#0xF2A lsl #0x10
00000217`8e034a00 f2cffefe movk        lr,#0x7FF7 lsl #0x20
00000217`8e034a04 d63f03c0 blr         lr
00000217`8e034a08 a8c17bf1 ldp         xip1,lr,[sp],#0x10     <<<<<< different pair order than store
00000217`8e034a0c d65f03c0 ret         lr

Issue was that the order registers put on the stack are different order than they were restored -> which led to PC = 0 after return.

However i did review the generators of the trampolines and i have no explanation how this could have happened. Everything looks ok.
Both ABI_PushRegisters(gprs_to_push) and ABI_PopRegisters(gprs_to_push) should, from what i understand push and pop registers in the very same order. The order is defined by an iterator from common:BitSet<u32>. I do not see how the iterator would iterate over the bitfield in two different orders.

In summary, something goes wrong non-deterministically (it fails at different points). Second observation: from the logs, the PC is set to invalid location right after an exception is handled which sets up a trampoline for device access. Third observation: last  valid exception is almost always a write operation. Fourth observation: i could in one case root-cause the issue with a wrong trampoline (see above) but i cannot explain how this wrong trampoline could be generated wrongly.

I appreciate any ideas on how to go on from here.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Compiling Win32 ARM64 - Gerdya - 03-26-2018, 12:41 AM
RE: Compiling Win32 ARM64 - JosJuice - 03-26-2018, 01:22 AM
RE: Compiling Win32 ARM64 - Gerdya - 03-26-2018, 03:21 AM
RE: Compiling Win32 ARM64 - JosJuice - 03-26-2018, 03:38 AM
RE: Compiling Win32 ARM64 - Gerdya - 03-26-2018, 04:44 AM
RE: Compiling Win32 ARM64 - Gerdya - 03-26-2018, 05:42 AM
RE: Compiling Win32 ARM64 - degasus - 03-27-2018, 03:46 AM
RE: Compiling Win32 ARM64 - Gerdya - 03-28-2018, 06:29 AM
RE: Compiling Win32 ARM64 - mbc07 - 03-26-2018, 03:29 PM
RE: Compiling Win32 ARM64 - degasus - 03-27-2018, 09:43 PM
RE: Compiling Win32 ARM64 - Gerdya - 03-29-2018, 02:24 AM
RE: Compiling Win32 ARM64 - degasus - 03-29-2018, 05:08 PM
RE: Compiling Win32 ARM64 - Gerdya - 03-29-2018, 08:24 PM
RE: Compiling Win32 ARM64 - degasus - 03-29-2018, 08:39 PM
RE: Compiling Win32 ARM64 - gilius - 04-02-2018, 06:56 AM
RE: Compiling Win32 ARM64 - Nintonito - 04-17-2018, 08:22 AM
RE: Compiling Win32 ARM64 - Gerdya - 04-24-2018, 04:27 AM
RE: Compiling Win32 ARM64 - degasus - 04-24-2018, 06:05 AM
RE: Compiling Win32 ARM64 - Gerdya - 04-24-2018, 06:29 AM
RE: Compiling Win32 ARM64 - degasus - 04-24-2018, 06:32 AM
RE: Compiling Win32 ARM64 - Gerdya - 04-24-2018, 08:12 AM
RE: Compiling Win32 ARM64 - JonnyH - 04-24-2018, 09:05 AM
RE: Compiling Win32 ARM64 - Gerdya - 04-24-2018, 10:32 AM
RE: Compiling Win32 ARM64 - degasus - 04-25-2018, 07:39 AM
RE: Compiling Win32 ARM64 - Gerdya - 05-02-2018, 04:20 AM
RE: Compiling Win32 ARM64 - degasus - 05-02-2018, 05:18 AM
RE: Compiling Win32 ARM64 - Gerdya - 05-02-2018, 08:21 AM
RE: Compiling Win32 ARM64 - degasus - 05-02-2018, 03:35 PM
RE: Compiling Win32 ARM64 - Gerdya - 05-14-2018, 08:09 PM
RE: Compiling Win32 ARM64 - degasus - 05-14-2018, 08:24 PM
RE: Compiling Win32 ARM64 - Gerdya - 05-15-2018, 03:04 AM
RE: Compiling Win32 ARM64 - Gerdya - 07-16-2018, 03:45 AM
RE: Compiling Win32 ARM64 - JMC47 - 07-16-2018, 08:05 AM
RE: Compiling Win32 ARM64 - degasus - 07-16-2018, 05:20 PM
RE: Compiling Win32 ARM64 - Gerdya - 07-17-2018, 08:03 AM
RE: Compiling Win32 ARM64 - Helios - 07-17-2018, 08:42 AM
RE: Compiling Win32 ARM64 - Gerdya - 12-01-2019, 11:55 PM
RE: Compiling Win32 ARM64 - MayImilae - 12-02-2019, 12:24 AM
RE: Compiling Win32 ARM64 - Gerdya - 12-02-2019, 02:51 AM
RE: Compiling Win32 ARM64 - dampflokfreund - 12-02-2019, 06:53 AM
RE: Compiling Win32 ARM64 - Gerdya - 12-02-2019, 08:16 AM
RE: Compiling Win32 ARM64 - MayImilae - 12-02-2019, 08:54 AM
RE: Compiling Win32 ARM64 - dampflokfreund - 12-12-2019, 10:46 PM
RE: Compiling Win32 ARM64 - Overhaul - 02-02-2020, 04:30 PM
RE: Compiling Win32 ARM64 - degasus - 02-04-2020, 01:22 AM
RE: Compiling Win32 ARM64 - Overhaul - 02-04-2020, 05:58 PM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode