This bachelor's thesis presents the development of a compiler for a subset of the C programming language, targeting the ARM architecture. The compiler is designed to generate assembly code for a 32-bit ARM architecture from input source code written in C. Most elements of the C language defined by the ANSI C standard are supported. The thesis provides a detailed description of all the main components of the compiler, including lexical, syntactic, and semantic analysis, as well as the generation of intermediate and assembly code. Special emphasis is placed on the correct translation of language constructs into ARM assembly, taking into account architectural characteristics such as the limited number of registers and the memory addressing modes. The thesis concludes with examples of compiled programs and the results of testing the compiler.
|