0

I am curious if I can develop my own programming language to output Cranelift or LLVM IRs, then use it to make a simple OS from scratch?

Specifically, do the instruction sets of Cranelift/LLVM IRs contain OS-level IO instructions?

Thank you.

geeko
  • 2,649
  • 4
  • 32
  • 59
  • LLVM-IR must allow inline-asm, since clang can compile C sources that use inline asm, and I think that works even if you compile through a temporary file with LLVM-IR text. I don't know whether there are other ways to represent special instructions like x86 `invlpg` in LLVM-IR; I'd guess not. – Peter Cordes Dec 18 '22 at 06:56
  • Hi @PeterCordes. I have posted another question related to this one if you would like to pass by: https://stackoverflow.com/questions/74842486/can-io-of-different-cpu-architectures-be-abstracted-with-an-instruction-set-for – geeko Dec 18 '22 at 15:15

0 Answers0