Do projects use the same subset of inline assembly?
3. Quantitive Results
How common is inline assembly in C programs?
28.1% of the most popular and 11.2% of the keyword-selected projects contained inline assembly. C projects with inline assembly which were analyzed in detail contained on average 3.7 unique inline assembly fragments (median of 2).
How long is the average inline assembly fragment?
17.3% of all C projects with inline assembly contained macro-metaprogramming and many large inline assembly fragments that were omitted from our detailed analysis. Inline assembly fragments contained on average 9.9 instructions (median of 1) per fragment.
In which domains is inline assembly used?
Inline assembly is used in many domains, most commonly in projects for crypto, networking, media, databases, language implementations, concurrency, ssl, string and math libraries.
4. Use Cases of inline assembly Instructions
What is inline assembly used for?
Inline assembly is used to ensure correct semantics on multiple cores, for performance optimization, to access functionality that is unavailable in C, and to implement arithmetic operations.
Do projects use the same subset of inline assembly?
By implementing 50 instructions (5% of x86-64’s total number of instructions) tool writers could support 64.5% of all projects that contain inline assembly.
An Analysis of x86-64 Inline Assembly in C programs
Abstract
Introduction
2. Methodology
2.1 Research Questions
3. Quantitive Results
28.1% of the most popular and 11.2% of the keyword-selected projects contained inline assembly. C projects with inline assembly which were analyzed in detail contained on average 3.7 unique inline assembly fragments (median of 2).
17.3% of all C projects with inline assembly contained macro-metaprogramming and many large inline assembly fragments that were omitted from our detailed analysis. Inline assembly fragments contained on average 9.9 instructions (median of 1) per fragment.
Inline assembly is used in many domains, most commonly in projects for crypto, networking, media, databases, language implementations, concurrency, ssl, string and math libraries.
4. Use Cases of inline assembly Instructions
Inline assembly is used to ensure correct semantics on multiple cores, for performance optimization, to access functionality that is unavailable in C, and to implement arithmetic operations.
By implementing 50 instructions (5% of x86-64’s total number of instructions) tool writers could support 64.5% of all projects that contain inline assembly.