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

[feature] Calling convention: using stack instead of registers for passing arguments and multiple return values #37

Open
bchyl opened this issue Mar 15, 2023 · 1 comment
Assignees

Comments

@bchyl
Copy link
Contributor

bchyl commented Mar 15, 2023

passing arguments:

m+1 arguments: when m<=2 only need registers.

note [fp,-1] and [fp,-2] reserved for pc and lr

  • r1
  • r2
  • r3
  • [fp,-3]
  • [fp,-4]
  • ...
  • [fp,-m]

return values:

n+1 return values: when n<1 only need r0 registers

  • r0
  • [fp,-(m+1)]
  • [fp,-(m+2)]
  • ...
  • [fp,-(m+n)]
@bchyl bchyl self-assigned this Mar 15, 2023
@bchyl
Copy link
Contributor Author

bchyl commented Mar 27, 2023

fast call model for llvm irgen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant