▲ | inetknght 6 days ago | ||||||||||||||||||||||||||||
Overall, this is a fantastic dive into some of RISC-V's architecture and how to use it. But I do have some comments: > However, in Chata's case, it needs to access a RISC-V assembler from within its C++ code. The alternative is to use some ugly C function like system() to run external software as if it were a human or script running a command in a terminal. Have you tried LLVM's C++ API [0]? To be fair, I do think there's merit in writing your own assembler with your own API. But you don't necessarily have to. I'm not likely to go back to assembly unless my employer needs that extra level of optimization. But if/when I do, and the target platform is RISC-V, then I'll definitely consider Ultraseembler. > It's not clear when exactly exceptions are slow. I had to do some research here. There are plenty of cppcon presentations [1] about exceptions, performance, caveats, blah blah. There's also other C++ conferences that have similar presentations (or even, almost identical presentations because the presenters go to multiple conferences), though I don't have a link handy because I pretty much only attend cppcon. [0]: https://stackoverflow.com/questions/10675661/what-exactly-is... [1]: https://www.youtube.com/results?search_query=cppcon+exceptio... | |||||||||||||||||||||||||||||
▲ | netr0ute 6 days ago | parent [-] | ||||||||||||||||||||||||||||
> LLVM's C++ API I think I read something about this but couldn't figure out how to use it because the documentation is horrible. So, I found it easier to implement my own, and as it turns out, there are a few HORRIBLE bugs in the LLVM assembler (from cross reference testing) probably because nobody is using the C++ API. > There are plenty of cppcon presentations [1] about exceptions, performance, caveats, blah blah. I don't have enough time to watch these kinds of presentations. | |||||||||||||||||||||||||||||
|