\section{Introduction}
\label{sec:intro}

\begin{multicols}{2}
	
\subsection{Introduction}
\label{sec:intro:intro}
The Thumb-2 instruction set combines the best features of the ARM and Thumb instruction sets (speed and small code size, respectively).
We discuss the differences between the ARM and Thumb-2 instruction sets,
	and their influences on code generation.
Specifically, we look at code generation for the purely functional programming language Clean.
%todo results

\subsection{ARM, Thumb and Thumb-2}
\label{sec:intro:arm-thumb-thumb2}
ARM is a RISC architecture with several enhancements to a basic RISC architecture allowing ARM processors to
	`achieve a good balance of high performance, small program size, low power consumption, and small silicon area'~\citep[A1.1]{armv7ar}.

Several instruction sets were designed for the ARM architecture.
First of all, the 32-bit ARM ISA allows the programmer to easily make full use of all the architecture's features.
The Thumb instruction set provides a 16-bit alternative to the ARM ISA, giving in on performance to achieve improved code density.
Starting from ARMv6T2, an extension to the Thumb instruction set, known as Thumb-2, adds 32-bit instructions to Thumb to
	`achieve performance similar to ARM code, with code density better than that of earlier Thumb code'~\citep[A1.2]{armv7ar}.
This gives the ARM and Thumb instruction sets `almost identical functionality'~\citep[A1.2]{armv7ar},
	whereas Thumb gives a smaller code size.

\subsection{Clean}
\label{sec:intro:clean}
Clean is `a general purpose, state-of-the-art, pure and lazy functional programming language designed for making real-world applications'~\cite{clean}.
It evolved from LEAN, an intermediate language based on graph rewriting~\citep{lean}.
As such, one of the steps in the compilation of a Clean program is the translation to bytecode for the ABC-machine, an abstract graph rewriting machine~\citep{execspecs}.
A code generator is used to generate code equivalent to the ABC-code for concrete machines.
%todo

\subsection{Terminology}
\label{sec:intro:terminology}
In this thesis, I will usually write `Thumb' where the Thumb-2 extension is meant.
Only when the distinction with pre-ARMv6T2 Thumb is important will I distinguish between (early) Thumb and Thumb-2.

For brevity, a number of common abbreviations is used.
An overview can be found in \autoref{sec:abbreviations}.

\end{multicols}
