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

Implement printf #298

Open
Chobbes opened this issue Aug 5, 2022 · 1 comment
Open

Implement printf #298

Chobbes opened this issue Aug 5, 2022 · 1 comment
Labels
enhancement Semantics related to LLVM semantics

Comments

@Chobbes
Copy link
Member

Chobbes commented Aug 5, 2022

No description provided.

@Chobbes Chobbes added enhancement Semantics related to LLVM semantics labels Aug 5, 2022
@Zdancewic
Copy link
Contributor

The best way to implement printf is probably to:

  1. implement puts
  2. add support for the llvm vararg constructs
  3. implement, by hand, a crafted version of printf in C that uses only constructs our semantics supports
  4. compile the C code to LLVM, use our frontend to reify that LLVM as LLVMAst
  5. write an intrinsic handler that uses that LLVM code as the semantics for the call

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

No branches or pull requests

2 participants