LLVM and XC Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

Folknology wrote:Assuming XC isn't available (unless there are ways of providing binaries/source) I would like to be able to do the equivalent of selects/switches with non arrayed unique resources and labels, C based select functions, port,timer and channel selection and config, as a bonus logical core/thread spawning would also be nice from C/C++. There are prob a good few of the intrinsics in xs1.h that get ifdef'd out I would also like access to. So as much documentation as possible for me really, although I still personally have a long way to go getting my head around LLVM first.

regards
Al
I think what makes sense here is for me to create a github repo with some examples .ll files and documentation - seem sensible?


View Solution
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm
Contact:

Post by Folknology »

richard wrote: I think what makes sense here is for me to create a github repo with some examples .ll files and documentation - seem sensible?
That would be excellent and I know you are busy, I will probably start with the event waiting/branching and then work on the other stuff (Spawning etc..) later, you have already provided some good clues, but some concrete examples would help a great deal, also don't assume much in the way of LLVM experience!

regards
Al
Guest

Post by Guest »

Thanks, Richard. Very helpful post!
richard wrote:Do you need the backend to emit binary code directly (i.e. without an external assembler)? Currently this isn't supported and the XCoreInstructionInfo.td file don't specify any instruction encoding information.
Ideally, yes. For release it would be nice to not require an external assembler. For now I can link the generated asm into the main binary, which works for development. We'll have to look into adding support for that if we get there before you do.
richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

I've uploaded some examples demonstrating how the intrinsics can be used to start threads, use events, do I/O operations, etc.

https://github.com/xcore/llvm_xcore_examples
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm
Contact:

Post by Folknology »

Brilliant Thanks Richard, I shall take a look at these over the weekend.

regards
Al
Post Reply