An Analysis of x86-64 Inline Assembly in C Programs

Manuel Rigger, Stefan Marr, Stephen Kell, David Leopoldseder, H. Mössenböck
{"title":"An Analysis of x86-64 Inline Assembly in C Programs","authors":"Manuel Rigger, Stefan Marr, Stephen Kell, David Leopoldseder, H. Mössenböck","doi":"10.1145/3186411.3186418","DOIUrl":null,"url":null,"abstract":"C codebases frequently embed nonportable and unstandardized elements such as inline assembly code. Such elements are not well understood, which poses a problem to tool developers who aspire to support C code. This paper investigates the use of x86-64 inline assembly in 1264 C projects from GitHub and combines qualitative and quantitative analyses to answer questions that tool authors may have. We found that 28.1% of the most popular projects contain inline assembly code, although the majority contain only a few fragments with just one or two instructions. The most popular instructions constitute a small subset concerned largely with multicore semantics, performance optimization, and hardware control. Our findings are intended to help developers of C-focused tools, those testing compilers, and language designers seeking to reduce the reliance on inline assembly. They may also aid the design of tools focused on inline assembly itself.","PeriodicalId":176740,"journal":{"name":"Proceedings of the 14th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments","volume":"66 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-03-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"17","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 14th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3186411.3186418","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 17

Abstract

C codebases frequently embed nonportable and unstandardized elements such as inline assembly code. Such elements are not well understood, which poses a problem to tool developers who aspire to support C code. This paper investigates the use of x86-64 inline assembly in 1264 C projects from GitHub and combines qualitative and quantitative analyses to answer questions that tool authors may have. We found that 28.1% of the most popular projects contain inline assembly code, although the majority contain only a few fragments with just one or two instructions. The most popular instructions constitute a small subset concerned largely with multicore semantics, performance optimization, and hardware control. Our findings are intended to help developers of C-focused tools, those testing compilers, and language designers seeking to reduce the reliance on inline assembly. They may also aid the design of tools focused on inline assembly itself.
C程序中x86-64内联汇编的分析
C代码库经常嵌入不可移植和未标准化的元素,如内联汇编代码。这些元素不能很好地理解,这给渴望支持C代码的工具开发人员带来了问题。本文调查了在GitHub的1264 C项目中使用x86-64内联汇编,并结合定性和定量分析来回答工具作者可能有的问题。我们发现28.1%的最受欢迎的项目包含内联汇编代码,尽管大多数项目只包含几个片段,只有一个或两个指令。最流行的指令构成了一个小子集,主要涉及多核语义、性能优化和硬件控制。我们的发现旨在帮助以c为中心的工具的开发人员、测试编译器的开发人员和语言设计人员减少对内联汇编的依赖。它们还可以帮助设计专注于内联汇编本身的工具。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信