From CISC to RISC: language-model guided assembly transpilation

The transition from x86 to ARM architecture is becoming increasingly common across various domains, primarily driven by ARM's energy efficiency and improved performance across traditional sectors. However, this ISA shift poses significant challenges, mainly due to the extensive legacy ecosystem...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Heakl, Ahmed, Abi, Chaimaa, Hossam, Rania, Mahmoud, Abdulrahman
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Heakl, Ahmed
Abi, Chaimaa
Hossam, Rania
Mahmoud, Abdulrahman
description The transition from x86 to ARM architecture is becoming increasingly common across various domains, primarily driven by ARM's energy efficiency and improved performance across traditional sectors. However, this ISA shift poses significant challenges, mainly due to the extensive legacy ecosystem of x86 software and lack of portability across proprietary ecosystems and software stacks. This paper introduces CRT, a lightweight LLM-based transpiler that automatically converts x86 assembly to ARM assembly. Our approach bridges the fundamental architectural gap between x86's CISC-based and ARM's RISC-based computing paradigms while preserving program semantics and optimizing performance. We evaluate CRT on diverse real-world applications, achieving 79.25% translation accuracy from x86 to ARMv5 on our comprehensive test suite, and an 88.68% accuracy from x86 to RISC-V. In practical deployments on Apple M2 hardware (ARMv8), our transpiled code achieves 1.73$\times$ speedup compared to Apple's Rosetta 2 virtualization engine, while delivering 2.41$\times$ memory efficiency and 1.47$\times$ better energy consumption. Through testing and analysis, we show that CRT successfully navigates the CISC/RISC divide and generates correctly executable RISC code despite machine ``language'' barriers. We release our code, models, training datasets, and benchmarks at: \url{https://ahmedheakl.github.io/asm2asm/}.
doi_str_mv 10.48550/arxiv.2411.16341
format Article
fullrecord <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2411_16341</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2411_16341</sourcerecordid><originalsourceid>FETCH-arxiv_primary_2411_163413</originalsourceid><addsrcrecordid>eNpjYJA0NNAzsTA1NdBPLKrILNMzMjE01DM0MzYx5GSwdyvKz1Vw9gx2VijJVwgC0lYKOYl56aWJ6am6ufkpqTkK6aWZKakpConFxam5STmVCiVFiXnFBZk5iSWZ-Xk8DKxpiTnFqbxQmptB3s01xNlDF2xVfEFRZm5iUWU8yMp4sJXGhFUAACxDNXg</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>From CISC to RISC: language-model guided assembly transpilation</title><source>arXiv.org</source><creator>Heakl, Ahmed ; Abi, Chaimaa ; Hossam, Rania ; Mahmoud, Abdulrahman</creator><creatorcontrib>Heakl, Ahmed ; Abi, Chaimaa ; Hossam, Rania ; Mahmoud, Abdulrahman</creatorcontrib><description>The transition from x86 to ARM architecture is becoming increasingly common across various domains, primarily driven by ARM's energy efficiency and improved performance across traditional sectors. However, this ISA shift poses significant challenges, mainly due to the extensive legacy ecosystem of x86 software and lack of portability across proprietary ecosystems and software stacks. This paper introduces CRT, a lightweight LLM-based transpiler that automatically converts x86 assembly to ARM assembly. Our approach bridges the fundamental architectural gap between x86's CISC-based and ARM's RISC-based computing paradigms while preserving program semantics and optimizing performance. We evaluate CRT on diverse real-world applications, achieving 79.25% translation accuracy from x86 to ARMv5 on our comprehensive test suite, and an 88.68% accuracy from x86 to RISC-V. In practical deployments on Apple M2 hardware (ARMv8), our transpiled code achieves 1.73$\times$ speedup compared to Apple's Rosetta 2 virtualization engine, while delivering 2.41$\times$ memory efficiency and 1.47$\times$ better energy consumption. Through testing and analysis, we show that CRT successfully navigates the CISC/RISC divide and generates correctly executable RISC code despite machine ``language'' barriers. We release our code, models, training datasets, and benchmarks at: \url{https://ahmedheakl.github.io/asm2asm/}.</description><identifier>DOI: 10.48550/arxiv.2411.16341</identifier><language>eng</language><subject>Computer Science - Hardware Architecture ; Computer Science - Programming Languages</subject><creationdate>2024-11</creationdate><rights>http://creativecommons.org/licenses/by/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,776,881</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2411.16341$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2411.16341$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Heakl, Ahmed</creatorcontrib><creatorcontrib>Abi, Chaimaa</creatorcontrib><creatorcontrib>Hossam, Rania</creatorcontrib><creatorcontrib>Mahmoud, Abdulrahman</creatorcontrib><title>From CISC to RISC: language-model guided assembly transpilation</title><description>The transition from x86 to ARM architecture is becoming increasingly common across various domains, primarily driven by ARM's energy efficiency and improved performance across traditional sectors. However, this ISA shift poses significant challenges, mainly due to the extensive legacy ecosystem of x86 software and lack of portability across proprietary ecosystems and software stacks. This paper introduces CRT, a lightweight LLM-based transpiler that automatically converts x86 assembly to ARM assembly. Our approach bridges the fundamental architectural gap between x86's CISC-based and ARM's RISC-based computing paradigms while preserving program semantics and optimizing performance. We evaluate CRT on diverse real-world applications, achieving 79.25% translation accuracy from x86 to ARMv5 on our comprehensive test suite, and an 88.68% accuracy from x86 to RISC-V. In practical deployments on Apple M2 hardware (ARMv8), our transpiled code achieves 1.73$\times$ speedup compared to Apple's Rosetta 2 virtualization engine, while delivering 2.41$\times$ memory efficiency and 1.47$\times$ better energy consumption. Through testing and analysis, we show that CRT successfully navigates the CISC/RISC divide and generates correctly executable RISC code despite machine ``language'' barriers. We release our code, models, training datasets, and benchmarks at: \url{https://ahmedheakl.github.io/asm2asm/}.</description><subject>Computer Science - Hardware Architecture</subject><subject>Computer Science - Programming Languages</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNpjYJA0NNAzsTA1NdBPLKrILNMzMjE01DM0MzYx5GSwdyvKz1Vw9gx2VijJVwgC0lYKOYl56aWJ6am6ufkpqTkK6aWZKakpConFxam5STmVCiVFiXnFBZk5iSWZ-Xk8DKxpiTnFqbxQmptB3s01xNlDF2xVfEFRZm5iUWU8yMp4sJXGhFUAACxDNXg</recordid><startdate>20241125</startdate><enddate>20241125</enddate><creator>Heakl, Ahmed</creator><creator>Abi, Chaimaa</creator><creator>Hossam, Rania</creator><creator>Mahmoud, Abdulrahman</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20241125</creationdate><title>From CISC to RISC: language-model guided assembly transpilation</title><author>Heakl, Ahmed ; Abi, Chaimaa ; Hossam, Rania ; Mahmoud, Abdulrahman</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-arxiv_primary_2411_163413</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Computer Science - Hardware Architecture</topic><topic>Computer Science - Programming Languages</topic><toplevel>online_resources</toplevel><creatorcontrib>Heakl, Ahmed</creatorcontrib><creatorcontrib>Abi, Chaimaa</creatorcontrib><creatorcontrib>Hossam, Rania</creatorcontrib><creatorcontrib>Mahmoud, Abdulrahman</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Heakl, Ahmed</au><au>Abi, Chaimaa</au><au>Hossam, Rania</au><au>Mahmoud, Abdulrahman</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>From CISC to RISC: language-model guided assembly transpilation</atitle><date>2024-11-25</date><risdate>2024</risdate><abstract>The transition from x86 to ARM architecture is becoming increasingly common across various domains, primarily driven by ARM's energy efficiency and improved performance across traditional sectors. However, this ISA shift poses significant challenges, mainly due to the extensive legacy ecosystem of x86 software and lack of portability across proprietary ecosystems and software stacks. This paper introduces CRT, a lightweight LLM-based transpiler that automatically converts x86 assembly to ARM assembly. Our approach bridges the fundamental architectural gap between x86's CISC-based and ARM's RISC-based computing paradigms while preserving program semantics and optimizing performance. We evaluate CRT on diverse real-world applications, achieving 79.25% translation accuracy from x86 to ARMv5 on our comprehensive test suite, and an 88.68% accuracy from x86 to RISC-V. In practical deployments on Apple M2 hardware (ARMv8), our transpiled code achieves 1.73$\times$ speedup compared to Apple's Rosetta 2 virtualization engine, while delivering 2.41$\times$ memory efficiency and 1.47$\times$ better energy consumption. Through testing and analysis, we show that CRT successfully navigates the CISC/RISC divide and generates correctly executable RISC code despite machine ``language'' barriers. We release our code, models, training datasets, and benchmarks at: \url{https://ahmedheakl.github.io/asm2asm/}.</abstract><doi>10.48550/arxiv.2411.16341</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier DOI: 10.48550/arxiv.2411.16341
ispartof
issn
language eng
recordid cdi_arxiv_primary_2411_16341
source arXiv.org
subjects Computer Science - Hardware Architecture
Computer Science - Programming Languages
title From CISC to RISC: language-model guided assembly transpilation
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-09T03%3A04%3A52IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=From%20CISC%20to%20RISC:%20language-model%20guided%20assembly%20transpilation&rft.au=Heakl,%20Ahmed&rft.date=2024-11-25&rft_id=info:doi/10.48550/arxiv.2411.16341&rft_dat=%3Carxiv_GOX%3E2411_16341%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true