Jakob Löw
25c88f5e1c
automatically find and pass parent frame pointers when calling nested functions
when calling a nested function the function needs a pointer to the parent frame
to import values. With the new nested importing system the work of importing
values was taken away from the backends, so this commit takes away setting up
calls to nested functions from the backend. Instead this is done in
jit-rules.c (and architecture specific versions of jit-rule.c).
7 years ago
Jakob Löw
780b4b816a
Fix some issues with importing values
The previous commit intrduced a couple of bugs.
While importing values from the parent worked importing
values from a higher ancestor or calling siblings was broken.
This commit fixes these issues
7 years ago
Jakob Löw
a40e0bc422
rework how nested values are accessed
The current way on how importing values from ancestors works mainly aims at
hiding how it works from the outside. The main problem was that it required
a complex implementation in each backend which only one of the backends (x86)
implemented.
This commit changes accessing nested values, making it completely frontend
based. Furthermore it allows the library users to retrieve the frame pointer
of a parent and pass it in any way they like instead of forcing them to use
jit_insn_call. This means the new way allows implementing things such as lambdas
as function pointer (closure) together with a pointer to the parent frame and
then call this lambda using jit_insn_call_indirect.
7 years ago
Aleksey Demakov
825a982ce2
Undo incorrect commit out of the last merge
7 years ago
Aleksey Demakov
2f24cacb08
Insert ChangeLog entry for the last merge
7 years ago
Aleksey Demakov
b0e495f833
Merge pull request #12 from eklitzke/yyerror
Use const char* for yyerror, to allow building with -Werror=format-security
7 years ago
Aleksey Demakov
ff80aabcb5
fix the problem with global registers on recompilation
7 years ago
Aleksey Demakov
7265811145
add a test case from David Meyer for a problem with global registers on recompilation
7 years ago
Aleksey Demakov
279720066f
Merge pull request #13 from M4GNV5/memcpy-fix
add missing memory load when memcpy'ing small structs on x86-64
7 years ago
Jakob Löw
784f983f0f
add missing memory load when memcpy'ing small structs on x86-64
7 years ago
Aleksey Demakov
a367527522
Update ChangeLog
7 years ago
Aleksey Demakov
dd3a742fdd
Merge pull request #11 from eklitzke/master
Fix some minor README typos
7 years ago
Evan Klitzke
83c29e3b1d
remove this
7 years ago
Evan Klitzke
88c0ad577b
more yacc errors
7 years ago
Evan Klitzke
2f6ea14148
use const char* for yyerror, to allow building with -Werror=format-security
7 years ago
Evan Klitzke
d45b24a23f
fix some typos
7 years ago
Aleksey Demakov
1bedc33a47
Update ChangeLog
7 years ago
Tom Tromey
adc5b4573e
Add pkg-config .pc files
This adds .pc files for the various libraries to libjit. This lets
users of the library use pkg-config to compile and link against
libjit.
7 years ago
Tom Tromey
6c06311887
Mention jit-dump.h in the documentation
I noticed that the documentation for the dumping functions did not
mention jit-dump.h. This patch updates the documentation.
7 years ago
Aleksey Demakov
9378ba1844
Fix a bug with applying nint, ptr, and long arguments
7 years ago
Aleksey Demakov
cabc691211
Fix x86-64 jump table space check
7 years ago
Aleksey Demakov
c6db966b1b
Reformat last ChangeLog entries
7 years ago
Aleksey Demakov
358fff889f
Merge pull request #9 from M4GNV5/imm8-alu
Prefer the 8 bit sign extended alu instruction encoding in x86-64
7 years ago
Jakob Löw
2c47e847a2
Prefer the 8 bit sign extended alu instruction encoding in x86-64
ALU instructions like add imm %rax can be encoded in multiple ways.
- the add imm32 r64 way
- the add imm32 %rax way
- or the add imm8 r64 way.
Previousely libjit preferred the second way even if the immediate was between -128 and 127.
The third way makes the operation, even when not using the rax specific opcode, two bytes shorter.
7 years ago
Aleksey Demakov
92b81340e9
Fix (perhaps) constant comparison bug
7 years ago
Aleksey Demakov
f54b89a3ce
Merge pull request #7 from M4GNV5/alloca-align
Don't double align the size of alloca instructions
7 years ago
Jakob Löw
0bf8c43a9a
the frontend is already aligning the argument of OP_ALLOCA so the backends don't need to do it too
7 years ago
Aleksey Demakov
5cf04ce578
Fix a bug in x86-64 small block memset
7 years ago
Aleksey Demakov
bdd7a8886b
Fix thread init on windows
7 years ago
Aleksey Demakov
6048707db4
Merge pull request #5 from M4GNV5/memset-x86-64
optimizations for memset on x86_64
7 years ago
Jakob Löw
2904804a1f
add the x86-64 memset optimizations to the ChangeLog
7 years ago
Jakob Löw
525ca0d86c
more memset optimizations in x86_64 when the value is zero
7 years ago
Jakob Löw
1dd0504f29
optimize memset on x86_64 when size and value are constants
7 years ago
Aleksey Demakov
c212bfac04
Massive jit-value.c overhaul
7 years ago
Aleksey Demakov
1470c46b9f
Massive jit-insn.c overhaul
7 years ago
Aleksey Demakov
e9b38d68a9
Big cleanup in jit-opcode-apply.h
7 years ago
Aleksey Demakov
ce2b1ef94a
Use jit_type_remove_tags() instead of jit_type_normalize() in jit-insn.c where appropriate
7 years ago
Aleksey Demakov
ff53790e12
Shuffle lines in jit-type.h
7 years ago
Aleksey Demakov
859ca4301f
Use jit_type_remove_tags() instead of jit_type_normalize() in jit-value.c where appropriate. Also some coding style changes
7 years ago
Aleksey Demakov
e56f1c7fe4
Use jit_type_remove_tags() instead of jit_type_normalize() in jit-rules-interp.c where appropriate
7 years ago
Aleksey Demakov
eda45a9924
Use jit_type_remove_tags() instead of jit_type_normalize() in jit-reg-alloc.c
7 years ago
Aleksey Demakov
2fdbf9c202
Use jit_type_remove_tags() instead of jit_type_normalize() in jit-apply.c. Also some coding style changes there.
7 years ago
Aleksey Demakov
accca7efeb
Use jit_type_remove_tags() instead of jit_type_normalize() in jit_type_return_via_pointer()
7 years ago
Aleksey Demakov
2db75dafb6
Make jit_type_normalize() use jit_type_remove_tags() instead of duplicating its code
7 years ago
Aleksey Demakov
0a20e9264b
Add a space
7 years ago
Aleksey Demakov
fe48d1b9dc
Update ChangeLog with insn constant patch info
7 years ago
Aleksey Demakov
9f25d5661b
Merge pull request #1 from M4GNV5/constantfold
implement constant folding for arithmetic, shift and compare instructions
7 years ago
M4GNV5
b1b36fe0d7
implement constant folding for arithmetic, shift and compare instructions
implement constant folding in a way that arithmetic, shift and compare
jit_insn_ functions return a jit_value_t that is a constant itself.
7 years ago
Aleksey Demakov
3663ae6962
Merge commit 'd30f6ae8ea76bc7398f96e9ac76aa5232d8d5e4f'
8 years ago
Aleksey Demakov
c58e6bab8b
Add the serial test option to AM_INIT_AUTOMAKE
8 years ago