This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Open AccessArticle
Reverse Engineering the Branch Target Buffer Organizations on Apple M2
by
Taehee Kim
Taehee Kim and
Hyunwoo Choi
Hyunwoo Choi *
Department of Convergence Security Engineering, Sungshin Women’s University, Seoul 02844, Republic of Korea
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(23), 4686; https://doi.org/10.3390/electronics14234686 (registering DOI)
Submission received: 7 November 2025
/
Revised: 25 November 2025
/
Accepted: 26 November 2025
/
Published: 27 November 2025
Abstract
Modern high-performance processors employ sophisticated branch prediction mechanisms to minimize control hazards and maximize instruction-level parallelism. A core component of this mechanism is the Branch Target Buffer (BTB), a critical hardware structure responsible for storing branch target addresses and enabling rapid fetch redirection. While the BTB has been extensively studied in x86 architectures, its internal behavior and organization on ARM-based Apple Silicon remain largely unexplored. In this work, we present an empirical reverse engineering study of the BTB implementation on Apple Silicon, with a focus on the M2 processor. By leveraging targeted microbenchmarks, we characterize key parameters such as BTB size, set indexing bit, and associativity. Based on our empirical analysis, we estimate that the M2 BTB comprises approximately 2K entries, employs nine set index bits, and features four-way associativity. This work provides the first systematic public dissection of the BTB on Apple Silicon and lays the groundwork for further architectural exploration and tooling development within this closed ecosystem.
Share and Cite
MDPI and ACS Style
Kim, T.; Choi, H.
Reverse Engineering the Branch Target Buffer Organizations on Apple M2. Electronics 2025, 14, 4686.
https://doi.org/10.3390/electronics14234686
AMA Style
Kim T, Choi H.
Reverse Engineering the Branch Target Buffer Organizations on Apple M2. Electronics. 2025; 14(23):4686.
https://doi.org/10.3390/electronics14234686
Chicago/Turabian Style
Kim, Taehee, and Hyunwoo Choi.
2025. "Reverse Engineering the Branch Target Buffer Organizations on Apple M2" Electronics 14, no. 23: 4686.
https://doi.org/10.3390/electronics14234686
APA Style
Kim, T., & Choi, H.
(2025). Reverse Engineering the Branch Target Buffer Organizations on Apple M2. Electronics, 14(23), 4686.
https://doi.org/10.3390/electronics14234686
Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details
here.
Article Metrics
Article Access Statistics
For more information on the journal statistics, click
here.
Multiple requests from the same IP address are counted as one view.