diff options
author | Camil Staps | 2016-11-13 13:29:54 +0100 |
---|---|---|
committer | Camil Staps | 2016-11-13 13:29:54 +0100 |
commit | d740deeec3e11475501c4ecd8ee41da1b11ffef1 (patch) | |
tree | 092cefc4649c7c13f2633b963dd8bacb17d16dcf | |
parent | log (diff) |
Fancied up thesis
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | thesis/abbr.tex | 11 | ||||
-rw-r--r-- | thesis/approach.tex | 6 | ||||
-rw-r--r-- | thesis/intro.tex | 43 | ||||
l--------- | thesis/logo.pdf | 1 | ||||
m--------- | thesis/rutitlepage | 0 | ||||
l--------- | thesis/rutitlepage.sty | 1 | ||||
-rw-r--r-- | thesis/thesis.bib | 21 | ||||
-rw-r--r-- | thesis/thesis.tex | 51 |
10 files changed, 135 insertions, 4 deletions
@@ -28,3 +28,5 @@ *.synctex.gz *.toc _minted-*/ + +!thesis/logo.pdf diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..cd06162 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "thesis/rutitlepage"] + path = thesis/rutitlepage + url = https://github.com/dopefishh/rutitlepage.git diff --git a/thesis/abbr.tex b/thesis/abbr.tex new file mode 100644 index 0000000..6124917 --- /dev/null +++ b/thesis/abbr.tex @@ -0,0 +1,11 @@ +\section{Abbreviations} +\label{sec:abbreviations} + +\begin{multicols}{2} + +\begin{description} + \item[PC] + Program counter. +\end{description} + +\end{multicols} diff --git a/thesis/approach.tex b/thesis/approach.tex index 28c2c09..0034035 100644 --- a/thesis/approach.tex +++ b/thesis/approach.tex @@ -1,6 +1,10 @@ \section{Approach} \label{sec:approach} +\begin{multicols}{2} + +\subsection{Interworking} +\label{sec:approach:interworking} It is possible to mix ARM and Thumb instructions: \enquote{[t]he ARM and Thumb instruction sets are designed to \emph{interwork} freely}~\citep{armv7m}. We could therefore decide to generate code for some sections using ARM instructions, and for other using Thumb instructions. @@ -9,3 +13,5 @@ This could give better end results, However, some architectures, like ARMv7-M, only support Thumb instructions. I choose to look at Thumb instructions only, so that the widest range of architectures possible can be supported. + +\end{multicols} diff --git a/thesis/intro.tex b/thesis/intro.tex new file mode 100644 index 0000000..5be42af --- /dev/null +++ b/thesis/intro.tex @@ -0,0 +1,43 @@ +\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} diff --git a/thesis/logo.pdf b/thesis/logo.pdf new file mode 120000 index 0000000..18ed656 --- /dev/null +++ b/thesis/logo.pdf @@ -0,0 +1 @@ +rutitlepage/logo.pdf
\ No newline at end of file diff --git a/thesis/rutitlepage b/thesis/rutitlepage new file mode 160000 +Subproject 516fa9e441801392e08a7328cb6196a8849724c diff --git a/thesis/rutitlepage.sty b/thesis/rutitlepage.sty new file mode 120000 index 0000000..99031b4 --- /dev/null +++ b/thesis/rutitlepage.sty @@ -0,0 +1 @@ +rutitlepage/rutitlepage.sty
\ No newline at end of file diff --git a/thesis/thesis.bib b/thesis/thesis.bib index 70a9a2d..fc4fa09 100644 --- a/thesis/thesis.bib +++ b/thesis/thesis.bib @@ -9,3 +9,24 @@ organization="ARM Limited", year=2006 } + +@misc{clean, + title="Clean", + organization="Radboud University Nijmegen", + howpublished="\url{http://clean.cs.ru.nl/}", + year=2004 +} + +@article{lean, + title="LEAN: an Intermediate Language based on Graph Rewriting", + author={H.P. Barendregt and M.C.J.D. van Eekelen and J.R.W. Glauert and J.R. Kennaway and M.J. Plasmeijer and M.R. Sleep}, + journal="Parallel Computing 9", + year=1988 +} + +@phdthesis{execspecs, + title="Functional Programs as Executable Specifications", + author="P. Koopman", + school="Radboud University Nijmegen", + year=1990 +} diff --git a/thesis/thesis.tex b/thesis/thesis.tex index 7efeaa7..09c61a9 100644 --- a/thesis/thesis.tex +++ b/thesis/thesis.tex @@ -1,31 +1,74 @@ -\documentclass[a4paper,twoside]{article} +\documentclass[a4paper,twoside]{amsart} + +\usepackage{geometry} +\usepackage{multicol} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[scaled]{beramono} -\let\oldtexttt\texttt -\def\texttt#1{\oldtexttt{\footnotesize #1}} - \usepackage[british]{babel} \usepackage[babel=true]{csquotes} + \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} \definecolor{linkcolor}{rgb}{0,0.65,0} \definecolor{citecolor}{rgb}{0.65,0,0} \definecolor{urlcolor}{rgb}{0,0,0.65} \usepackage[colorlinks=true,linkcolor=linkcolor,urlcolor=urlcolor,citecolor=citecolor]{hyperref} + \usepackage{natbib} +\usepackage{rutitlepage} +\usepackage{latexgit} + \usepackage{ual} +\let\oldtexttt\texttt +\def\texttt#1{\oldtexttt{\footnotesize #1}} + +\newcommand*{\blankpage}{% + \vspace*{\fill} + {\centering\it This page intentionally left blank.\par} + \vspace{\fill}} +\makeatletter +\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page + \blankpage\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi\fi\fi} +\makeatother + +\let\oldsection\section +\renewcommand{\section}{\clearpage\oldsection} + \title{Code generation for Thumb-2 processors} \author{Camil Staps} +\date{\gitcommitdate[formatDate]} \begin{document} +\maketitleru[ + course={Bachelor Thesis}, + authorstext={Author:}, + authors={Camil Staps}, + righttextheader={Supervisors:}, + righttext={prof.~dr.~dr.h.c.~ir.~M.J.~Plasmeijer and drs.~J.H.G.~van~Groningen}] + +\cleardoublepage + +\thispagestyle{empty} +\tableofcontents + +\cleardoublepage + +\input{intro} \input{approach} \input{differences} +\cleardoublepage +\appendix +\input{abbr} + +\cleardoublepage + \bibliographystyle{plainnat} \bibliography{thesis} |