| ... | ... | @@ -2462,7 +2462,8 @@ pub const Intrinsic = enum { |
| 2462 | 2462 | @"wasm.memory.grow", |
| 2463 | 2463 | |
| 2464 | 2464 | const Signature = struct { |
| 2465 | | params: []const Parameter = &.{}, |
| 2465 | ret_len: u8, |
| 2466 | params: []const Parameter, |
| 2466 | 2467 | attrs: []const Attribute = &.{}, |
| 2467 | 2468 | |
| 2468 | 2469 | const Parameter = struct { |
| ... | ... | @@ -2471,33 +2472,37 @@ pub const Intrinsic = enum { |
| 2471 | 2472 | |
| 2472 | 2473 | const Kind = union(enum) { |
| 2473 | 2474 | type: Type, |
| 2475 | change_scalar: struct { |
| 2476 | index: u8, |
| 2477 | scalar: Type, |
| 2478 | }, |
| 2474 | 2479 | overloaded, |
| 2475 | | overloaded_tuple: u8, |
| 2476 | 2480 | matches: u8, |
| 2477 | | matches_tuple: packed struct { param: u4, field: u4 }, |
| 2478 | | matches_with_overflow: u8, |
| 2479 | 2481 | }; |
| 2480 | 2482 | }; |
| 2481 | 2483 | }; |
| 2482 | 2484 | |
| 2483 | | const signatures = std.enums.EnumArray(Intrinsic, Signature).initDefault(.{}, .{ |
| 2485 | const signatures = std.enums.EnumArray(Intrinsic, Signature).initDefault(.{ |
| 2486 | .ret_len = 0, |
| 2487 | .params = &.{}, |
| 2488 | }, .{ |
| 2484 | 2489 | .va_start = .{ |
| 2490 | .ret_len = 0, |
| 2485 | 2491 | .params = &.{ |
| 2486 | | .{ .kind = .{ .type = .void } }, |
| 2487 | 2492 | .{ .kind = .{ .type = .ptr } }, |
| 2488 | 2493 | }, |
| 2489 | 2494 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn }, |
| 2490 | 2495 | }, |
| 2491 | 2496 | .va_end = .{ |
| 2497 | .ret_len = 0, |
| 2492 | 2498 | .params = &.{ |
| 2493 | | .{ .kind = .{ .type = .void } }, |
| 2494 | 2499 | .{ .kind = .{ .type = .ptr } }, |
| 2495 | 2500 | }, |
| 2496 | 2501 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn }, |
| 2497 | 2502 | }, |
| 2498 | 2503 | .va_copy = .{ |
| 2504 | .ret_len = 0, |
| 2499 | 2505 | .params = &.{ |
| 2500 | | .{ .kind = .{ .type = .void } }, |
| 2501 | 2506 | .{ .kind = .{ .type = .ptr } }, |
| 2502 | 2507 | .{ .kind = .{ .type = .ptr } }, |
| 2503 | 2508 | }, |
| ... | ... | @@ -2505,6 +2510,7 @@ pub const Intrinsic = enum { |
| 2505 | 2510 | }, |
| 2506 | 2511 | |
| 2507 | 2512 | .returnaddress = .{ |
| 2513 | .ret_len = 1, |
| 2508 | 2514 | .params = &.{ |
| 2509 | 2515 | .{ .kind = .{ .type = .ptr } }, |
| 2510 | 2516 | .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} }, |
| ... | ... | @@ -2512,18 +2518,21 @@ pub const Intrinsic = enum { |
| 2512 | 2518 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2513 | 2519 | }, |
| 2514 | 2520 | .addressofreturnaddress = .{ |
| 2521 | .ret_len = 1, |
| 2515 | 2522 | .params = &.{ |
| 2516 | 2523 | .{ .kind = .overloaded }, |
| 2517 | 2524 | }, |
| 2518 | 2525 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2519 | 2526 | }, |
| 2520 | 2527 | .sponentry = .{ |
| 2528 | .ret_len = 1, |
| 2521 | 2529 | .params = &.{ |
| 2522 | 2530 | .{ .kind = .overloaded }, |
| 2523 | 2531 | }, |
| 2524 | 2532 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2525 | 2533 | }, |
| 2526 | 2534 | .frameaddress = .{ |
| 2535 | .ret_len = 1, |
| 2527 | 2536 | .params = &.{ |
| 2528 | 2537 | .{ .kind = .overloaded }, |
| 2529 | 2538 | .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} }, |
| ... | ... | @@ -2531,8 +2540,8 @@ pub const Intrinsic = enum { |
| 2531 | 2540 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2532 | 2541 | }, |
| 2533 | 2542 | .prefetch = .{ |
| 2543 | .ret_len = 0, |
| 2534 | 2544 | .params = &.{ |
| 2535 | | .{ .kind = .{ .type = .void } }, |
| 2536 | 2545 | .{ .kind = .overloaded, .attrs = &.{ .nocapture, .readonly } }, |
| 2537 | 2546 | .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} }, |
| 2538 | 2547 | .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} }, |
| ... | ... | @@ -2541,6 +2550,7 @@ pub const Intrinsic = enum { |
| 2541 | 2550 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.readwrite) } }, |
| 2542 | 2551 | }, |
| 2543 | 2552 | .@"thread.pointer" = .{ |
| 2553 | .ret_len = 1, |
| 2544 | 2554 | .params = &.{ |
| 2545 | 2555 | .{ .kind = .{ .type = .ptr } }, |
| 2546 | 2556 | }, |
| ... | ... | @@ -2548,6 +2558,7 @@ pub const Intrinsic = enum { |
| 2548 | 2558 | }, |
| 2549 | 2559 | |
| 2550 | 2560 | .abs = .{ |
| 2561 | .ret_len = 1, |
| 2551 | 2562 | .params = &.{ |
| 2552 | 2563 | .{ .kind = .overloaded }, |
| 2553 | 2564 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2556,6 +2567,7 @@ pub const Intrinsic = enum { |
| 2556 | 2567 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2557 | 2568 | }, |
| 2558 | 2569 | .smax = .{ |
| 2570 | .ret_len = 1, |
| 2559 | 2571 | .params = &.{ |
| 2560 | 2572 | .{ .kind = .overloaded }, |
| 2561 | 2573 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2564,6 +2576,7 @@ pub const Intrinsic = enum { |
| 2564 | 2576 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2565 | 2577 | }, |
| 2566 | 2578 | .smin = .{ |
| 2579 | .ret_len = 1, |
| 2567 | 2580 | .params = &.{ |
| 2568 | 2581 | .{ .kind = .overloaded }, |
| 2569 | 2582 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2572,6 +2585,7 @@ pub const Intrinsic = enum { |
| 2572 | 2585 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2573 | 2586 | }, |
| 2574 | 2587 | .umax = .{ |
| 2588 | .ret_len = 1, |
| 2575 | 2589 | .params = &.{ |
| 2576 | 2590 | .{ .kind = .overloaded }, |
| 2577 | 2591 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2580,6 +2594,7 @@ pub const Intrinsic = enum { |
| 2580 | 2594 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2581 | 2595 | }, |
| 2582 | 2596 | .umin = .{ |
| 2597 | .ret_len = 1, |
| 2583 | 2598 | .params = &.{ |
| 2584 | 2599 | .{ .kind = .overloaded }, |
| 2585 | 2600 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2588,6 +2603,7 @@ pub const Intrinsic = enum { |
| 2588 | 2603 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2589 | 2604 | }, |
| 2590 | 2605 | .sqrt = .{ |
| 2606 | .ret_len = 1, |
| 2591 | 2607 | .params = &.{ |
| 2592 | 2608 | .{ .kind = .overloaded }, |
| 2593 | 2609 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2595,6 +2611,7 @@ pub const Intrinsic = enum { |
| 2595 | 2611 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2596 | 2612 | }, |
| 2597 | 2613 | .powi = .{ |
| 2614 | .ret_len = 1, |
| 2598 | 2615 | .params = &.{ |
| 2599 | 2616 | .{ .kind = .overloaded }, |
| 2600 | 2617 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2603,6 +2620,7 @@ pub const Intrinsic = enum { |
| 2603 | 2620 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2604 | 2621 | }, |
| 2605 | 2622 | .sin = .{ |
| 2623 | .ret_len = 1, |
| 2606 | 2624 | .params = &.{ |
| 2607 | 2625 | .{ .kind = .overloaded }, |
| 2608 | 2626 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2610,6 +2628,7 @@ pub const Intrinsic = enum { |
| 2610 | 2628 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2611 | 2629 | }, |
| 2612 | 2630 | .cos = .{ |
| 2631 | .ret_len = 1, |
| 2613 | 2632 | .params = &.{ |
| 2614 | 2633 | .{ .kind = .overloaded }, |
| 2615 | 2634 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2617,6 +2636,7 @@ pub const Intrinsic = enum { |
| 2617 | 2636 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2618 | 2637 | }, |
| 2619 | 2638 | .pow = .{ |
| 2639 | .ret_len = 1, |
| 2620 | 2640 | .params = &.{ |
| 2621 | 2641 | .{ .kind = .overloaded }, |
| 2622 | 2642 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2625,6 +2645,7 @@ pub const Intrinsic = enum { |
| 2625 | 2645 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2626 | 2646 | }, |
| 2627 | 2647 | .exp = .{ |
| 2648 | .ret_len = 1, |
| 2628 | 2649 | .params = &.{ |
| 2629 | 2650 | .{ .kind = .overloaded }, |
| 2630 | 2651 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2632,6 +2653,7 @@ pub const Intrinsic = enum { |
| 2632 | 2653 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2633 | 2654 | }, |
| 2634 | 2655 | .exp2 = .{ |
| 2656 | .ret_len = 1, |
| 2635 | 2657 | .params = &.{ |
| 2636 | 2658 | .{ .kind = .overloaded }, |
| 2637 | 2659 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2639,6 +2661,7 @@ pub const Intrinsic = enum { |
| 2639 | 2661 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2640 | 2662 | }, |
| 2641 | 2663 | .ldexp = .{ |
| 2664 | .ret_len = 1, |
| 2642 | 2665 | .params = &.{ |
| 2643 | 2666 | .{ .kind = .overloaded }, |
| 2644 | 2667 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2647,13 +2670,16 @@ pub const Intrinsic = enum { |
| 2647 | 2670 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2648 | 2671 | }, |
| 2649 | 2672 | .frexp = .{ |
| 2673 | .ret_len = 2, |
| 2650 | 2674 | .params = &.{ |
| 2651 | | .{ .kind = .{ .overloaded_tuple = 2 } }, |
| 2652 | | .{ .kind = .{ .matches_tuple = .{ .param = 0, .field = 0 } } }, |
| 2675 | .{ .kind = .overloaded }, |
| 2676 | .{ .kind = .overloaded }, |
| 2677 | .{ .kind = .{ .matches = 0 } }, |
| 2653 | 2678 | }, |
| 2654 | 2679 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2655 | 2680 | }, |
| 2656 | 2681 | .log = .{ |
| 2682 | .ret_len = 1, |
| 2657 | 2683 | .params = &.{ |
| 2658 | 2684 | .{ .kind = .overloaded }, |
| 2659 | 2685 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2661,6 +2687,7 @@ pub const Intrinsic = enum { |
| 2661 | 2687 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2662 | 2688 | }, |
| 2663 | 2689 | .log10 = .{ |
| 2690 | .ret_len = 1, |
| 2664 | 2691 | .params = &.{ |
| 2665 | 2692 | .{ .kind = .overloaded }, |
| 2666 | 2693 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2668,6 +2695,7 @@ pub const Intrinsic = enum { |
| 2668 | 2695 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2669 | 2696 | }, |
| 2670 | 2697 | .log2 = .{ |
| 2698 | .ret_len = 1, |
| 2671 | 2699 | .params = &.{ |
| 2672 | 2700 | .{ .kind = .overloaded }, |
| 2673 | 2701 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2675,6 +2703,7 @@ pub const Intrinsic = enum { |
| 2675 | 2703 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2676 | 2704 | }, |
| 2677 | 2705 | .fma = .{ |
| 2706 | .ret_len = 1, |
| 2678 | 2707 | .params = &.{ |
| 2679 | 2708 | .{ .kind = .overloaded }, |
| 2680 | 2709 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2684,6 +2713,7 @@ pub const Intrinsic = enum { |
| 2684 | 2713 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2685 | 2714 | }, |
| 2686 | 2715 | .fabs = .{ |
| 2716 | .ret_len = 1, |
| 2687 | 2717 | .params = &.{ |
| 2688 | 2718 | .{ .kind = .overloaded }, |
| 2689 | 2719 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2691,6 +2721,7 @@ pub const Intrinsic = enum { |
| 2691 | 2721 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2692 | 2722 | }, |
| 2693 | 2723 | .minnum = .{ |
| 2724 | .ret_len = 1, |
| 2694 | 2725 | .params = &.{ |
| 2695 | 2726 | .{ .kind = .overloaded }, |
| 2696 | 2727 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2699,6 +2730,7 @@ pub const Intrinsic = enum { |
| 2699 | 2730 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2700 | 2731 | }, |
| 2701 | 2732 | .maxnum = .{ |
| 2733 | .ret_len = 1, |
| 2702 | 2734 | .params = &.{ |
| 2703 | 2735 | .{ .kind = .overloaded }, |
| 2704 | 2736 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2707,6 +2739,7 @@ pub const Intrinsic = enum { |
| 2707 | 2739 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2708 | 2740 | }, |
| 2709 | 2741 | .minimum = .{ |
| 2742 | .ret_len = 1, |
| 2710 | 2743 | .params = &.{ |
| 2711 | 2744 | .{ .kind = .overloaded }, |
| 2712 | 2745 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2715,6 +2748,7 @@ pub const Intrinsic = enum { |
| 2715 | 2748 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2716 | 2749 | }, |
| 2717 | 2750 | .maximum = .{ |
| 2751 | .ret_len = 1, |
| 2718 | 2752 | .params = &.{ |
| 2719 | 2753 | .{ .kind = .overloaded }, |
| 2720 | 2754 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2723,6 +2757,7 @@ pub const Intrinsic = enum { |
| 2723 | 2757 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2724 | 2758 | }, |
| 2725 | 2759 | .copysign = .{ |
| 2760 | .ret_len = 1, |
| 2726 | 2761 | .params = &.{ |
| 2727 | 2762 | .{ .kind = .overloaded }, |
| 2728 | 2763 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2731,6 +2766,7 @@ pub const Intrinsic = enum { |
| 2731 | 2766 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2732 | 2767 | }, |
| 2733 | 2768 | .floor = .{ |
| 2769 | .ret_len = 1, |
| 2734 | 2770 | .params = &.{ |
| 2735 | 2771 | .{ .kind = .overloaded }, |
| 2736 | 2772 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2738,6 +2774,7 @@ pub const Intrinsic = enum { |
| 2738 | 2774 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2739 | 2775 | }, |
| 2740 | 2776 | .ceil = .{ |
| 2777 | .ret_len = 1, |
| 2741 | 2778 | .params = &.{ |
| 2742 | 2779 | .{ .kind = .overloaded }, |
| 2743 | 2780 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2745,6 +2782,7 @@ pub const Intrinsic = enum { |
| 2745 | 2782 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2746 | 2783 | }, |
| 2747 | 2784 | .trunc = .{ |
| 2785 | .ret_len = 1, |
| 2748 | 2786 | .params = &.{ |
| 2749 | 2787 | .{ .kind = .overloaded }, |
| 2750 | 2788 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2752,6 +2790,7 @@ pub const Intrinsic = enum { |
| 2752 | 2790 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2753 | 2791 | }, |
| 2754 | 2792 | .rint = .{ |
| 2793 | .ret_len = 1, |
| 2755 | 2794 | .params = &.{ |
| 2756 | 2795 | .{ .kind = .overloaded }, |
| 2757 | 2796 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2759,6 +2798,7 @@ pub const Intrinsic = enum { |
| 2759 | 2798 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2760 | 2799 | }, |
| 2761 | 2800 | .nearbyint = .{ |
| 2801 | .ret_len = 1, |
| 2762 | 2802 | .params = &.{ |
| 2763 | 2803 | .{ .kind = .overloaded }, |
| 2764 | 2804 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2766,6 +2806,7 @@ pub const Intrinsic = enum { |
| 2766 | 2806 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2767 | 2807 | }, |
| 2768 | 2808 | .round = .{ |
| 2809 | .ret_len = 1, |
| 2769 | 2810 | .params = &.{ |
| 2770 | 2811 | .{ .kind = .overloaded }, |
| 2771 | 2812 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2773,6 +2814,7 @@ pub const Intrinsic = enum { |
| 2773 | 2814 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2774 | 2815 | }, |
| 2775 | 2816 | .roundeven = .{ |
| 2817 | .ret_len = 1, |
| 2776 | 2818 | .params = &.{ |
| 2777 | 2819 | .{ .kind = .overloaded }, |
| 2778 | 2820 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2780,6 +2822,7 @@ pub const Intrinsic = enum { |
| 2780 | 2822 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2781 | 2823 | }, |
| 2782 | 2824 | .lround = .{ |
| 2825 | .ret_len = 1, |
| 2783 | 2826 | .params = &.{ |
| 2784 | 2827 | .{ .kind = .overloaded }, |
| 2785 | 2828 | .{ .kind = .overloaded }, |
| ... | ... | @@ -2787,6 +2830,7 @@ pub const Intrinsic = enum { |
| 2787 | 2830 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2788 | 2831 | }, |
| 2789 | 2832 | .llround = .{ |
| 2833 | .ret_len = 1, |
| 2790 | 2834 | .params = &.{ |
| 2791 | 2835 | .{ .kind = .overloaded }, |
| 2792 | 2836 | .{ .kind = .overloaded }, |
| ... | ... | @@ -2794,6 +2838,7 @@ pub const Intrinsic = enum { |
| 2794 | 2838 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2795 | 2839 | }, |
| 2796 | 2840 | .lrint = .{ |
| 2841 | .ret_len = 1, |
| 2797 | 2842 | .params = &.{ |
| 2798 | 2843 | .{ .kind = .overloaded }, |
| 2799 | 2844 | .{ .kind = .overloaded }, |
| ... | ... | @@ -2801,6 +2846,7 @@ pub const Intrinsic = enum { |
| 2801 | 2846 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2802 | 2847 | }, |
| 2803 | 2848 | .llrint = .{ |
| 2849 | .ret_len = 1, |
| 2804 | 2850 | .params = &.{ |
| 2805 | 2851 | .{ .kind = .overloaded }, |
| 2806 | 2852 | .{ .kind = .overloaded }, |
| ... | ... | @@ -2809,6 +2855,7 @@ pub const Intrinsic = enum { |
| 2809 | 2855 | }, |
| 2810 | 2856 | |
| 2811 | 2857 | .bitreverse = .{ |
| 2858 | .ret_len = 1, |
| 2812 | 2859 | .params = &.{ |
| 2813 | 2860 | .{ .kind = .overloaded }, |
| 2814 | 2861 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2816,6 +2863,7 @@ pub const Intrinsic = enum { |
| 2816 | 2863 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2817 | 2864 | }, |
| 2818 | 2865 | .bswap = .{ |
| 2866 | .ret_len = 1, |
| 2819 | 2867 | .params = &.{ |
| 2820 | 2868 | .{ .kind = .overloaded }, |
| 2821 | 2869 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2823,6 +2871,7 @@ pub const Intrinsic = enum { |
| 2823 | 2871 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2824 | 2872 | }, |
| 2825 | 2873 | .ctpop = .{ |
| 2874 | .ret_len = 1, |
| 2826 | 2875 | .params = &.{ |
| 2827 | 2876 | .{ .kind = .overloaded }, |
| 2828 | 2877 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2830,6 +2879,7 @@ pub const Intrinsic = enum { |
| 2830 | 2879 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2831 | 2880 | }, |
| 2832 | 2881 | .ctlz = .{ |
| 2882 | .ret_len = 1, |
| 2833 | 2883 | .params = &.{ |
| 2834 | 2884 | .{ .kind = .overloaded }, |
| 2835 | 2885 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2838,6 +2888,7 @@ pub const Intrinsic = enum { |
| 2838 | 2888 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2839 | 2889 | }, |
| 2840 | 2890 | .cttz = .{ |
| 2891 | .ret_len = 1, |
| 2841 | 2892 | .params = &.{ |
| 2842 | 2893 | .{ .kind = .overloaded }, |
| 2843 | 2894 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2846,6 +2897,7 @@ pub const Intrinsic = enum { |
| 2846 | 2897 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2847 | 2898 | }, |
| 2848 | 2899 | .fshl = .{ |
| 2900 | .ret_len = 1, |
| 2849 | 2901 | .params = &.{ |
| 2850 | 2902 | .{ .kind = .overloaded }, |
| 2851 | 2903 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2855,6 +2907,7 @@ pub const Intrinsic = enum { |
| 2855 | 2907 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2856 | 2908 | }, |
| 2857 | 2909 | .fshr = .{ |
| 2910 | .ret_len = 1, |
| 2858 | 2911 | .params = &.{ |
| 2859 | 2912 | .{ .kind = .overloaded }, |
| 2860 | 2913 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2865,55 +2918,68 @@ pub const Intrinsic = enum { |
| 2865 | 2918 | }, |
| 2866 | 2919 | |
| 2867 | 2920 | .@"sadd.with.overflow" = .{ |
| 2921 | .ret_len = 2, |
| 2868 | 2922 | .params = &.{ |
| 2869 | | .{ .kind = .{ .matches_with_overflow = 1 } }, |
| 2870 | 2923 | .{ .kind = .overloaded }, |
| 2871 | | .{ .kind = .{ .matches = 1 } }, |
| 2924 | .{ .kind = .{ .change_scalar = .{ .index = 0, .scalar = .i1 } } }, |
| 2925 | .{ .kind = .{ .matches = 0 } }, |
| 2926 | .{ .kind = .{ .matches = 0 } }, |
| 2872 | 2927 | }, |
| 2873 | 2928 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2874 | 2929 | }, |
| 2875 | 2930 | .@"uadd.with.overflow" = .{ |
| 2931 | .ret_len = 2, |
| 2876 | 2932 | .params = &.{ |
| 2877 | | .{ .kind = .{ .matches_with_overflow = 1 } }, |
| 2878 | 2933 | .{ .kind = .overloaded }, |
| 2879 | | .{ .kind = .{ .matches = 1 } }, |
| 2934 | .{ .kind = .{ .change_scalar = .{ .index = 0, .scalar = .i1 } } }, |
| 2935 | .{ .kind = .{ .matches = 0 } }, |
| 2936 | .{ .kind = .{ .matches = 0 } }, |
| 2880 | 2937 | }, |
| 2881 | 2938 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2882 | 2939 | }, |
| 2883 | 2940 | .@"ssub.with.overflow" = .{ |
| 2941 | .ret_len = 2, |
| 2884 | 2942 | .params = &.{ |
| 2885 | | .{ .kind = .{ .matches_with_overflow = 1 } }, |
| 2886 | 2943 | .{ .kind = .overloaded }, |
| 2887 | | .{ .kind = .{ .matches = 1 } }, |
| 2944 | .{ .kind = .{ .change_scalar = .{ .index = 0, .scalar = .i1 } } }, |
| 2945 | .{ .kind = .{ .matches = 0 } }, |
| 2946 | .{ .kind = .{ .matches = 0 } }, |
| 2888 | 2947 | }, |
| 2889 | 2948 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2890 | 2949 | }, |
| 2891 | 2950 | .@"usub.with.overflow" = .{ |
| 2951 | .ret_len = 2, |
| 2892 | 2952 | .params = &.{ |
| 2893 | | .{ .kind = .{ .matches_with_overflow = 1 } }, |
| 2894 | 2953 | .{ .kind = .overloaded }, |
| 2895 | | .{ .kind = .{ .matches = 1 } }, |
| 2954 | .{ .kind = .{ .change_scalar = .{ .index = 0, .scalar = .i1 } } }, |
| 2955 | .{ .kind = .{ .matches = 0 } }, |
| 2956 | .{ .kind = .{ .matches = 0 } }, |
| 2896 | 2957 | }, |
| 2897 | 2958 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2898 | 2959 | }, |
| 2899 | 2960 | .@"smul.with.overflow" = .{ |
| 2961 | .ret_len = 2, |
| 2900 | 2962 | .params = &.{ |
| 2901 | | .{ .kind = .{ .matches_with_overflow = 1 } }, |
| 2902 | 2963 | .{ .kind = .overloaded }, |
| 2903 | | .{ .kind = .{ .matches = 1 } }, |
| 2964 | .{ .kind = .{ .change_scalar = .{ .index = 0, .scalar = .i1 } } }, |
| 2965 | .{ .kind = .{ .matches = 0 } }, |
| 2966 | .{ .kind = .{ .matches = 0 } }, |
| 2904 | 2967 | }, |
| 2905 | 2968 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2906 | 2969 | }, |
| 2907 | 2970 | .@"umul.with.overflow" = .{ |
| 2971 | .ret_len = 2, |
| 2908 | 2972 | .params = &.{ |
| 2909 | | .{ .kind = .{ .matches_with_overflow = 1 } }, |
| 2910 | 2973 | .{ .kind = .overloaded }, |
| 2911 | | .{ .kind = .{ .matches = 1 } }, |
| 2974 | .{ .kind = .{ .change_scalar = .{ .index = 0, .scalar = .i1 } } }, |
| 2975 | .{ .kind = .{ .matches = 0 } }, |
| 2976 | .{ .kind = .{ .matches = 0 } }, |
| 2912 | 2977 | }, |
| 2913 | 2978 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2914 | 2979 | }, |
| 2915 | 2980 | |
| 2916 | 2981 | .@"sadd.sat" = .{ |
| 2982 | .ret_len = 1, |
| 2917 | 2983 | .params = &.{ |
| 2918 | 2984 | .{ .kind = .overloaded }, |
| 2919 | 2985 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2922,6 +2988,7 @@ pub const Intrinsic = enum { |
| 2922 | 2988 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2923 | 2989 | }, |
| 2924 | 2990 | .@"uadd.sat" = .{ |
| 2991 | .ret_len = 1, |
| 2925 | 2992 | .params = &.{ |
| 2926 | 2993 | .{ .kind = .overloaded }, |
| 2927 | 2994 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2930,6 +2997,7 @@ pub const Intrinsic = enum { |
| 2930 | 2997 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2931 | 2998 | }, |
| 2932 | 2999 | .@"ssub.sat" = .{ |
| 3000 | .ret_len = 1, |
| 2933 | 3001 | .params = &.{ |
| 2934 | 3002 | .{ .kind = .overloaded }, |
| 2935 | 3003 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2938,6 +3006,7 @@ pub const Intrinsic = enum { |
| 2938 | 3006 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2939 | 3007 | }, |
| 2940 | 3008 | .@"usub.sat" = .{ |
| 3009 | .ret_len = 1, |
| 2941 | 3010 | .params = &.{ |
| 2942 | 3011 | .{ .kind = .overloaded }, |
| 2943 | 3012 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2946,6 +3015,7 @@ pub const Intrinsic = enum { |
| 2946 | 3015 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2947 | 3016 | }, |
| 2948 | 3017 | .@"sshl.sat" = .{ |
| 3018 | .ret_len = 1, |
| 2949 | 3019 | .params = &.{ |
| 2950 | 3020 | .{ .kind = .overloaded }, |
| 2951 | 3021 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2954,6 +3024,7 @@ pub const Intrinsic = enum { |
| 2954 | 3024 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2955 | 3025 | }, |
| 2956 | 3026 | .@"ushl.sat" = .{ |
| 3027 | .ret_len = 1, |
| 2957 | 3028 | .params = &.{ |
| 2958 | 3029 | .{ .kind = .overloaded }, |
| 2959 | 3030 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2963,6 +3034,7 @@ pub const Intrinsic = enum { |
| 2963 | 3034 | }, |
| 2964 | 3035 | |
| 2965 | 3036 | .@"smul.fix" = .{ |
| 3037 | .ret_len = 1, |
| 2966 | 3038 | .params = &.{ |
| 2967 | 3039 | .{ .kind = .overloaded }, |
| 2968 | 3040 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2972,6 +3044,7 @@ pub const Intrinsic = enum { |
| 2972 | 3044 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2973 | 3045 | }, |
| 2974 | 3046 | .@"umul.fix" = .{ |
| 3047 | .ret_len = 1, |
| 2975 | 3048 | .params = &.{ |
| 2976 | 3049 | .{ .kind = .overloaded }, |
| 2977 | 3050 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2981,6 +3054,7 @@ pub const Intrinsic = enum { |
| 2981 | 3054 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2982 | 3055 | }, |
| 2983 | 3056 | .@"smul.fix.sat" = .{ |
| 3057 | .ret_len = 1, |
| 2984 | 3058 | .params = &.{ |
| 2985 | 3059 | .{ .kind = .overloaded }, |
| 2986 | 3060 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2990,6 +3064,7 @@ pub const Intrinsic = enum { |
| 2990 | 3064 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 2991 | 3065 | }, |
| 2992 | 3066 | .@"umul.fix.sat" = .{ |
| 3067 | .ret_len = 1, |
| 2993 | 3068 | .params = &.{ |
| 2994 | 3069 | .{ .kind = .overloaded }, |
| 2995 | 3070 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -2999,6 +3074,7 @@ pub const Intrinsic = enum { |
| 2999 | 3074 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3000 | 3075 | }, |
| 3001 | 3076 | .@"sdiv.fix" = .{ |
| 3077 | .ret_len = 1, |
| 3002 | 3078 | .params = &.{ |
| 3003 | 3079 | .{ .kind = .overloaded }, |
| 3004 | 3080 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -3008,6 +3084,7 @@ pub const Intrinsic = enum { |
| 3008 | 3084 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3009 | 3085 | }, |
| 3010 | 3086 | .@"udiv.fix" = .{ |
| 3087 | .ret_len = 1, |
| 3011 | 3088 | .params = &.{ |
| 3012 | 3089 | .{ .kind = .overloaded }, |
| 3013 | 3090 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -3017,6 +3094,7 @@ pub const Intrinsic = enum { |
| 3017 | 3094 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3018 | 3095 | }, |
| 3019 | 3096 | .@"sdiv.fix.sat" = .{ |
| 3097 | .ret_len = 1, |
| 3020 | 3098 | .params = &.{ |
| 3021 | 3099 | .{ .kind = .overloaded }, |
| 3022 | 3100 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -3026,6 +3104,7 @@ pub const Intrinsic = enum { |
| 3026 | 3104 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3027 | 3105 | }, |
| 3028 | 3106 | .@"udiv.fix.sat" = .{ |
| 3107 | .ret_len = 1, |
| 3029 | 3108 | .params = &.{ |
| 3030 | 3109 | .{ .kind = .overloaded }, |
| 3031 | 3110 | .{ .kind = .{ .matches = 0 } }, |
| ... | ... | @@ -3036,62 +3115,67 @@ pub const Intrinsic = enum { |
| 3036 | 3115 | }, |
| 3037 | 3116 | |
| 3038 | 3117 | .trap = .{ |
| 3039 | | .params = &.{ |
| 3040 | | .{ .kind = .{ .type = .void } }, |
| 3041 | | }, |
| 3118 | .ret_len = 0, |
| 3119 | .params = &.{}, |
| 3042 | 3120 | .attrs = &.{ .cold, .noreturn, .nounwind, .{ .memory = .{ .inaccessiblemem = .write } } }, |
| 3043 | 3121 | }, |
| 3044 | 3122 | .debugtrap = .{ |
| 3045 | | .params = &.{ |
| 3046 | | .{ .kind = .{ .type = .void } }, |
| 3047 | | }, |
| 3123 | .ret_len = 0, |
| 3124 | .params = &.{}, |
| 3048 | 3125 | .attrs = &.{.nounwind}, |
| 3049 | 3126 | }, |
| 3050 | 3127 | .ubsantrap = .{ |
| 3128 | .ret_len = 0, |
| 3051 | 3129 | .params = &.{ |
| 3052 | | .{ .kind = .{ .type = .void } }, |
| 3053 | 3130 | .{ .kind = .{ .type = .i8 }, .attrs = &.{.immarg} }, |
| 3054 | 3131 | }, |
| 3055 | 3132 | .attrs = &.{ .cold, .noreturn, .nounwind }, |
| 3056 | 3133 | }, |
| 3057 | 3134 | |
| 3058 | 3135 | .@"amdgcn.workitem.id.x" = .{ |
| 3136 | .ret_len = 1, |
| 3059 | 3137 | .params = &.{ |
| 3060 | 3138 | .{ .kind = .{ .type = .i32 } }, |
| 3061 | 3139 | }, |
| 3062 | 3140 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3063 | 3141 | }, |
| 3064 | 3142 | .@"amdgcn.workitem.id.y" = .{ |
| 3143 | .ret_len = 1, |
| 3065 | 3144 | .params = &.{ |
| 3066 | 3145 | .{ .kind = .{ .type = .i32 } }, |
| 3067 | 3146 | }, |
| 3068 | 3147 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3069 | 3148 | }, |
| 3070 | 3149 | .@"amdgcn.workitem.id.z" = .{ |
| 3150 | .ret_len = 1, |
| 3071 | 3151 | .params = &.{ |
| 3072 | 3152 | .{ .kind = .{ .type = .i32 } }, |
| 3073 | 3153 | }, |
| 3074 | 3154 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3075 | 3155 | }, |
| 3076 | 3156 | .@"amdgcn.workgroup.id.x" = .{ |
| 3157 | .ret_len = 1, |
| 3077 | 3158 | .params = &.{ |
| 3078 | 3159 | .{ .kind = .{ .type = .i32 } }, |
| 3079 | 3160 | }, |
| 3080 | 3161 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3081 | 3162 | }, |
| 3082 | 3163 | .@"amdgcn.workgroup.id.y" = .{ |
| 3164 | .ret_len = 1, |
| 3083 | 3165 | .params = &.{ |
| 3084 | 3166 | .{ .kind = .{ .type = .i32 } }, |
| 3085 | 3167 | }, |
| 3086 | 3168 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3087 | 3169 | }, |
| 3088 | 3170 | .@"amdgcn.workgroup.id.z" = .{ |
| 3171 | .ret_len = 1, |
| 3089 | 3172 | .params = &.{ |
| 3090 | 3173 | .{ .kind = .{ .type = .i32 } }, |
| 3091 | 3174 | }, |
| 3092 | 3175 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3093 | 3176 | }, |
| 3094 | 3177 | .@"amdgcn.dispatch.ptr" = .{ |
| 3178 | .ret_len = 1, |
| 3095 | 3179 | .params = &.{ |
| 3096 | 3180 | .{ |
| 3097 | 3181 | .kind = .{ .type = Type.ptr_amdgpu_constant }, |
| ... | ... | @@ -3102,6 +3186,7 @@ pub const Intrinsic = enum { |
| 3102 | 3186 | }, |
| 3103 | 3187 | |
| 3104 | 3188 | .@"wasm.memory.size" = .{ |
| 3189 | .ret_len = 1, |
| 3105 | 3190 | .params = &.{ |
| 3106 | 3191 | .{ .kind = .overloaded }, |
| 3107 | 3192 | .{ .kind = .{ .type = .i32 } }, |
| ... | ... | @@ -3109,6 +3194,7 @@ pub const Intrinsic = enum { |
| 3109 | 3194 | .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, |
| 3110 | 3195 | }, |
| 3111 | 3196 | .@"wasm.memory.grow" = .{ |
| 3197 | .ret_len = 1, |
| 3112 | 3198 | .params = &.{ |
| 3113 | 3199 | .{ .kind = .overloaded }, |
| 3114 | 3200 | .{ .kind = .{ .type = .i32 } }, |
| ... | ... | @@ -7627,8 +7713,10 @@ pub fn getIntrinsic( |
| 7627 | 7713 | const signature = Intrinsic.signatures.get(id); |
| 7628 | 7714 | const param_types = try allocator.alloc(Type, signature.params.len); |
| 7629 | 7715 | defer allocator.free(param_types); |
| 7630 | | const function_attributes = |
| 7631 | | try allocator.alloc(Attributes, FunctionAttributes.return_index + signature.params.len); |
| 7716 | const function_attributes = try allocator.alloc( |
| 7717 | Attributes, |
| 7718 | FunctionAttributes.params_index + (signature.params.len - signature.ret_len), |
| 7719 | ); |
| 7632 | 7720 | defer allocator.free(function_attributes); |
| 7633 | 7721 | |
| 7634 | 7722 | var attributes: struct { |
| ... | ... | @@ -7651,42 +7739,37 @@ pub fn getIntrinsic( |
| 7651 | 7739 | |
| 7652 | 7740 | var overload_index: usize = 0; |
| 7653 | 7741 | function_attributes[FunctionAttributes.function_index] = try attributes.get(signature.attrs); |
| 7654 | | for ( |
| 7655 | | param_types, |
| 7656 | | function_attributes[FunctionAttributes.return_index..], |
| 7657 | | signature.params, |
| 7658 | | ) |*param_type, *param_attributes, signature_param| { |
| 7742 | for (0.., param_types, signature.params) |param_index, *param_type, signature_param| { |
| 7659 | 7743 | switch (signature_param.kind) { |
| 7660 | 7744 | .type => |ty| param_type.* = ty, |
| 7745 | .change_scalar => |info| { |
| 7746 | assert(info.index < param_index); |
| 7747 | param_type.* = try param_types[info.index].changeScalar(info.scalar, self); |
| 7748 | }, |
| 7661 | 7749 | .overloaded => { |
| 7662 | 7750 | param_type.* = overload[overload_index]; |
| 7663 | 7751 | overload_index += 1; |
| 7664 | 7752 | }, |
| 7665 | | .overloaded_tuple => |len| { |
| 7666 | | const fields = try allocator.alloc(Type, len); |
| 7667 | | defer allocator.free(fields); |
| 7668 | | for (fields, overload[overload_index..][0..len]) |*field, ty| field.* = ty; |
| 7669 | | param_type.* = try self.structType(.normal, fields); |
| 7670 | | overload_index += len; |
| 7753 | .matches => |index| { |
| 7754 | assert(index < param_index); |
| 7755 | param_type.* = param_types[index]; |
| 7671 | 7756 | }, |
| 7672 | | .matches, .matches_tuple, .matches_with_overflow => {}, |
| 7673 | 7757 | } |
| 7674 | | param_attributes.* = try attributes.get(signature_param.attrs); |
| 7758 | function_attributes[ |
| 7759 | if (param_index < signature.ret_len) |
| 7760 | FunctionAttributes.return_index |
| 7761 | else |
| 7762 | FunctionAttributes.params_index + (param_index - signature.ret_len) |
| 7763 | ] = try attributes.get(signature_param.attrs); |
| 7675 | 7764 | } |
| 7676 | 7765 | assert(overload_index == overload.len); |
| 7677 | | for (param_types, signature.params) |*param_type, signature_param| switch (signature_param.kind) { |
| 7678 | | .type, .overloaded, .overloaded_tuple => {}, |
| 7679 | | .matches => |param_index| param_type.* = param_types[param_index], |
| 7680 | | .matches_tuple => |tuple| param_type.* = |
| 7681 | | param_types[tuple.param].structFields(self)[tuple.field], |
| 7682 | | .matches_with_overflow => |param_index| { |
| 7683 | | const ty = param_types[param_index]; |
| 7684 | | param_type.* = try self.structType(.normal, &.{ ty, try ty.changeScalar(.i1, self) }); |
| 7685 | | }, |
| 7686 | | }; |
| 7687 | 7766 | |
| 7688 | 7767 | const function_index = |
| 7689 | | try self.addFunction(try self.fnType(param_types[0], param_types[1..], .normal), name); |
| 7768 | try self.addFunction(try self.fnType(switch (signature.ret_len) { |
| 7769 | 0 => .void, |
| 7770 | 1 => param_types[0], |
| 7771 | else => try self.structType(.normal, param_types[0..signature.ret_len]), |
| 7772 | }, param_types[signature.ret_len..], .normal), name); |
| 7690 | 7773 | function_index.ptr(self).attributes = try self.fnAttrs(function_attributes); |
| 7691 | 7774 | return function_index; |
| 7692 | 7775 | } |