C程序中x86-64内联汇编的分析

Manuel Rigger, Stefan Marr, Stephen Kell, David Leopoldseder, H. Mössenböck
{"title":"C程序中x86-64内联汇编的分析","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":"{\"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}","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

摘要

C代码库经常嵌入不可移植和未标准化的元素,如内联汇编代码。这些元素不能很好地理解,这给渴望支持C代码的工具开发人员带来了问题。本文调查了在GitHub的1264 C项目中使用x86-64内联汇编,并结合定性和定量分析来回答工具作者可能有的问题。我们发现28.1%的最受欢迎的项目包含内联汇编代码,尽管大多数项目只包含几个片段,只有一个或两个指令。最流行的指令构成了一个小子集,主要涉及多核语义、性能优化和硬件控制。我们的发现旨在帮助以c为中心的工具的开发人员、测试编译器的开发人员和语言设计人员减少对内联汇编的依赖。它们还可以帮助设计专注于内联汇编本身的工具。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
An Analysis of x86-64 Inline Assembly in C Programs
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Improving Dynamically-Generated Code Performance on Dynamic Binary Translators Demon: An Efficient Solution for on-Device MMU Virtualization in Mediated Pass-Through Hop, Skip, & Jump: Practical On-Stack Replacement for a Cross-Platform Language-Neutral VM gMig: Efficient GPU Live Migration Optimized by Software Dirty Page for Full Virtualization Fast PokeEMU: Scaling Generated Instruction Tests Using Aggregation and State Chaining
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1