[LLVMdev] LLVM and newlib progress
Pertti Kellomäki
pk at cs.tut.fi
Thu Nov 9 12:04:08 PST 2006
John Criswell kirjoitti:
> So, let me see if I understand this right:
>
> First, it sounds like you're programming on the bare processor, so your
> I/O instructions are either special processor instructions or volatile
> loads/stores to special memory locations.
Yes. In more detail, instruction words directly control the
data transports inside the processor, and I/O is handled
by transporting data into a special function unit.
> In that case, you would not
> use a "system call" intrinsic;
Correct.
> you would use an ioread/iowrite intrinsic
> (these are similar to load/store and are briefly documented in the
> LLVA-OS paper).
Which I should probably read, it seems.
If you're doing memory mapped I/O, you could probably
> use LLVM volatile load/store instructions and not have to add any
> intrinsics.
We could do memory mapped I/O, but I don't thing it is being
considered.
> Second, you could implement these "intrinsics" as either external
> functions or as LLVM intrinsic functions specially handled by the code
> generator. I believe you're saying that the encoding of the I/O
> instructions change.
It is up to the processor designer to decide where the
I/O units are located in the processor, so yes.
> If that is the case, then you are right: adding an
> intrinsic and having the LLVM code generator generate the right
> instructions would probably be easiest.
>
> Do I understand things correctly?
It would seem so. Thanks for your insights!
--
Pertti
More information about the llvm-dev
mailing list