4 ms·
QBE is really interesting, but for people like me who still use 32 bit architectures unfortunately a bit limited. Someone recently pointed me to the Eigen compi
by Rochus 2y ago
QBE is really interesting, but for people like me who still use 32 bit architectures unfortunately a bit limited. Someone recently pointed me to the Eigen compiler kit (see e.g. https://github.com/EigenCompilerSuite/ https://github.com/EigenCompilerSuite/) which - like QBE - is a lean alternative to LLVM, but supports much more architectures than QBE, even some 16 bit ones; since last week also Xtensa (ESP32) is officially supported. It's still beyond me why the Eigen kit, which has been in development for more than ten years, is not more popular.
- snvzz 2y agoECS looks cool, and also supports the 68000. The described ABI seems very incompatible with AmigaOS (a6) although it is likely possible to instruct the compiler to do otherwise. Unfortunately missing in ECS is RISC-V, which QBE supports.
- Rochus 2y ago> Unfortunately missing in ECS is RISC-V, which QBE supports Well, the Tensilica ABI only took a few weeks to implement; so I assume that when enough people ask for a RISC-V backend, there will be one in reasonable time. Personally I consider ESP32 and ARM32 support more useful.
- snvzz 2y ago>Personally I consider ESP32 Sure you don't mean Tensilica i.e. legacy ESP32? Espressif has notably switched to RISC-V.
- Rochus 2y ago> Espressif has notably switched to RISC-V Not really switched; they offer ESP32 models with (so far) single-core RISC-V; I don't think they planned to stop selling the original ESP32 designs (they wouldn't do themselves a favour).
- snvzz 2y ago>Not really switched Yes very much switched. Thoroughly[0]. While obviously only for new chips, years have already passed, and many new chips have been released. Tensilica are now only present in a minority of their offerings. >I don't think they planned to stop selling the original ESP32 designs In this market, having long term availability is important. 0. https://riscv.or.jp/en/2021/02/latest-esp32-includes-risc-v/ https://riscv.or.jp/en/2021/02/latest-esp32-includes-risc-v/
- Rochus 2y ago> While obviously only for new chips, years have already passed Well, in 2022 they upgraded to the L7 cores. > having long term availability is important So they will obviously continue to produce the tensilica models (which they wouldn't if they really "switched"); that's all I (and many other developers) need.
- snvzz 2y agoAlthough unfortunately not open source proper, vbcc[0][1] is interesting. 0. http://www.compilers.de/vbcc.html http://www.compilers.de/vbcc.html 1. https://en.wikipedia.org/wiki/Vbcc https://en.wikipedia.org/wiki/Vbcc
- Rochus 2y agoQBE (and Eigen) are compiler kits, i.e. useful if you implement your own compiler. There are a lot of open-source C compilers already available for nearly any architecture.
- snvzz 2y agoFair. But note that while not a "compiler kit", VBCC has front/backend separation. This is why I mentioned it. Of course, as it isn't open source, third party backends/frontends are unlikely to occur. Fortunately, despite not open source, the code and documentation can still be studied.
- karelpeeters 2y agoOut of curiosity, why are you still using 32-bit architectures?
- camgunz 2y agoDunno if this is where you're coming from, but working in 32-bit isn't that wacky. For example a very popular microcontroller [0] is 32-bit. EDIT: definitely not "maybe the most" popular [0]: https://en.wikipedia.org/wiki/ESP32 https://en.wikipedia.org/wiki/ESP32
- josephg 2y agoAs far as I know, webassembly only supports a 32 bit address space on all platforms at the moment. There’s a memory64 proposal, but it doesn’t look to be widely adopted yet.
- Rochus 2y agoIt's good enough for the majority of use cases and systems; even an eight bit MCU is sufficient for many cases. If you design a product, saving power and cost makes the difference.
- 95014_refugee 2y agoMemory efficiency just for one. For most programs, and especially in the embedded space, 64b systems carry around (and process) a lot more zeros than 32b systems do. You can still do 64b math when you need it, but you don’t have to pay for it when you don’t. Given that software is always too big, this can often be a product-making distinction.
- IshKebab 2y ago32 bit is still very common for smaller CPUs that aren't in the "application processor" class. They are cheaper because they use less area, and they're also more memory efficient because pointers are all half as big. On these CPUs you don't have 4GB of RAM so you don't need a big address space.
- rurban 2y agoBut much better and faster optimizations than egc