Alan Wu
c378c7a7cb
MicroJIT: generate less code for CFUNCs
...
Added UJIT_CHECK_MODE. Set to 1 to double check method dispatch in
generated code.
It's surprising to me that we need to watch both cc and cme. There might
be opportunities to simplify there.
2021-10-20 18:19:26 -04:00
Maxime Chevalier-Boisvert
8b8470d098
Added RUBY_VM_CHECK_INTS to CFUNC calls
2021-10-20 18:19:25 -04:00
Maxime Chevalier-Boisvert
b761f5c96f
Implemented mechanism for rel32 call
2021-10-20 18:19:25 -04:00
Maxime Chevalier-Boisvert
35c0768473
First pass at CFUNC calls complete. Not yet functional.
2021-10-20 18:19:25 -04:00
Maxime Chevalier-Boisvert
e5751768ba
Added int3() to x86 asm
2021-10-20 18:19:25 -04:00
Alan Wu
beab644408
Anonymous union is a C11 feature unavailable to us
2021-10-20 18:19:25 -04:00
Alan Wu
e9ecf80d20
Respect redefinition in MicroJIT's opt_minus
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
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
Maxime Chevalier-Boisvert
851ea46351
Added member_opnd() convenience macro
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
Maxime Chevalier-Boisvert
e0c5d4ecd9
Implemented side-exits to interpreter. setlocal_WC_0
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
Maxime Chevalier-Boisvert
38601da27d
Added 8-bit and 16-bit general-purpose registers, more tests.
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
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
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
Maxime Chevalier-Boisvert
26fecc7236
Removed native_pop_code, ported call with label
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
6a12fb2067
Ported label linking and conditional jumps
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
566d4abee5
Added shift instructions
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
efcaa49a7b
Added sub instruction, 32-bit registers, more tests
2021-10-20 18:19:23 -04:00
Maxime Chevalier-Boisvert
1392a6f2a4
Added jmp R/M instruction
2021-10-20 18:19:22 -04:00
Maxime Chevalier-Boisvert
a3b411b9c8
add and mov instruction encoding ported and tested
2021-10-20 18:19:22 -04:00
Maxime Chevalier-Boisvert
8f40a62647
Progress on x86 assembler. Encode a few simple instructions.
2021-10-20 18:19:22 -04:00
Maxime Chevalier-Boisvert
5cf7ccd24a
Started porting instruction encoding
2021-10-20 18:19:22 -04:00
Maxime Chevalier-Boisvert
0a5dcc056e
Progress on porting x86 assembler for MicroJIT
2021-10-20 18:19:22 -04:00