Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline struct/tuple returns #10

Open
N00byEdge opened this issue May 31, 2023 · 0 comments
Open

Inline struct/tuple returns #10

N00byEdge opened this issue May 31, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@N00byEdge
Copy link
Member

N00byEdge commented May 31, 2023

Currently, you can only make normal structs that can be returned through RLS and not normal returns.
We should add declarations for inline structs which can be returned through (multiple) registers but not RLS:

const T = struct inline {
  a: u64,
  b: u64,
};

fn f() T {
  return .{
    .a = 5,
    .b = 3,
  };
}

->

f:
  mov rax, 5
  mov rbx, 3
  ret
@N00byEdge N00byEdge changed the title Inline structs Inline struct/tuple returns May 31, 2023
@N00byEdge N00byEdge added the enhancement New feature or request label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant