English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 18 February 2017, 03:49   #21
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
looks like someone is working on clang/llvm for aros, there seems to be some preparational commits, but i havent seen it commited itself. propbably would need further patches though to produce amiga-m68k code.
wawa is offline  
Old 18 February 2017, 04:01   #22
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
By patches I assume you mean an entire backend. A backend in LLVM is a third of the compiler.
Samurai_Crow is offline  
Old 18 February 2017, 14:46   #23
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
im completely unfamiliar with the subject matter. i simply noticed someone made some preparatory commits to the aros repo (mschulz?) which might indicate that he may experiment with llvm locally.

i understand that you have been working on a 68k backend but it has never become actually usable, or simply none used it. given that aros would receive llvm backend (for contemporary platforms) perhaps some adoptation for amiga-m68k backend might be made, based on your experience. even if it seems unlikely. if it would practically mean to write a backend from the scratch, then its plain impossible of course.
wawa is offline  
Old 18 February 2017, 15:39   #24
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
It's not impossible but the backend in my repo is incomplete. The work on AROS is for Mac hosted and uses an x86.
Samurai_Crow is offline  
Old 18 February 2017, 17:55   #25
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by Samurai_Crow View Post
It's not impossible but the backend in my repo is incomplete. The work on AROS is for Mac hosted and uses an x86.
it looks like schulz uses a mac as well, he commited some patch(es) for osx hosted, but it doesnt make so much difference to linux hosted i guess, the host is anyway x86 no matter what i guess. so maybe the effort could be bundled if you dag up your sources and teamed up with him.

just kidding
wawa is offline  
Old 20 February 2017, 22:30   #26
ardi
 
Posts: n/a
Quote:
Originally Posted by Samurai_Crow View Post
Backend code for LLVM requires knowledge of how to implement the IR in native code. From there, you would have to implement the peephole optimization yourself.

The reason that the backend in my GitHub repo has languished is that it is based on a very old version of LLVM and merging it with current code would be an ordeal in itself.
Do you remember what clang version it was for? BTW, is that hard to maintain backends across LLVM versions? I thought the LLVM design was done with ease of maintenance in mind...

Also, do you have any list of what things were done and what things were pending?
 
Old 21 February 2017, 00:01   #27
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
Quote:
Originally Posted by ardi View Post
Do you remember what clang version it was for? BTW, is that hard to maintain backends across LLVM versions? I thought the LLVM design was done with ease of maintenance in mind...

Also, do you have any list of what things were done and what things were pending?
It's version 3.2. GetElementPtr still not implemented and C runtime library needs to borrow from GCC.

GetElementPtr is the equivalent of all the non-register addressing modes but can probably be implemented as LEA during the earlier stages and just merged later when the needed addressing mode is available and the pointer is used once.
Samurai_Crow is offline  
Old 21 February 2017, 21:56   #28
ardi
 
Posts: n/a
Quote:
Originally Posted by Samurai_Crow View Post
Backend code for LLVM requires knowledge of how to implement the IR in native code. From there, you would have to implement the peephole optimization yourself.

The reason that the backend in my GitHub repo has languished is that it is based on a very old version of LLVM and merging it with current code would be an ordeal in itself.
I just saw there's another fork, with one commit from last September. The commit adds new code, but I'm not sure if it can be considered more complete than yours, or the opposite: https://github.com/mntmn/llvm-m68k
 
Old 22 February 2017, 01:41   #29
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
I think mntmn's is ahead but I still only saw the build script was modified and the readme.txt file.
Samurai_Crow is offline  
Old 22 February 2017, 01:55   #30
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by Samurai_Crow View Post
I think mntmn's is ahead but I still only saw the build script was modified and the readme.txt file.
lukas is trying to build 68k backend? he never mentioned it publicly to my knowledege.

im sorry there isnt some place where all these projects might gather and help each other rather than being spread all over the place to almost no awareness of others.

edit: äh, its for a mac, could be helpful though but only with joined forces, looks like he lost interest in favour of an amiga project.

Last edited by wawa; 22 February 2017 at 02:07.
wawa is offline  
Old 22 February 2017, 04:55   #31
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
Quote:
Originally Posted by wawa View Post
lukas is trying to build 68k backend? he never mentioned it publicly to my knowledege.

im sorry there isnt some place where all these projects might gather and help each other rather than being spread all over the place to almost no awareness of others.

edit: äh, its for a mac, could be helpful though but only with joined forces, looks like he lost interest in favour of an amiga project.
The readme.txt file indicates it is for AmigaOS 3.
Samurai_Crow is offline  
Old 22 December 2020, 20:10   #32
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,311
Resurrecting this thread. Seems to be some activity on LLVM (Sept 2020). Looks like the devs are trying again to merge their changes into the main branch.

