|
2520 | 2520 |
|
2521 | 2521 | ;;;; Rules for `func_addr` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2522 | 2522 |
|
2523 | | -(rule (lower (func_addr (func_ref_data _ extname dist))) |
| 2523 | +(rule (lower (func_addr (func_ref_data _ extname dist _))) |
2524 | 2524 | (load_ext_name (box_external_name extname) 0 dist)) |
2525 | 2525 |
|
2526 | 2526 | ;;;; Rules for `symbol_value` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
2542 | 2542 | ;; Rules for `call` and `call_indirect` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2543 | 2543 |
|
2544 | 2544 | ;; Direct call to an in-range function. |
2545 | | -(rule 1 (lower (call (func_ref_data sig_ref name (RelocDistance.Near)) args)) |
| 2545 | +(rule 1 (lower (call (func_ref_data sig_ref name (RelocDistance.Near) patchable) args)) |
2546 | 2546 | (let ((output ValueRegsVec (gen_call_output sig_ref)) |
2547 | 2547 | (abi Sig (abi_sig sig_ref)) |
2548 | 2548 | (uses CallArgList (gen_call_args abi args)) |
2549 | 2549 | (defs CallRetList (gen_call_rets abi output)) |
2550 | | - (info BoxCallInfo (gen_call_info abi name uses defs (try_call_none))) |
| 2550 | + (info BoxCallInfo (gen_call_info abi name uses defs (try_call_none) patchable)) |
2551 | 2551 | (_ Unit (emit_side_effect (call_impl info)))) |
2552 | 2552 | output)) |
2553 | 2553 |
|
2554 | 2554 | ;; Direct call to an out-of-range function (implicitly via pointer). |
2555 | | -(rule (lower (call (func_ref_data sig_ref name dist) args)) |
| 2555 | +(rule (lower (call (func_ref_data sig_ref name dist false) args)) |
2556 | 2556 | (let ((output ValueRegsVec (gen_call_output sig_ref)) |
2557 | 2557 | (abi Sig (abi_sig sig_ref)) |
2558 | 2558 | (uses CallArgList (gen_call_args abi args)) |
|
2573 | 2573 | (_ Unit (emit_side_effect (call_ind_impl info)))) |
2574 | 2574 | output)) |
2575 | 2575 |
|
2576 | | -;;;; Rules for `patchable_call` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2577 | | - |
2578 | | -;; Direct call to an in-range function. |
2579 | | -(rule (lower (patchable_call (func_ref_data sig_ref name (RelocDistance.Near)) args)) |
2580 | | - (let ((abi Sig (abi_sig sig_ref)) |
2581 | | - (uses CallArgList (gen_call_args abi args)) |
2582 | | - (defs CallRetList (gen_patchable_call_rets)) |
2583 | | - (info BoxCallInfo (gen_call_info abi name uses defs (try_call_none))) |
2584 | | - (_ Unit (emit_side_effect (patchable_call_impl info)))) |
2585 | | - (output_none))) |
2586 | | - |
2587 | 2576 | ;;;; Rules for `try_call` and `try_call_indirect` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2588 | 2577 |
|
2589 | 2578 | ;; Direct call to an in-range function. |
2590 | | -(rule 1 (lower_branch (try_call (func_ref_data sig_ref name (RelocDistance.Near)) args et) targets) |
| 2579 | +(rule 1 (lower_branch (try_call (func_ref_data sig_ref name (RelocDistance.Near) patchable) args et) targets) |
2591 | 2580 | (let ((abi Sig (abi_sig sig_ref)) |
2592 | 2581 | (trycall OptionTryCallInfo (try_call_info et targets)) |
2593 | 2582 | (uses CallArgList (gen_call_args abi args)) |
2594 | 2583 | (defs CallRetList (gen_try_call_rets abi)) |
2595 | | - (info BoxCallInfo (gen_call_info abi name uses defs trycall))) |
| 2584 | + (info BoxCallInfo (gen_call_info abi name uses defs trycall patchable))) |
2596 | 2585 | (emit_side_effect (call_impl info)))) |
2597 | 2586 |
|
2598 | 2587 | ;; Direct call to an out-of-range function (implicitly via pointer). |
2599 | | -(rule (lower_branch (try_call (func_ref_data sig_ref name dist) args et) targets) |
| 2588 | +(rule (lower_branch (try_call (func_ref_data sig_ref name dist false) args et) targets) |
2600 | 2589 | (let ((abi Sig (abi_sig sig_ref)) |
2601 | 2590 | (trycall OptionTryCallInfo (try_call_info et targets)) |
2602 | 2591 | (uses CallArgList (gen_call_args abi args)) |
|
2625 | 2614 | ;;;; Rules for `return_call` and `return_call_indirect` ;;;;;;;;;;;;;;;;;;;;;;;; |
2626 | 2615 |
|
2627 | 2616 | ;; Direct call to an in-range function. |
2628 | | -(rule 1 (lower (return_call (func_ref_data sig_ref name (RelocDistance.Near)) args)) |
| 2617 | +(rule 1 (lower (return_call (func_ref_data sig_ref name (RelocDistance.Near) false) args)) |
2629 | 2618 | (let ((abi Sig (abi_sig sig_ref)) |
2630 | 2619 | (uses CallArgList (gen_return_call_args abi args)) |
2631 | 2620 | (info BoxReturnCallInfo (gen_return_call_info abi name uses))) |
2632 | 2621 | (side_effect (return_call_impl info)))) |
2633 | 2622 |
|
2634 | 2623 | ;; Direct call to an out-of-range function (implicitly via pointer). |
2635 | | -(rule (lower (return_call (func_ref_data sig_ref name dist) args)) |
| 2624 | +(rule (lower (return_call (func_ref_data sig_ref name dist false) args)) |
2636 | 2625 | (let ((abi Sig (abi_sig sig_ref)) |
2637 | 2626 | (uses CallArgList (gen_return_call_args abi args)) |
2638 | 2627 | (target Reg (load_ext_name name 0 dist)) |
|
0 commit comments