summaryrefslogtreecommitdiff
path: root/yjit/src/codegen.rs
AgeCommit message (Collapse)Author
2022-08-29Port setivar to the new backend IR (https://github.com/Shopify/ruby/pull/362)Takashi Kokubun
* Port setivar to the new backend IR * Add a few more setivar test cases * Prefer const_ptr Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-08-29Port opt_minus, opt_or, and opt_and to the new IR ↵Takashi Kokubun
(https://github.com/Shopify/ruby/pull/364) * Port opt_minus, opt_or, and opt_and to the new IR * Fix the Op::Or issue with push_insn * Prefer asm.store for clarity
2022-08-29Port opt_mod to the new backend IR (https://github.com/Shopify/ruby/pull/363)Takashi Kokubun
2022-08-29Fix to float guard in jit_guard_known_klass to use the correct output ↵Noah Gibbs
operand. (https://github.com/Shopify/ruby/pull/365)
2022-08-29Port send-only insns and write tests (https://github.com/Shopify/ruby/pull/360)Takashi Kokubun
2022-08-29Opnd::Value fixes (https://github.com/Shopify/ruby/pull/354)Alan Wu
* Fix asm.load(VALUE) - `<VALUE as impl Into<Opnd>>` didn't track that the value is a value - `Iterator::map` doesn't evaluate the closure you give it until you call `collect`. Use a for loop instead so we put the gc offsets into the compiled block properly. * x64: Mov(mem, VALUE) should load the value first Tripped in codegen for putobject now that we are actually feeding `Opnd::Value` into the backend. * x64 split: Canonicallize VALUE loads * Update yjit/src/backend/x86_64/mod.rs
2022-08-29Port gen_send_cfunc to the new backend ↵Takashi Kokubun
(https://github.com/Shopify/ruby/pull/357) * Port gen_send_cfunc to the new backend * Remove an obsoleted test * Add more cfunc tests * Use csel_e instead and more into() Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> * Add a missing lea for build_kwargs * Split cfunc test cases Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-08-29Convert getinstancevariable to new backend IR ↵Takashi Kokubun
(https://github.com/Shopify/ruby/pull/352) * Convert getinstancevariable to new backend IR * Support mem-based mem * Use more into() * Add tests for getivar * Just load obj_opnd to a register * Apply another into() * Flip the nil-out condition * Fix duplicated counts of side_exit
2022-08-29Remove empty linesMaxime Chevalier-Boisvert
2022-08-29Port gen_concatstring to new backend IR ↵Zack Deveau
(https://github.com/Shopify/ruby/pull/350) * Port gen_concatstring to new backend IR * Update yjit/src/codegen.rs Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-08-29Port anytostring, intern, and toregexp ↵Takashi Kokubun
(https://github.com/Shopify/ruby/pull/348) * Port anytostring, intern, and toregexp * Port getspecial to the new backend (#349) PR: https://github.com/Shopify/ruby/pull/349
2022-08-29Port only ATTRSET of opt_send_without_block ↵Takashi Kokubun
(https://github.com/Shopify/ruby/pull/351)
2022-08-29Port class variable instructions (https://github.com/Shopify/ruby/pull/346)Takashi Kokubun
2022-08-29Port setglobal to the new backend (https://github.com/Shopify/ruby/pull/347)Takashi Kokubun
2022-08-29Minor cleanups (https://github.com/Shopify/ruby/pull/345)Alan Wu
* Move allocation into Assembler::pos_marker We wanted to do this to begin with but didn't because we were confused about the lifetime parameter. It's actually talking about the lifetime of the references that the closure captures. Since all of our usages capture no references (they use `move`), it's fine to put a `+ 'static` here. * Use optional token syntax for calling convention macro * Explicitly request C ABI on ARM It looks like the Rust calling convention for functions are the same as the C ABI for now and it's unlikely to change, but it's easy for us to be explicit here. I also tried saying `extern "aapcs"` but that unfortunately doesn't work.
2022-08-29Port gen_checktype to the new IR assembler backend ↵Zack Deveau
(https://github.com/Shopify/ruby/pull/343)
2022-08-29Port the YJIT defined opcode; fix C_ARG_REGS ↵Noah Gibbs
(https://github.com/Shopify/ruby/pull/342)
2022-08-29Port and test checkkeyword (https://github.com/Shopify/ruby/pull/339)Noah Gibbs
2022-08-29Add LiveReg IR instruction to fix stats leave exit code ↵Alan Wu
(https://github.com/Shopify/ruby/pull/341) It allows for reserving a specific register and prevents the register allocator from clobbering it. Without this `./miniruby --yjit-stats --yjit-callthreshold=1 -e0` was crashing because the counter incrementing code was clobbering RAX incorrectly.
2022-08-29Port and test duparray and splatarray (https://github.com/Shopify/ruby/pull/337)Noah Gibbs
* Port duparray opcode * Port and test splatarray
2022-08-29Fix bug with opt_lt, csel on x86Maxime Chevalier-Boisvert
2022-08-29Work on opt_lt, fix x86 backend bug in cmp()Maxime Chevalier-Boisvert
2022-08-29Port over newrangeMaxime Chevalier-Boisvert
2022-08-29Port over setlocal and getglobalMaxime Chevalier-Boisvert
2022-08-29Refactor YJIT branches to use PosMarker ↵Maxime Chevalier-Boisvert
(https://github.com/Shopify/ruby/pull/333) * Refactor defer_compilation to use PosMarker * Port gen_direct_jump() to use PosMarker * Port gen_branch, branchunless * Port over gen_jump() * Port over branchif and branchnil * Fix use od record_boundary_patch_point in jump_to_next_insn
2022-08-29Fix dupn (https://github.com/Shopify/ruby/pull/330)Noah Gibbs
* get_dupn was allocating and throwing away an Assembler object instead of using the one passed in * Uncomment remaining tests in codegen.rs, which seem to work now
2022-08-29Implement PosMarker instruction (https://github.com/Shopify/ruby/pull/328)Maxime Chevalier-Boisvert
* Implement PosMarker instruction * Implement PosMarker in the arm backend * Make bindgen run only for clang image * Fix if-else in cirrus CI file * Add missing semicolon * Try removing trailing semicolon * Try to fix shell/YAML syntax Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2022-08-29Fix push/pop and frame setup/teardown with Kevin & AlanMaxime Chevalier-Boisvert
2022-08-29Fix some of the codegen.rs tests (https://github.com/Shopify/ruby/pull/327)Noah Gibbs
2022-08-29Use frame_setup() and frame_teardown()Maxime Chevalier-Boisvert
2022-08-29ADR fixes for LeaLabel and callsMaxime Chevalier-Boisvert
2022-08-29Fix comment typoMaxime Chevalier-Boisvert
2022-08-29Port print_str to new backend (https://github.com/Shopify/ruby/pull/318)Kevin Newton
* ADR and ADRP for AArch64 * Implement Op::Jbe on X86 * Lera instruction * Op::BakeString * LeaPC -> LeaLabel * Port print_str to the new backend * Port print_value to the new backend * Port print_ptr to the new backend * Write null-terminators in Op::BakeString * Fix up rebase issues on print-str port * Add back in panic for X86 backend for unsupported instructions being lowered * Fix target architecture
2022-08-29Port newhash, add tests for newhash, duphashMaxime Chevalier-Boisvert
2022-08-29Port over putstringMaxime Chevalier-Boisvert
2022-08-29Port over setlocal_wc0Maxime Chevalier-Boisvert
2022-08-29Port gen_getlocal()Maxime Chevalier-Boisvert
2022-08-29Get started on branchunless portMaxime Chevalier-Boisvert
2022-08-29Get codegen for deferred compilation workingMaxime Chevalier-Boisvert
2022-08-29Add test for direct jump to a code pointerMaxime Chevalier-Boisvert
2022-08-29Port over duphash and newarrayMaxime Chevalier-Boisvert
2022-08-29Port over setnMaxime Chevalier-Boisvert
2022-08-29Add jo insn and test for joMaxime Chevalier-Boisvert
2022-08-29Port topn, adjuststack, most of opt_plusMaxime Chevalier-Boisvert
2022-08-29Port guard_two_fixnumsMaxime Chevalier-Boisvert
2022-08-29Port gen_full_cfunc_returnMaxime Chevalier-Boisvert
2022-08-29Port getlocal_WC0Maxime Chevalier-Boisvert
2022-08-29Port over gen_putspecialobjectMaxime Chevalier-Boisvert
2022-08-29Port gen_putself, log what can't be compiled in --yjit-dump-insnsMaxime Chevalier-Boisvert
2022-08-29Get rid of temporary context methodsMaxime Chevalier-Boisvert