21 May 2015, 21:19 | #101 |
Amigan
Join Date: Feb 2012
Location: London
Posts: 1,311
|
Example of failure:
test2.c Code:
int myfunc() { return 0; } void test() { int x = myfunc(); } (no O2 this time) ./llvm-m68k/build/bin/llc -march=m68k test2.ll Code:
Not Implemented UNREACHABLE executed at /home/paul/llvm-m68k/include/llvm/Target/TargetLowering.h:1376! 0 llc 0x00000000014fa902 1 llc 0x00000000014fa5d8 2 libpthread.so.0 0x00007f26764ae0a0 3 libc.so.6 0x00007f26759a7165 gsignal + 53 4 libc.so.6 0x00007f26759aa3e0 abort + 384 5 llc 0x00000000014c862b 6 llc 0x0000000000a3f612 7 llc 0x0000000000e7cb64 llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const + 2490 8 llc 0x0000000000e76176 llvm::SelectionDAGBuilder::LowerCallTo(llvm::ImmutableCallSite, llvm::SDValue, bool, llvm::MachineBasicBlock*) + 2638 9 llc 0x0000000000e77f79 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) + 2183 10 llc 0x0000000000e4e0a8 llvm::SelectionDAGBuilder::visit(unsigned int, llvm::User const&) + 1232 11 llc 0x0000000000e4db3a llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 128 12 llc 0x0000000000e9c244 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 68 13 llc 0x0000000000e9f083 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2873 14 llc 0x0000000000e9b756 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 864 15 llc 0x0000000000a3dc73 16 llc 0x000000000103b365 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 95 17 llc 0x000000000140e271 llvm::FPPassManager::runOnFunction(llvm::Function&) + 383 18 llc 0x000000000140e484 llvm::FPPassManager::runOnModule(llvm::Module&) + 102 19 llc 0x000000000140e7ac llvm::MPPassManager::runOnModule(llvm::Module&) + 442 20 llc 0x000000000140ecc4 llvm::PassManagerImpl::run(llvm::Module&) + 120 21 llc 0x000000000140ee77 llvm::PassManager::run(llvm::Module&) + 39 22 llc 0x000000000083b8a3 main + 4244 23 libc.so.6 0x00007f2675993ead __libc_start_main + 253 24 llc 0x000000000083a239 Stack dump: 0. Program arguments: ./llvm-m68k/build/bin/llc -march=m68k test2.ll 1. Running pass 'Function Pass Manager' on module 'test2.ll'. 2. Running pass 'Unnamed pass: implement Pass::getPassName()' on function '@test' Aborted |
22 May 2015, 01:29 | #102 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
I had not seen it. It may be worth forking.
|
22 May 2015, 08:37 | #103 | |
Banned
Join Date: May 2015
Location: Australia
Posts: 67
|
Quote:
|
|
22 May 2015, 20:29 | #104 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
I've forked the repo for LLVM-68k. Since I'll have to come up with a custom calling convention to access the Amiga operating system and libraries, it would likely be a divergent fork of the original anyway. Unfortunately it is a stale source that is 3 years behind the trunk so I may need to get hopping if I ever get it working at all. I'll email an Amiga friend with some LLVM experience and see what happens.
|
22 May 2015, 21:58 | #105 | |
Amigan
Join Date: Feb 2012
Location: London
Posts: 1,311
|
Quote:
From my limited tests this did produce code that looked a little better than GCC 2.95. But the lack of function calls is somewhat limiting... |
|
23 May 2015, 16:26 | #106 |
BoingBagged
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
|
|
23 May 2015, 19:51 | #107 | |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
Quote:
The link, as you might suspect, is at https://github.com/SamuraiCrow/llvm-m68k but if compilers aren't your strong suit, you might not need commit privileges right away. If you send me your GitHub username, I can add you though. There shouldn't be much need for documentation either since this is just a backend for LLVM 3.2 and most of the documentation you'd need would be found at http://llvm.org/releases/3.2/docs/index.html. The first step after getting it to build as you have already done, will be to get the target triples set to M68k-commodore-amiga instead of M68k-apple-mac. Then add the calling conventions and so on, (including the two custom calling conventions, libcall and acall, for shared library calls and amiga-specific register loading calls respectively). Finally we migrate the code to the latest LLVM stable release and start adding subtargets for 020/030, 040/060, and Apollo softcore optimization. At least it sounds like a plan to me... If anybody else wants to join up, let me know! |
|
28 May 2015, 01:26 | #108 |
Banned
Join Date: May 2015
Location: Australia
Posts: 67
|
I actually thought I had, but couldn't find it when I checked. By chance I still have a copy of the binary, so I'll upload it somewhere.
EAB has a file server (ftp?) somewhere to temporarily host files for this sort of thing doesn't it? I'd prefer not to upload to aminet yet as there's newer versions of DGen (and better sdl versions for 68k) now, so I'd prefer to update it first. I'm not sure when that'll be though, so for now Im still happy to share what I already have, just elsewhere It's built against an old 68k sdl though, which can be flaky at times. Generally though if you set a decent stack first it's pretty good. Probably needs an overclocked '060 (needs rtg too) to be useful though. I vaguely recall someone at the tome saying it was about 5-10fps on an '060@50mhz. I was/am an Amithlon user though, so never used it on my real (nowadays aga only) amiga. |
01 June 2015, 19:40 | #109 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
Sidewinder has emailed me that the LLVM-68k project looks hopeful. He worked on it this past weekend. He also said he wants to merge the code from our earlier attempt at making a 68k AROS backend and bring them collectively up-to-date to the current stable release of LLVM 3.6.1. I hope he can do it (and wonder if I'll be any help to him).
|
03 June 2015, 05:18 | #110 | |
m68k all the way
Join Date: Aug 2011
Location: Koalaland
Posts: 523
|
I have been playing around with AMOS The Creator. It is quite a useful little program, and it comes with some interesting games, including "AMOSteroids" (which is quite different to the version I played before I got my hands on AMOS) and Magic Forest.
Strangely, these are on the "Data" disk, not "Extras" as they should have been. Quote:
He was asking about software for the Amiga, not about its custom chips. |
|
05 June 2015, 14:24 | #111 |
furtling tinkerer
Join Date: Jun 2015
Location: Mouhet France
Posts: 55
|
Another vote for a ssh/scp/sftp client/server. A cmd line tool and a sshd would be great. If it supports tunneling and port forwarding it could open up a myriad of extra possibilities over telnet and ftp.
Just waiting for a avr-net board to turn up to make a plip box then I will probably be adding to the chorus for a newer synergy client too :-) |
19 June 2015, 21:43 | #112 |
Registered User
Join Date: Sep 2013
Location: Ireland
Posts: 800
|
I would also like to see a very crude/lightweight and text only Evernote client.
Sent from my awesome Ubuntu Touch device using the Forum Browser app |
30 June 2015, 16:41 | #113 | |
Registered User
Join Date: Jul 2005
Location: Roma / Italia
Age: 49
Posts: 90
|
Quote:
P.S.: "the guy making the anime CDs for CD32" is me. |
|
03 July 2015, 11:08 | #114 |
Registered User
Join Date: Jul 2015
Location: UK
Posts: 10
|
@Samurai_Crow has there been any progress on the LLVM backend? I've just started looking at updating it to the latest LLVM release and starting work on it myself for use on Atari machines. But if there's active work going on, I'd be happy to collaborate and contribute to your fork.
|
03 July 2015, 17:05 | #115 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
@SainT
My old friend Michael Ness is a compiler specialist and is very interested in updating the LLVM 68k project to the latest stable release as well as adding the necessary Amiga calling conventions for an Amiga version of LLVM. Currently, it is only a fork of an incomplete Classic Mac backend. Mike has just started a new job and hasn't had much time to work on it yet. What I've discussed so far with Mike is regarding making the Clang C++ compiler link in less than 2 Gigs of RAM and eventually self-hosting. The plan that would allow such things to take place will require OOP.library from the AROS kernel to implement LibC++ and only preloading 2 passes in the optimizer. This will allow C++ class instances using a similar style of shared-library linkage to that of the BOOPSI classes used by MUI and ClassAct/ReAct for GUIs except on a slightly more abstract level. Send me a private message with your GitHub ID and I can add you unless you'd rather start your own fork. |
03 July 2015, 17:59 | #116 |
Registered User
Join Date: Jul 2015
Location: UK
Posts: 10
|
Sounds good! My primary goal is for a Jaguar target, which should be pretty straight forward (not having any OS to speak of to integrate with).
|
04 July 2015, 10:09 | #117 | |
Registered User
Join Date: Jul 2015
Location: UK
Posts: 10
|
Quote:
I should get more time to look into this tonight I hope, so any pointers would be appreciated, otherwise I'll just poke things until it works... |
|
04 July 2015, 12:00 | #118 | ||
Amigan
Join Date: Feb 2012
Location: London
Posts: 1,311
|
Quote:
Here are the command I used to build: Quote:
|
||
04 July 2015, 16:28 | #119 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
The current target triple in the source is 68k-apple-macintosh because it needs to be changed. SainT is trying to build the backend within an updated version of LLVM.
The reason any function fails is that the C calling convention is undefined. Lastly, this git package is an indirect fork of LLVM so a merge with the current stable release of 3.6.2 should do the trick. Last edited by Samurai_Crow; 04 July 2015 at 16:41. Reason: Added information |
08 July 2015, 12:46 | #120 |
Registered User
Join Date: Jul 2015
Location: UK
Posts: 10
|
It was actually a bug with LLVM when working with a MSVC debug executable. There was a combination of constructor issues (which were just in the M68k module) and also an uninitialised variable which was causing a crash.
So at least I have the 3.2 version working. I'll have a play and see what is required to add JSR / BSR type instructions and go from there. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is the best C software for Amiga | crosswire | Coders. General | 4 | 21 February 2013 14:41 |
Amiga Future: Amiga Software Database (ASD) Beta 2 Online | AndreasM | News | 0 | 12 January 2009 12:42 |
Amiga Software | madduck | Amiga websites reviews | 4 | 20 October 2002 23:16 |
New/Used Amiga Software | jmmijo | MarketPlace | 0 | 04 April 2002 22:30 |
PC -> Amiga Software | Shagra | request.Apps | 4 | 20 September 2001 23:50 |
|
|