vix.ing · top · new · best · stats · spec

Retargeting GCC: Do We Reinvent the Wheel Every Time?

2013/09/30 by Saravana Perumal P, P, Saravana Perumal, Amey Karkare +1
Computer Science · #D.3.4 #FOS: Computer and information sciences #Logic, programming, and type systems #Network Packet Processing and Optimization #Parallel Computing and Optimization Techniques #Programming Languages (cs.PL) #Software Engineering (cs.SE) #cs.PL #cs.SE

paper · pdf · doi:10.48550/arxiv.1309.7685

4 pages, accepted at The Second Asia-Pacific Programming Languages and Compilers Workshop (APPLC), Shenzen, China, Feb 2013

arxiv created 2013/09/30 · openalex publication_date 2013/09/30 · arxiv updated 2013/10/04 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

Porting GCC to new architecture requires writing a Machine Description (MD) file that contains mapping from GCC's intermediate form to the target assembly code. Constructing an MD file is a difficult task because it requires the user to understand both (a) the internals of GCC, and (b) the intricacies of the target architecture. Instruction sets of different architectures exhibit significant amount of semantic similarities across a large class (for example, the instruction sets for RISC architectures) and differ only in syntax. Therefore, it is expected that MD files of machines with similar architectures should also have similarities. To confirm our hypothesis, we created "mdcompare", a tool to (a) extract RTL patterns (machine independent abstraction of RTL templates) from MD files of well known architectures and (b) compare the similarity of patterns across architectures. The results are encouraging; we found that 28% -- 70% RTL expressions are similar across pairs of MD files, the similarity percentage being on the higher side for pairs of similar architectures.

Related