Re: [Gc] libatomic-ops nios2
Chung-Lin Tang <[email protected]> Thu, 28 Jan 2016 16:36:25 +0900
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <[email protected]> |
On 2016/1/28 12:28 PM, Marek Vasut wrote: >> You may want to go the direct kuser route. A little bit of inline asm >> > should get you more performance compared to calling into libgcc, and >> > nios2 softcores can really use that bit of optimization. That's also >> > what I did in glibc. > Aren't those gcc builtins expanded in place anyway ? Or do you see some > real performance drop if you don't use the kuser helper directly ? No, the GCC builtins are not expanded inline, the __sync_* routines are implemented in libgcc. I have no evidence of significant performance gaps, though at least under PIC, the nios2 function call overhead is a bit costly. However, my concerns may be unfounded. > btw. I tried making two patches, one for libatomic-ops and one for bdwgc, > find them below, but I have no clue if they are correct: I'm not familiar with this code to review, but if there is a generic implementation ready to use, then it should work for nios2. You can just start there. Chung-Lin