abi-aa
kaleidoscope
abi-aa | kaleidoscope | |
---|---|---|
8 | 9 | |
837 | 1,017 | |
2.6% | - | |
7.0 | 0.0 | |
3 days ago | about 4 years ago | |
HTML | Haskell | |
GNU General Public License v3.0 or later | MIT License |
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.
abi-aa
-
LKM Relocation ressources
As far as I know, kernel modules are ordinary relocatable ELF executables, so the best resource will be the ELF specifications. The ARM-specific parts can be found here.
-
Cortex M7: get MSP using inline _asm algorithm checkup
Yes, that would be the case when your code's entry-point executes, and from then on it is your responsibility to maintain the alignment. It has nothing to do with AHB. This advisory has some examples of what can go wrong if your stack isn't 8-byte aligned. The alignment does not make much of a difference in your little function, but it's something to keep in mind as you write more complex code.
-
Raspberry Pi Pico: What is this obfuscated code(?) doing in its boot ROM?
Normally you'd save more than just PC as AAPCS (https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aap...) mandates stack to be aligned to 8 bytes for "public interface" functions. But this is is not a "public" function so it's fine to only save lr here.
"bx lr" is only used on it's own when the function doesn't call another function (altering lr), and doesn't need to save any registers.
If you see pop {lr}; bx lr then that's code that's being compiled to explicitly support Armv4 (e.g. Arm7TDMI)
-
What can I expect to happen if I print a character above CHAR_MAX?
The Arm Procedure Call Standards have "Arm C and C++ Language Mappings" sections that all say char is an "unsigned byte".
- Details on brk #imm implementation ?
-
This Week in Rust #412
eabi: many pages in this official ARM repository define it as "An ABI suited to the needs of embedded, and deeply embedded (sometimes called free standing), applications." It seems to be the name of an ABI, or maybe the ABI, that code compiled for ARM chips is expected to use? Except there's also AEABI, the first A stands for ARM, and that's something different? ARM's naming conventions confuse me endlessly.
-
Resources for Amateur Compiler Writers
Latest versions of the ABI specifications linked in the Machine Specific section
ARM: https://github.com/ARM-software/abi-aa/releases
x86-64: https://gitlab.com/x86-psABIs/x86-64-ABI (go to most recent CI job and download artifacts for a compiled PDF)
-
PyPy Project looking for sponsorship to add support for Apple Silicon
> Apple changed some things that impact PyPy, like the register uses and ffi calling conventions.
I thought everyone who used 64-bit ARM used ARM's AAPCS64 (https://github.com/ARM-software/abi-aa/blob/master/aapcs64/a...), so the register usage and FFI calling convention should be the same as on Linux and Windows. What did Apple do that would affect the PyPy JIT?
kaleidoscope
- Implementing a JIT Compiled Language with Haskell and LLVM (2017)
-
Should I abandon using haskell for my compiler?
Comparing the haskell and cpp implementations of the LLVM tutorial lead me to believe it might be faster to learn haskell and implement the compiler in haskell than to implement it in cpp.
-
What would be your programming language of choice to implement a JIT compiler ?
I think for writing compilers Haskell deserves to make the list. It is really excellent at creating DSLs. https://www.stephendiehl.com/llvm/
-
Proposal to Merge Pyston with Cpython
I'm no expert, but you might be interested in: https://llvm.org/docs/tutorial/
There's also a Haskell version if you'd prefer: https://www.stephendiehl.com/llvm/
Idk how to do this in python as I'm not really good with it, but in C, to make your compiler a JIT, you would `mmap` a region as writeable, write the machine code to it that you already know how to generate, `mprotect` it as PROT_EXEC instead of PROC_WRITE, cast the pointer to the region to a function pointer, and then call it. These functions may be available in the python sys package but I don't really know.
I've implemented a "JIT" that takes machine code as hex and does this. Warning: it's complete garbage with no error checking but is a good proof of concept. https://gist.github.com/martinjacobd/3ee56f3c7b7ce621034ec3e...
- Why does Rust have parameters on impl?
-
Implementing a LLVM Micro C compiler in Haskell
This is amazing. I tried following Stephen Diehl's JIT compiler in LLVM tutorial[0] a few years ago but it was already outdated (the llvm-hs library changed quite a bit), and subsequent web searches didn't turn up much.
For those interested in tutorials like this, I'd also recommend a very literate Haskell compiler for the PCF language to C[1], which is essentially lambda calculus with some primitives.
[0] https://www.stephendiehl.com/llvm/
[1] https://github.com/jozefg/pcf/
- Resources for Amateur Compiler Writers
-
Need some help with monad transformers
I'm currently working with llvm-hs-pure and am struggling to properly emit code for a module. I basically followed https://www.stephendiehl.com/llvm/#chapter-3-code-generation and have types like:
-
Advanced books / tutorials about Haskell?
http://www.stephendiehl.com/llvm/ Implementing a JIT Compiled Language with Haskell and LLVM Nice tutorial. Requires knowledge of monads, applicatives, transformers. Deep enough and more or less 'real world'.