Changeset 507


Ignore:
Timestamp:
Feb 14, 2011, 2:15:24 PM (6 years ago)
Author:
mulligan
Message:

A bit on labels and pseudo-instructions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/ITP-Paper/itp-2011.tex

    r506 r507  
    190190%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    191191\section{Design issues in the formalisation}
    192 \label{sect.design.issues.formalisation}
    193 
    194 As mentioned, the emulator formalisation is part of a wider project, CerCo.
    195 In parallel with the implementation of the emulator was the construction of a prototype compiler targetting the MCS-51.
     192\label{sect.design.issues.formalisation}
    196193
    197194%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    200197\subsection{Labels and pseudoinstructions}
    201198\label{subsect.labels.pseudoinstructions}
     199
     200The MCS-51's instruction set has numerous instructions for jumping to memory locations, calling procedures and moving data between memory spaces.
     201For instance, the instructions \texttt{AJMP}, \texttt{JMP} and \texttt{LJMP} all perform jumps.
     202However, these instructions differ in how large the maximum size of the offset in memory of the jump performed can be.
     203Selecting a jump instruction therefore requires the compiler to compute the size of the offset and select the most suitable instruction.
     204
     205In parallel with the implementation of the emulator was the implementation of a prototype compiler.
     206It was recognised that it would simplify the design of the compiler if the emulator introduced a notion of \emph{pseudoinstruction}.
     207That is, instead of requiring that the compiler select the most appropriate jump instruction, for instance, we introduce a single pseudoinstruction \texttt{Jump}.
     208Similarly, we introduce pseudoinstructions for generic calls,
    202209
    203210%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracChangeset for help on using the changeset viewer.