https://www.phoronix.com/scan.php?pa...00-Series-2020
(6800 is a typo)

https://lists.llvm.org/pipermail/llv...er/145320.html

https://github.com/M680x0/M680x0-mono-repo
nogginthenog is offline  
Old 22 December 2020, 20:19   #33
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
Even if it is for Debian 68k, having LLVM would be a good stepping-stone for Rust and WebAssembly on our machines.
Samurai_Crow is offline  
Old 09 March 2021, 18:40   #34
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,311
Update: LLVM 68k has been merged upstream. This is pretty good news. Congrats to the authors.
It's marked as experimental right now.

Last edited by nogginthenog; 09 March 2021 at 18:40. Reason: formatting
nogginthenog is offline  
Old 10 March 2021, 19:21   #35
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,311
Got it to compile (VM needed more swap lol) but can't build anything with clang due to missing functionality. Maybe I jumped the gun. I'll report back if I get further.
nogginthenog is offline  
Old 02 May 2021, 17:47   #36
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,311
There was a recent push that fixed the error I was getting. Now I can compile code (020+ seems broken).

Code:
int func1();
int func2(int x);

void main()
{
    func2(func1() * 16);
    func2(func1() * 3);
}
clang -O3 -fomit-frame-pointer -target m68k -S test.c

Code:
main:                                   ; @main
        sub.l   #4, %sp
        jsr     func1
        lsl.l   #4, %d0
        move.l  %d0, (%sp)
        jsr     func2

        jsr     func1
        move.l  %d0, %d1
        lsl.l   #1, %d1
        add.l   %d0, %d1
        move.l  %d1, (%sp)
        jsr     func2
        add.l   #4, %sp
        rts
Could be worse! The GCC protos don't work so I can't compile any OS calls. Didn't spend much time on this.
nogginthenog is offline  
Old 31 October 2023, 20:23   #37
cbmuser
Registered User
 
Join Date: Oct 2023
Location: Berlin, Germany
Posts: 1
Funding for the LLVM M68k backend

Hello!

I'm a long time Amiga user and new to this forum. I have been hanging around mostly at amiga.org and a1k.org.

Having said that, I am Debian's primary maintainer of the m68k port and the person who initiated both the conversion of the m68k GCC backend from CC0 to MODE_CC [1] and therefore saving it from being dropped as well as the effort to add an m68k backend to LLVM [2]. I am myself not a compiler expert, so the work on the backend is done by two young LLVM developers in the US [3] and Taiwan [4].

The initial work for adding the backend was funded by a Bountysource campaign while the current maintenance and continued development is being funded with the help of Patreon [5] and OpenCollective [6]. Funding helps keep both developers motivated to work on the backend since the m68k is not their primary area of interest while the necessary time and effort cannot be underestimated.

Since there seems to be some interested at EAB in the M68k LLVM backend, I was wondering whether anyone here would be willing to support the project with a regular or one-time donation via the Patreon or Open Collective pages.

I am not personally getting any of the money from these two funding pages, all of the money goes to the two LLVM developers. I am actually myself supporting the project with a monthly donation of 10 Euros via Patreon.

For more information, please have a look at the project homepage [7] as well as the LLVM issue [8] and pull request [9] pages which show what is currently being worked on in the backend.

Also, if you prefer talking over IRC, there is a project-related chat at #llvm-m68k on OFTC IRC.

Let me know if you have any questions or comments.

Adrian

> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91851
> [2] https://github.com/M680x0/M680x0-llvm/issues/59
> [3] https://github.com/mshockwave
> [4] https://github.com/0x59616e
> [5] https://www.patreon.com/m68k_llvm
> [6] https://opencollective.com/m68k-llvm-dev
> [7] https://m680x0.github.io
> [8] https://github.com/llvm/llvm-project...is%3Aopen+m68k
> [9] https://github.com/llvm/llvm-project...is%3Aopen+m68k
cbmuser is offline  
Old 31 October 2023, 21:48   #38
E-Penguin
Banana
 
E-Penguin's Avatar
 
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,214
I do like a fully referenced article in IEEE citation style.
E-Penguin is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I get the Progress.gadget from? Tony Landais request.Apps 6 16 December 2015 19:16
Work in progress. Cowcat Coders. General 7 18 February 2014 22:33
My A500+ progress so far. Mogsy Hardware pics 16 02 March 2013 09:20
My A1200 progress ck1200 Hardware mods 19 07 October 2010 18:29

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:56.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.20677 seconds with 15 queries