sljit | Platform independent low-level JIT compiler | Compiler library
kandi X-RAY | sljit Summary
kandi X-RAY | sljit Summary
Purpose: A simple, machine independent JIT compiler, which suitable for translating interpreted byte code to machine code. The sljitLir.h describes the LIR (low-level intermediate representation) of SLJIT. Compatible: Any C (C++) compiler. At least I hope so. Using sljit: Copy the content of sljit_src directory into your project source directory. Add sljitLir.c source file to your build environment. All other files are included by sljitLir.c (if required). Define the machine by SLJIT_CONFIG_* selector. See sljitConfig.h for all possible values. For C++ compilers, rename sljitLir.c to sljitLir.cpp. Special thanks: Alexander Nasonov Carlo Marcelo Arenas Belón Christian Persch Daniel Richard G. Giuseppe D'Angelo H.J. Lu James Cowgill Jason Hood Jiong Wang (TileGX support) Marc Mutz Martin Storsjö Michael McConville Walter Lee Wen Xichang YunQiang Su.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sljit
sljit Key Features
sljit Examples and Code Snippets
Community Discussions
Trending Discussions on sljit
QUESTION
I'm working on a simple JIT compiler for PowerPC, I followed the examples in https://github.com/spencertipping/jit-tutorial to get a hang of how to work with it.
The problem is that the identity function in the second example "jitproto.c" can't really be ported to powerpc as is, using the "LWA" and "BLR" instructions, it just causes segfaults when executed.
In the end I used the machine code output of the SLJIT compiler (https://github.com/linux-on-ibm-z/sljit) to see what I'm doing wrong, and I see it generates 12 instruction words before what I thought would be the function.
So what are those instructions doing? Why can't I just start the function directly like in x86?
Code can be compiled with a C99 compiler on PPC64 (tested in a powermac and a power8 server).
...ANSWER
Answered 2019-Mar-25 at 18:12The instructions are required for setting up the stack layout of PPC64 ABI. See here: http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#STACK
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sljit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page