12 October 2009, 19:05 | #1 |
Registered User
Join Date: Jun 2009
Location: Germany
Posts: 77
|
QEMU TCG as JIT replacement?
Since Bernie seems to have left the Amiga development scene and nobody else wants to touch the current JIT implementation (which is getting in the way of cool new things like 64bit and MMU support) maybe it's time to look for a replacement.
Since IBM (my employer) bought out Transitive (responsible for the Rosetta PPC emulation in MacOS X) I thought I might ask one of these blokes if he's willing to look into writing a replacement. Turns out that this wouldn't be the best idea since the risk of IBM IP trickling into UAE would be too high. But one of our former KVM developers pointed me to the Tiny Code Generator that's part of QEMU. In his opinion that's the most capable Open Source dynamic recompiler available today. It already seems to support m68k as a target platform, too. So maybe this is something worth looking into. |
12 October 2009, 21:57 | #2 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
EDIT: removed bug report
Last edited by Leffmann; 12 October 2009 at 22:25. |
13 October 2009, 14:38 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,602
|
I am not interested in JIT. (debug some intel asm code generator = no thanks)
I might be interested if someone else does some checking first, I am not going to waste time for something if it will be totally incompatible.. |
13 October 2009, 23:45 | #5 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
What parts belong to JIT exactly? Would you have to reimplement the functions in compemu.h, or do something else? (There's not much documentation in the code )
I am just curious. |
14 October 2009, 21:20 | #6 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,602
|
Reimplementation or "API" change isn't important. It is only a some boring programming.
Supported features in JIT engine are important. Is it really made for emulation? (instead of simulating some "generic" 680x0 CPU) Supervisor mode emulated 100%? Exceptions? (including non-existing opcode exceptions) Support memory "holes"? (Amiga has IO and memory here and there) and so on.. Point is: if it misses some important feature -> I don't want to find it _WHEN_ it is being merged.. |
14 October 2009, 21:33 | #7 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Oh yes, I see. And no. What I really meant was: Which parts of WinUAE's source tree belong to the JIT? Or where does JIT sit exactly?
I am confused by the sourcecode. Since there are no comments, it is hard to get an impression of the overall structure. Right now I am trying to compile the beast, to see what is really going on. |
14 October 2009, 21:41 | #8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,602
|
compemu.c, compemu.fpp.c, compemu_support.c, compstbl.c, compemu_optimizer_x86.c, compemu_raw_x86.c, JIT CPU loop in newcpu.c, events_jit.h
I guess thats it, more or less.. |
15 October 2009, 07:07 | #9 |
Registered User
Join Date: Jun 2009
Location: Germany
Posts: 77
|
Well - right now it's made to run (Linux) binaries targeted at any of the supported target CPUs on any of the supported host CPUs.
In terms of target CPU it's optimized for Coldfire targets right now so I have no idea if the support is complete enough for older m68k CPUs. Here's the list with the supported CPUs: http://www.qemu.org/status.html |
15 October 2009, 08:27 | #10 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,602
|
Quote:
|
|
15 October 2009, 15:14 | #11 |
Registered User
Join Date: Jun 2009
Location: Germany
Posts: 77
|
TCG ist used for all the supported QEMU targets right now. I successfully booted the Coldfire test kernel that is available from the download page.
EDIT: There doesn't seem to be any MMU emulation yet, though: Code:
# cat cpuinfo CPU: COLDFIRE(m520x) MMU: none FPU: none Clocking: 208.8MHz BogoMips: 139.26 Calibration: 69632000 loops |
15 October 2009, 16:47 | #12 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,602
|
Quote:
This was the point in my previous post. Hard facts or don't bother. Last edited by Toni Wilen; 15 October 2009 at 16:52. |
|
15 October 2009, 22:05 | #13 |
Registered User
Join Date: Jun 2009
Location: Germany
Posts: 77
|
I'm not exactly familiar with the file organization of QEMU but in the 0.11.0 source archive there's a folder called target-m68k that seems to hold the majority of the 68k code. There's also m68k-dis.c and m68k-semi.c in the archive root.
The hw folder contains dummy_m68k.c, mcf5206.c and mcf5208.c which seem to be related to Coldfire full system emulation. Elbox used the MCF5475 on their Dragon card. In their FAQ they stated that the MCF54xx line were the first Coldfire CPUs compatible enough for Amiga use. |
16 October 2009, 08:45 | #14 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,602
|
There are no Coldfire CPUs that are transparently compatible with Amiga OS. It is impossible.
I checked QEMU sources yet again: it is Coldfire emulation with some 680x0 features added but not all 680x0 features are implemented (USP, FSAVE, FRESTORE, most MOVEC to/from special registers etc..) -> Unusable for Amiga emulation. |
16 October 2009, 10:28 | #15 | ||
Registered User
Join Date: Jun 2009
Location: Germany
Posts: 77
|
Quote:
Quote:
|
||
16 October 2009, 10:37 | #16 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,602
|
Patching/trapping, like 680x0.library does with missing FPU instructions. (and I am sure not all instructions can be patched on the fly because they don't cause exceptions)
Anyway, we are talking about 680x0 EMULATION. No more talk about Coldfire stuff or "something that looks like 68020", maybe. I repeat: facts only. |
31 October 2009, 21:33 | #18 |
Registered User
Join Date: Aug 2006
Location: Augusta, Georgia, USA
Posts: 558
|
Can you build a version of WinUAE that doesn't have JIT and be able to target x64, etc? Would that improve anything over the x86 version?
|
13 October 2013, 16:16 | #19 |
Registered User
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 424
|
Maybe the GCCJIT (http://gcc.gnu.org/ml/gcc-patches/2013-10/msg00228.html) is a proper way to go? One JIT engine, support for several host CPU architectures, no worrying about x86 mess in *UAE...
|
15 October 2013, 15:34 | #20 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,917
|
Quote:
MC68k emulated on ARM? Amiga accelerator/emulator on Xilinx Zynq with hybrid mode? Perhaps first (Win)UAE on non Windows. WinUAE is not Windows... When software meet hardware to meet software... |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FS-UAE - Why it have no JIT? | nexusle | support.FS-UAE | 19 | 13 May 2012 13:39 |
JIT error | Thom87 | support.WinUAE | 6 | 05 October 2008 20:38 |
Jit Error | CPC464 | support.WinUAE | 0 | 19 August 2002 12:12 |
JIT problem | Unregistered | support.WinUAE | 0 | 19 July 2002 06:00 |
JIT Emulation | Doozy | support.WinUAE | 2 | 17 January 2002 07:14 |
|
|