summaryrefslogtreecommitdiff
path: root/zjit/src/asm/arm64
AgeCommit message (Collapse)Author
2025-12-16Revert "ZJIT: Allow ccalls above 7 arguments"Alan Wu
This reverts commit 2f151e76b5dc578026706b31f054d5caf5374b05. The SP decrement (push) before the call do not match up with the pops after the call, so registers were restored incorrectly. Code from: ./miniruby --zjit-call-threshold=1 --zjit-dump-disasm -e 'p Time.new(1992, 9, 23, 23, 0, 0, :std)' str x11, [sp, #-0x10]! str x12, [sp, #-0x10]! stur x7, [sp] # last argument mov x0, x20 mov x7, x6 mov x6, x5 mov x5, x4 mov x4, x3 mov x3, x2 mov x2, x1 ldur x1, [x29, #-0x20] mov x16, #0xccfc movk x16, #0x2e7, lsl #16 movk x16, #1, lsl #32 blr x16 ldr x12, [sp], #0x10 # supposed to match str x12, [sp, #-0x10]!, but got last argument ldr x11, [sp], #0x10
2025-12-12ZJIT: Allow ccalls above 7 arguments (#15312)Aiden Fox Ivey
ZJIT: Add stack support for CCalls
2025-12-10ZJIT: Use inline format args (#15482)Alex Rocha
2025-11-21ZJIT: Inline Integer#<< for constant rhs (#15258)Max Bernstein
This is good for protoboeuf and other binary parsing
2025-11-04ZJIT: Allow Store with 8-bit Opnd::MemTakashi Kokubun
2025-10-29ZJIT: Introduce a better LIR printer (#14986)Takashi Kokubun
2025-10-13[DOC] Fix typosÉtienne Barrié
Inspired by 42ba82424d908c290a4a34ced8853f0a403b734b, I looked for other occurrences of "the the".
2025-10-03ZJIT: Make sure zjit-test-update works in asm tests (#14708)Takashi Kokubun
2025-09-19ZJIT: Fix disasm tests on release build (#14612)Takashi Kokubun
* ZJIT: Fix disasm tests on release build * Rename string() to hexdump()
2025-09-19ZJIT: Test disasm with insta (#14602)Takashi Kokubun
2025-09-03ZJIT: Ensure `clippy` passes and silence unnecessary warnings (#14439)Aiden Fox Ivey
2025-08-13ZJIT: Enable or remove comments from YJIT (#14214)Takashi Kokubun
2025-08-01ZJIT: A64: Use MOVN for small negative immediatesAlan Wu
Save a couple instructions to load a small negative constant into a register. In fact MOVN is speced to alias as `mov` in the official disassembly.
2025-07-31ZJIT: Remove false comment [ci skip]Alan Wu
2025-07-31ZJIT: A64: Add add_extended() which can add a register to spAlan Wu
2025-07-28ZJIT: Keep a frame pointer and use it for memory paramsAlan Wu
Previously, ZJIT miscompiled the following because of native SP interference. def a(n1,n2,n3,n4,n5,n6,n7,n8) = [n8] a(0,0,0,0,0,0,0, :ok) Commented problematic disassembly: ; call rb_ary_new_capa mov x0, #1 mov x16, #0x1278 movk x16, #0x4bc, lsl #16 movk x16, #1, lsl #32 blr x16 ; call rb_ary_push mov x1, x0 str x1, [sp, #-0x10]! ; c_push() from alloc_regs() mov x0, x1 ; arg0, the array ldur x1, [sp] ; meant to be arg1=n8, but sp just moved! mov x16, #0x3968 movk x16, #0x4bc, lsl #16 movk x16, #1, lsl #32 blr x16 Since the frame pointer stays constant in the body of the function, static offsets based on it don't run the risk of being invalidated by SP movements. Pass the registers to preserve through Insn::FrameSetup. This allows ARM to use STP and waste no gaps between EC, SP, and CFP. x86 now preserves and restores RBP since we use it as the frame pointer. Since all arches now have a frame pointer, remove offset based SP movement in the epilogue and restore registers using the frame pointer.
2025-07-24ZJIT: Re-enable some A64 assembler testsAlan Wu
Tweak for Condition to build when `cfg!(target = "x86_64")`.
2025-07-02ZJIT: Reject ISEQs with too-large stack_max (#13770)Takashi Kokubun
2025-06-04ZJIT: Implement side exits for entry frames (#13469)Takashi Kokubun
Co-authored-by: Max Bernstein <tekknolagi@gmail.com> Co-authored-by: Alan Wu <alansi.xingwu@shopify.com> Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2025-04-18Change mentions of YJIT to ZJIT (https://github.com/Shopify/zjit/pull/113)Aiden Fox Ivey
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Compile IfFalse, IfTrue, and Jump instructions ↵Takashi Kokubun
(https://github.com/Shopify/zjit/pull/72) * Compile IfFalse instruction * Add a TODO comment * Rename *s_len to num_*s * Run only gen_param() against block.params * Add a few more tests * Wrap label indexes with Label * Compile blocks in reverse post-order * Simplify a nested test * s/get_block/block/ * Return a number instead of an iterator * Clarify the allocator uses disjoint sets of registers * Use Display for Block and Insn * Compile IfTrue and Jump * Avoid resolving Param instructions * Always compile Insn::Param as basic block arguments * Remove an obsoleted variable * Change it back to use find * Use find for params too * Use Display more * Add more tests * nested if * if after if * if elsif else * loop after loop * nested loops * if in loop * loop in if Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Stub YJIT-specific implementations in the backendTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Add (gutted) asmMaxime Chevalier-Boisvert
Notes: Merged: https://github.com/ruby/ruby/pull/13131