Computer Science > Programming Languages
arXiv:2408.17208 (cs)
[Submitted on 30 Aug 2024 (v1), last revised 2 Sep 2024 (this version, v2)]
Title:Extending the C/C++ Memory Model with Inline Assembly
View a PDF of the paper titled Extending the C/C++ Memory Model with Inline Assembly, by Paulo Em\'ilio de Vilhena and 3 other authors
View PDF
Abstract:Programs written in C/C++ often include inline assembly: a snippet of architecture-specific assembly code used to access low-level functionalities that are impossible or expensive to simulate in the source language. Although inline assembly is widely used, its semantics has not yet been formally studied.
In this paper, we overcome this deficiency by investigating the effect of inline assembly on the consistency semantics of C/C++ programs. We propose the first memory model of the C++ Programming Language with support for inline assembly for Intel's x86 including non-temporal stores and store fences. We argue that previous provably correct compiler optimizations and correct compiler mappings should remain correct under such an extended model and we prove that this requirement is met by our proposed model.
| Subjects: | Programming Languages (cs.PL) |
| ACM classes: | F.3.2 |
| Cite as: | arXiv:2408.17208 [cs.PL] |
| (or arXiv:2408.17208v2 [cs.PL] for this version) | |
| https://doi.org/10.48550/arXiv.2408.17208
arXiv-issued DOI via DataCite
|
|
| Related DOI: | https://doi.org/10.1145/3689749
DOI(s) linking to related resources
|
Submission history
From: Paulo Emílio De Vilhena [view email][v1] Fri, 30 Aug 2024 11:27:33 UTC (2,228 KB)
[v2] Mon, 2 Sep 2024 09:35:11 UTC (2,228 KB)
Full-text links:
Access Paper:
- View PDF
- TeX Source
View a PDF of the paper titled Extending the C/C++ Memory Model with Inline Assembly, by Paulo Em\'ilio de Vilhena and 3 other authors
References & Citations
Loading...
BibTeX formatted citation
Data provided by:
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
