Language…
13 users online: CalHal, crocodileman94,  Deeke, dubiousdinobot, Dzing, fanfan21, Hammerer, isaix, MegacesarCG, sheeptitan,  shovda, TheBourgyman, Ziz - Guests: 281 - Bots: 310
Users: 64,795 (2,378 active)
Latest user: mathew

xkas/asar backend for LLVM (most likely a pipe dream)

LLVM is a language-independent compiler infrastructure. It has backends for various architectures, including, but not limited to, ARM, x86, MIPS, PIC16 (at one time), Nvidia's CUDA, the C language (which was removed for being ill maintained, but then revived as a fork), Javascript, Java bytecode (hasn't been updated in a while), the .NET Framework (or so I heard), etc.

It has its own C-family frontend called "Clang", with performance being the same, or maybe even more, with GCC in most cases nowadays.

It's easy to develop a backend for it to target new architectures, so maybe one can be develop for this assembler to make things easier to develop hacks?

This could be a pipe dream though - While I'm thinking of experimenting with making a pipe dream when I have the experience, I might not do it now. And I know that I shouldn't just expect you guys to start creating one.
What advantages would using llvm have over what we currently do? Can llvm be a patching assembler?
Well, if an xkas/asar backend were to be made for it, you can use languages other than assembly to program your games (like C or C++), which may or may not make it easier to make sprites/blocks/patches/etc. (provided that an API is made) and/or your code easier to read.

It's also designed with optimizing the coding to get as much performance as possible, both with it's Immediate Representation, and (if implemented) the assembly coding itself.

As I said, I don't expect you guys to just make one. This is just an idea.
There are c compilers into 65816, but there's a problem. The 65816 is a 2.6(?) Mhz processor with only 2 general purpose registers. Writing an efficient compiler on such a weak system is really quite difficult, there's a reason why they used plain assembly back in the day.
Considering it has/had backends for C, Javascript (both are high level languages), Java bytecode (a completely stack-based Virtual Machine with NO registers), the PIC16 (the architecture which, admittedly, has 8bit registers, along with other constraints, yet an experimental build allowed code to be compiled to that), and even Notch's DCPU-16 (An computer architecture made for his upcoming game 0x10c with the backstory explaining that it's supposed to be from the 1980's era of computing), I'd say it's certainly possible.

The fact that the ASM language itself has only 2 general purpose registers is not a problem (after all, x86, the machine language of most 32-bit personal computers, has 3 general purpose registers).

There's also apparently a version of LLVM with a backend targeting the aging 8bit Zilog Z80 CPU (the original gameboy and the gameboy color uses a variant of this CPU). This appears to be under active development.

The presence of this backend proves that it's certainly possible to create a LLVM backend for the SNES, despite the troubles that one might encounter in making one.
bringing this thread back from the dead coz I'm currently toying around with this idea as well. Does anyone know of any developments in the last year?
It's an interesting idea, but I don't know how much utility it really has for us. 65816 asm is really not that difficult to learn. Regardless, if you want to pursue it, this could end up with a very neat result. I don't personally know of any LLVM developments since the last post here, but here is the github repo for the z80 llvm backend. Might be worth your time to take a look at how that's set up.