25 September 2015, 01:40 | #41 | |
Registered User
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 466
|
Works now. I should have sent you the test-hdf earlier, and not making stupid debug attempts. Next time I'll do.
It also looks like some of your changes fixed the precision problem/difference I mentioned earlier. No differences in the wave forms visible anymore. But I'm curious... Was it the change that caused the crash in the 64bit version? Anyway... Finding more non-working example applications which use rarely used FPU functions/features sounds like finding the needle in the haystack. But I don't give up! Quote:
|
|
25 September 2015, 09:58 | #42 |
Registered User
Join Date: Jul 2004
Location: Germany
Posts: 105
|
@Frode You are such a genius. This is your ultimately entry in the hall of fame. I'm looking forward to get your new development build.
|
25 September 2015, 10:06 | #43 | |
Registered User
Join Date: Apr 2012
Location: germany
Posts: 139
|
Quote:
So if you get a error in winuaeenforcer(or you look in gdb what PC value is, when uae crash) this show the last block that is exectute from JIT . the real error is then later in the code. For example 68k code contain this $1000 addq #1,d0 $1002 dbf d1,$980 $1006 wrong instruction ............................... $1020 bne $1010 Then the 1. JIT block range from $980 upto $1006-1 second JIT block range from $1006 upto $1010-1 third JIT block range from $1010 upto $1020-1 the reason wy JIT code generation always do 1 loop with interpreter is, because it can not know that $1010 should be start of a block. JIT only notice because of backjump at $1020 (bne $1010) that $1010 need start of block. so there is always 1 loop need that do with interpreter now when the JIT code reach $1006 it crashes and maybe winuaeenforcer do a output, because of wrong address. But because the PC is not exact(because code is before execute with interpreter), you need look what is done before in this block or look at the next block. so you need only look at 68k code of JIT block1 and JIT block2. If know this, then winuaeenforcer is very usefull and help find problems faster Last edited by bernd roesch; 25 September 2015 at 10:17. |
|
25 September 2015, 13:37 | #44 |
Registered User
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 466
|
Cybercinematastic by Loonies
Crash at the end of the demo log: Code:
JIT: Fault address is 0x7c295bea at PC=0x423817ac JIT: Can't handle access PC=0x423817ac! JIT: Instruction bytes 67 45 8a a3 00 00 00 50 67 44 |
25 September 2015, 16:49 | #45 | ||
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Quote:
Quote:
Code:
67 45 8a a3 00 00 00 mov r12b,BYTE PTR [r11d+0x50000000] FS-UAE crashes because there isn't anything at location 0x7c295bea. We can easily calculate the (Amiga) address the demo tries to access: Code:
0x7c295bea - 0x50000000 = 0x2c295bea On a real hardware, nothing will crash (by itself) when the demo reads from non-existing memory. -And in FS-UAE, normally, this should be handled by the access fault handler. The problem (and the cause of the crash) is that the access handler does not understand this *specific* x86-64 instruction, and thus cannot figure out how to handle it. The fix is to extend the instruction decoder in the access fault handler to understand mov instructions related to all the (new) x86-64 registers (It would have worked if JIT had chosen one of the original x86 registers instead of a "new" x86-64 register). I'll probably borrow some code from the ARAnyM project, as it looks like they have implemented a much more complete instruction decoder for x86-64 But with this knowledge, we can also speculate about a couple of workarounds (both should work) until I have fixed the instruction decoder: 1. Make sure valid memory is available in this location. For example, to make sure we have Zorro III memory from 0x10000000 to 0x30000000 (containing the location 0x2c295bea): Code:
zorro-iii-memory = 512M uae-z3mapping = uae (Don't worry, I will not write an "essay" for every new discovered problem ) Anyway, thanks, this will be a good use for testing the new instruction decoder once I've implemented it! Last edited by FrodeSolheim; 26 September 2015 at 14:16. |
||
26 September 2015, 01:38 | #46 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
I ended up writing proper support for REX / x86-64 extended register usage myself (ARAnyM instruction decoder was a bit overkill), and I have pushed the code to github
(This fixes the "Cybercinematastic by Loonies" demo) I expect to release 2.7.1dev tomorrow, unless some showstopper appears! Last edited by FrodeSolheim; 26 September 2015 at 01:59. |
26 September 2015, 01:52 | #47 |
Registered User
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 466
|
Perhaps another showstopper:
https://files.scene.org/view/parties...o/ahonen_d.zip Code:
JIT: Fault address is 0xdb0a5f84 at PC=0x40dd48c7 JIT: Can't handle access PC=0x40dd48c7! JIT: Instruction bytes 67 45 8b 9a 00 00 00 50 41 0f |
26 September 2015, 01:53 | #48 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
@jbl007 looks like a similar problem (except write instead of read, and another address, and slightly different registers), probably fixed by the latest commit (?)
Last edited by FrodeSolheim; 26 September 2015 at 01:59. |
26 September 2015, 01:54 | #49 |
Registered User
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 466
|
Compiling... Please wait.
Edit: It works! :-) Last edited by jbl007; 26 September 2015 at 02:02. Reason: because it works... |
26 September 2015, 13:57 | #50 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
FS-UAE 2.7.1dev is now available with x86-64 JIT updates, and 64-bit builds for Windows, OS X and SteamOS
I haven't had time to test the new (64-bit) packages any much, so there could be issues with these. Please report in the development series thread if you experience issues which has nothing to do with the x86-64 JIT compiler. EDIT: I forgot to enable FPU JIT by default in FS-UAE 2.7.1dev. You are now encouraged to use uae_compfpu = 1 to test with the FPU JIT enabled. It something fails, please test without too and report your findings. Great Last edited by FrodeSolheim; 26 September 2015 at 14:07. |
26 September 2015, 22:22 | #51 |
Registered User
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 424
|
On 2.7.1dev I have found yet another 1024M related crash, this time certainly related to JIT (unfortunately, I don't have the environment to test it on a 32-bit build), and with much more complex configuration - config + logs in the attachment.
|
26 September 2015, 22:49 | #52 | |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Quote:
I'll debug a little more to be sure, but it certainly has something do with memory allocations getting shuffled around due to the uaegfx board. |
|
26 September 2015, 23:59 | #53 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
The crash happens when there is no room for the RTG memory within the reserved memory region (and right now, the code handles this in a way which guarantees a crash...)
The problem is that you have allocated an 2 GB address space, and using the A4000/PPC model forces Z3 "real mapping", which leaves only 1 GB available for Zorro III devices. Since you are using up all that space for RAM, there is no room the the RTG card (and the aforementioned crash happens). I'll think about how to best handle this (or perhaps Toni will), but for now, let's just call this a "feature" ;-) (You can see that this is the same crash as Toni refers too, by replacing 256M with 1GB due to Z3 real mapping, and 1.5G Z3 RAM with 1.0G). |
27 September 2015, 12:44 | #54 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
I would be happy with solution that removes the crash, even halting the emulation ("memory config is impossible, can't continue") would be fine. |
|
27 September 2015, 13:21 | #55 | |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Quote:
It isn't possible to allow this to work with JIT direct memory, but one possible solution (for this specific case at least) is to allocate RTG memory somewhere else (non-contiguous) when it does not fit into the contiguous memory region. jit_direct_compatible_memory is already false, so canbang will be set to false as well, which means that JIT memory access will look up address bank offsets from the memory bank structures (kind of semi-direct memory access) -and this does not require contiguous host memory. (Of course, there could still be issues with Amiga-side software not dealing with > 0x80000000 pointers properly) Last edited by FrodeSolheim; 27 September 2015 at 14:15. |
|
27 September 2015, 14:49 | #56 |
Registered User
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 424
|
If so, then I am not sure if it is a good idea to allow such a configuration - at least I prefer to have less memory available and a stable system.
|
27 September 2015, 14:55 | #57 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
Quote:
You can have exact same situation using real hardware. It must be possible to configure it in emulation too. For example if someone wants to debug what and how it goes wrong, much easier when using emulation. |
||
13 October 2015, 00:32 | #58 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Several 64-bit JIT related fixes have been pushed to https://github.com/FrodeSolheim/fs-uae (Some of them only related to Windows).
Includes fix for crashes when using Blizzard CPU boards and JIT. Windows 64-bit JIT bugs fixed include: - Rounding errors in the JIT FPU. - Crashes due to not presering RDI and RSI registers correctly for Windows x86-64. - Crashes due to missing shadow stack space for register parameters on Windows x86-64. Btw, I haven't done anything with this particular issue yet (and not really JIT-related either). Just mentioning it so people don't think it has been fixed. |
13 October 2015, 12:30 | #59 | |
Registered User
Join Date: Aug 2006
Location: Italy
Posts: 109
|
Quote:
|
|
13 October 2015, 23:36 | #60 | |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Quote:
- Additional work to complete ARM JIT for UAE. - Additional work to adapt FS-UAE to Android. So the answer is yes, provided that a skilled developer can spend a lot of time on it |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
It seem the JIT direct mode is not work in fs-uae. direct mode is important | bernd roesch | support.FS-UAE | 27 | 20 September 2015 21:44 |
E-UAE PowerPC JIT v1.0.0 is here! | Puni/Void | Amiga scene | 0 | 02 January 2015 19:51 |
Question about the possibility of JIT in FS-UAE under Windows | SaphirJD | support.FS-UAE | 4 | 20 December 2013 22:08 |
FS-UAE - Why it have no JIT? | nexusle | support.FS-UAE | 19 | 13 May 2012 13:39 |
JIT on E-UAE PPC? | _ThEcRoW | support.OtherUAE | 8 | 06 May 2011 23:55 |
|
|