%&thesis \begin{document} \ifdraft \begin{center} {\Large Bachelor Thesis} \textcolor{red}{\emph{This is a draft version. The layout has been changed to save paper.}} \end{center} \else \maketitleru[ course={Bachelor Thesis\\[.4em]Computing Science}, authorstext={Author:}, authors={Camil Staps}, righttextheader={First supervisor:}, righttext={prof.~dr.~dr.h.c.~ir.~M.J.~Plasmeijer}, righttextBheader={Second supervisor:}, righttextB={drs.~J.H.G.~van~Groningen}, pagenr=1] \setcounter{page}{2} \cleardoublepage \fi \begin{abstract} 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. The code generator proposed here can be used in situations where small code size is important, and on devices where the ARM instruction set is not available, like the Cortex-M series. \todo{results, efficiency, etc.} \end{abstract} \ifdraft\else \cleardoublepage \fi \setcounter{tocdepth}{2} \ifdraft \begin{multicols}{2} \tableofcontents \end{multicols} \else \thispagestyle{empty} \tableofcontents \fi \ifdraft\else \cleardoublepage \fi \input{intro} \input{storing-pc} \input{code-addresses} \input{load-offsets} \input{reg-alloc} \input{results} \ifdraft\else \cleardoublepage \fi \let\section\oldsection \appendix \input{terms} \input{system} \ifdraft\else \cleardoublepage \fi \let\oldurl\url \renewcommand{\url}[1]{{\small\oldurl{#1}}} \phantomsection\addcontentsline{toc}{section}{\bibname} \printbibliography \end{document}