asmjit
durin
Our great sponsors
asmjit | durin | |
---|---|---|
9 | 3 | |
3,801 | 13 | |
1.7% | - | |
8.2 | 0.0 | |
about 1 month ago | about 2 years ago | |
C++ | Rust | |
zlib License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
asmjit
-
The 6502 instruction set as a database
Some other instruction sets in some JSON: https://github.com/asmjit/asmjit/tree/master/db
-
30 years of DOOM: new code, new bugs
The attentive reader may notice that this code is from a third-party library. So, we didn't want to include it in the article at first. However, we found something interesting. In 2017, somebody opened an issue in the asmjit project: the GCC 7.2 compiler issued a warning to the code above. The project authors fixed it:
-
How do I get the registers of a process in C++?
You can use something like https://asmjit.com/ to generate and call x64 code at runtime.
- Ask HN: Recommendation for general purpose JIT compiler
-
Compiler Design in C++
But an easy to create a JIT would be to use https://github.com/asmjit/asmjit, which is used in RPCS3.
-
Are there any low level, cross platform assembly languages that allow jumping to non labels?
You could go the way of https://asmjit.com (or forth) and make it your assembler DSL on top of the low-level call.
-
C++ libraries for filtering collections and expression trees
But if you're willing to get closer to the hardware is https://github.com/bitfunnel/nativejit/ and https://asmjit.com/
- AsmJit
-
Wrapping dynamically generated void(*)() pointers in try-catch?
https://github.com/asmjit/asmjit is nice. But using a JIT seems like a sledgehammer working around a lacking design.
durin
-
Are there any low level, cross platform assembly languages that allow jumping to non labels?
So I think I may be one of the few people in the world who has actually implemented a GC using LLVM's statepoint infrastructure. It's poorly documented and there are some gotchas, but I'd say it's definitely usable, and it works with basically any collector design, including moving collectors (I'm using Immix) and has no runtime bookkeeping overhead and allows LLVM to optimize the code without worrying about GC, which is nice. It's actually gotten a bit better with LLVM 13, too. If you're curious what a LLVM-based GC looks like, mine is in this folder. Of course, if you just want some sort of GC, you can also just link it with Boehm which is quite easy and has pretty good performance - this is what e.g. Crystal does, although they're talking about switching.
-
September 2021 monthly "What are you working on?" thread
I also fixed lots of bugs in the GC and backend, so it should be a lot more stable now.
-
May 2021 monthly "What are you working on?" thread
Recently, I've been working on adding garbage collection to Pika. I've successfully written an Immix-based garbage collector that works with the LLVM GC support infrastructure, and I'm currently working on integrating the GC with Pika, or really Durin, the dependently-typed intermediate representation that Pika compiles to. Because types are passed around at runtime, objects of unknown type and size can be stored unboxed in polymorphic data structures; but that makes keeping track of type information for heap allocations somewhat harder, because type information needs to be allocated and constructed at runtime in some cases. It's an interesting design problem, because you want constructing type information to be fast; but the GC will run much more often, so maximizing tracing speed by avoiding e.g. indirection in type information is important; and you also want to construct as much type information as possible at compile time and embed it as constants.
What are some alternatives?
fasmg - flat assembler g - adaptable assembly engine
c3c - Compiler for the C3 language
mir - A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
bluebird - A work-in-progess programming language modeled after Ada and C++
oneDNN - oneAPI Deep Neural Network Library (oneDNN)
never - Never: statically typed, embeddable functional programming language.
mlibc - Portable C standard library
konna - A fast functional language based on two level type theory
dynarmic - An ARM dynamic recompiler.
pika - A WIP little dependently-typed systems language
Cwerg - The best C-like language that can be implemented in 10kLOC.
imp - Imp is a statically typed and compiled scripting language with the goal of increasing programmer confidence.