Title
Lasagne: a static binary translator for weak memory model architectures
Author
Rocha, Rodrigo C.O. (The University of Edinburgh)
Sprokholt, D.G. (TU Delft Programming Languages)
Fink, Martin (Technische Universität München)
Gouicem, Redha (Technische Universität München)
Spink, Tom (University of St Andrews)
Chakraborty, S.S. (TU Delft Programming Languages)
Bhatotia, Pramod (Technische Universität München)
Contributor
Jhala, Ranjit (editor)
Dillig, Isil (editor)
Date
2022
Abstract
The emergence of new architectures create a recurring challenge to ensure that existing programs still work on them. Manually porting legacy code is often impractical. Static binary translation (SBT) is a process where a program's binary is automatically translated from one architecture to another, while preserving their original semantics. However, these SBT tools have limited support to various advanced architectural features. Importantly, they are currently unable to translate concurrent binaries. The main challenge arises from the mismatches of the memory consistency model specified by the different architectures, especially when porting existing binaries to a weak memory model architecture. In this paper, we propose Lasagne, an end-to-end static binary translator with precise translation rules between x86 and Arm concurrency semantics. First, we propose a concurrency model for Lasagne's intermediate representation (IR) and formally proved mappings between the IR and the two architectures. The memory ordering is preserved by introducing fences in the translated code. Finally, we propose optimizations focused on raising the level of abstraction of memory address calculations and reducing the number of fences. Our evaluation shows that Lasagne reduces the number of fences by up to about 65%, with an average reduction of 45.5%, significantly reducing their runtime overhead.
Subject
Binary Translation
Compiler
Memory Model
To reference this document use:
http://resolver.tudelft.nl/uuid:869a2249-19dd-4a54-a4f5-6184cba7bb08
DOI
https://doi.org/10.1145/3519939.3523719
Publisher
Association for Computing Machinery (ACM)
Embargo date
2023-07-01
ISBN
9781450392655
Source
PLDI 2022 - Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation
Event
43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022, 2022-06-13 → 2022-06-17, Virtual, Online, United States
Series
Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI)
Bibliographical note
Green Open Access added to TU Delft Institutional Repository 'You share, we take care!' - Taverne project https://www.openaccess.nl/en/you-share-we-take-care Otherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public.
Part of collection
Institutional Repository
Document type
conference paper
Rights
© 2022 Rodrigo C.O. Rocha, D.G. Sprokholt, Martin Fink, Redha Gouicem, Tom Spink, S.S. Chakraborty, Pramod Bhatotia