Date: Mon, 17 Nov 2014 22:00:37 -0500 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: [PATCH] ARM atomics overhaul, try 1 Here's my first draft of the ARM atomics overhaul. The results should be ideal for v7+, but I'm not entirely happey with the code for supporting fallbacks. Right now the concept is to have multiple fallback versions of the code laid out exactly like the kuser helper page, and just select one of these. A relative address is used so that the default of zero at early load time results in using safe "fake atomics" that don't depend on kuser helper page or v6/v7 instructions. But there's a lot of overhead loading the address to make the indirect call that happens on each atomic. It probably doesn't perform that bad, but it bloats the code size a good bit. An alternative that might be less ugly is making direct calls to external functons written in asm, and having the latter do the dispatch to different versions of the code. I've tried this a few times though and I wasn't too happy with where it was going. Other ideas/comments are welcome! Rich View attachment "arm_atomics_overhaul_try1.diff" of type "text/plain" (10456 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.