Alan Wu
f500c1e321
Update dependency
2021-10-20 18:19:24 -04:00
Alan Wu
040cfdb139
Small build fixes
2021-10-20 18:19:24 -04:00
Alan Wu
7d1546ece5
Try to fix Windows build
2021-10-20 18:19:24 -04:00
Alan Wu
a3e58f4df8
Compile with MicroJIT disabled when scrape fails
...
This is just so we can build successfully on -O0 and other cases that
are not supported by the code scraper.
2021-10-20 18:19:24 -04:00
Alan Wu
726bdd4d35
Show whether MicroJIT is enabled in the version string
2021-10-20 18:19:24 -04:00
Maxime Chevalier-Boisvert
12283c58da
Removed inc/dec instructions because usage not recommended.
2021-10-20 18:19:24 -04:00
Alan Wu
5f4e30be66
Run ruby tool/update-deps --fix
2021-10-20 18:19:24 -04:00
Alan Wu
7fbf6d4019
Move registers into header and make them static
...
We were leaking these as global symbols and were having linking errors
with Clang 12.
2021-10-20 18:19:24 -04:00
Maxime Chevalier-Boisvert
e3cd43e2bc
Implemented opt_minus in MicroJIT
2021-10-20 18:19:24 -04:00
Alan Wu
4e9a62c963
Comment out jnl to fix Linux build again
2021-10-20 18:19:24 -04:00
Alan Wu
1159034cae
Fix compilation for -DUSE_INSNS_COUNTER
2021-10-20 18:19:24 -04:00
Maxime Chevalier-Boisvert
851ea46351
Added member_opnd() convenience macro
2021-10-20 18:19:24 -04:00
Aaron Patterson
d7f012666d
Partially implement opt_send_without_block
...
It will read and check the inline cache now, but we need to actually
call the method.
Co-Authored-By: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2021-10-20 18:19:24 -04:00
Maxime Chevalier-Boisvert
e99e3daace
Added jmp_ptr() to ujit_asm.h
2021-10-20 18:19:24 -04:00
Alan Wu
a8d784888d
Fix mistake in ujit command line parsing
2021-10-20 18:19:24 -04:00
Maxime Chevalier-Boisvert
2c866ce8f0
Check if outlined code block has enough space too
2021-10-20 18:19:24 -04:00
Alan Wu
e8c914c250
Implement the --disable-ujit command line option
2021-10-20 18:19:24 -04:00
Alan Wu
f3c961f273
endbr64 is fine
2021-10-20 18:19:24 -04:00
Maxime Chevalier-Boisvert
e0c5d4ecd9
Implemented side-exits to interpreter. setlocal_WC_0
2021-10-20 18:19:24 -04:00
Maxime Chevalier-Boisvert
4d72b9a2f7
Start implementing setlocal_wc0
2021-10-20 18:19:24 -04:00
Alan Wu
5ed7e59365
Comment out jnl to avoid conflict with system header
...
This is specific to Linux
2021-10-20 18:19:24 -04:00
Alan Wu
453218b272
Preliminary GNU/Linux support for code scraper
...
Let's see if this works on CI
2021-10-20 18:19:24 -04:00
Alan Wu
3d87eadf16
Refactor ujit_examples.h generator. Remove dwarfdump dependency
2021-10-20 18:19:24 -04:00
Alan Wu
2eaf55fcf1
Update PC in memory when exiting jitted code
...
Without this, the allocation tracker was inaccurate and
was causing a failure in `test/objspace/test_objspace.rb`.
2021-10-20 18:19:23 -04:00
Alan Wu
86c438d129
Revert "Add workaround for inserting into addr2insn mapping"
...
This reverts commit 6b765b7ca0
.
It made things much slower and didn't fix the crash.
2021-10-20 18:19:23 -04:00
Alan Wu
265c5ca8b1
Avoid triggering GC while translating threaded code
2021-10-20 18:19:23 -04:00
Alan Wu
5bcba2a5ee
Add workaround for inserting into addr2insn mapping
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
38601da27d
Added 8-bit and 16-bit general-purpose registers, more tests.
2021-10-20 18:19:23 -04:00
Alan Wu
25acbaf4f6
Don't assume srcdir is cwd
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
304adba717
Add location hint to code block mmap call
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
c20066b24c
Added method to align code block write position
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
30c4237b06
Fixed bug with ctx_stack_pop. Implemented dup bytecode.
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
d1c9ca86c1
Port print_int, movsx. Implement putself.
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
b8a3f2ed61
Add function to print strings from generated code
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
77cfdb24d4
Implemented delayed stack pointer adjustment optimization
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
038f5d964f
Avoid recompiling overlapping instruction sequences in ujit
2021-10-20 18:19:23 -04:00
Alan Wu
1665bbacc1
Fix typo
2021-10-20 18:19:23 -04:00
Alan Wu
4d959a25e4
Fix dependency for ujit_examples.h
...
Once this works on GNU/Linux this could be done semi automatically.
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
132f7e11fd
Compile putnil
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
8a5ced8eb5
Chain compilation of adjacent instructions
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
7eb192d644
Testing lea instruction properly
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
16ddb422eb
Complete refactoring to codegen functions
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
b0b7d0a87e
Refactor MicroJIT codegen to use hash table of codegen functions
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
2811792f91
Compiling getlocal_WC_0
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
2e31949225
Ported xor and cmovcc instructions
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
090255456a
Ported neg, and, or instructions
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
3739588811
Remove PC argument from ujit instructions
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
ca47899ccf
Small refactorings in ujit_compile.c
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
1879a123ca
Added cmp, not. Generate code for nop instruction.
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
7d0df31d7a
Ported inc/dec instructions
2021-10-20 18:19:23 -04:00