Changeset 558


Ignore:
Timestamp:
Feb 17, 2011, 2:53:54 PM (6 years ago)
Author:
sacerdot
Message:

...

File:
1 edited

Legend:

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

    r557 r558  
    340340However, these instructions differ in how large the maximum size of the offset of the jump to be performed can be.
    341341Further, all jump instructions require a concrete memory address---to jump to---to be specified.
    342 Requiring the compiler to compute these offsets, and select appropriate jump instructions, was seen as needleslly burdensome.
    343 
    344 Introducing labels also had a simplifying effect on the design of the compiler.
    345 Instead of jumping to a concrete address, the compiler could `just' jump to a label.
    346 In this vein, we introduced pseudoinstructions for both unconditional and conditional jumps to a label.
    347 
    348 Further, we also introduced labels for storing global data in a preamble before the program.
     342Hence compilers that support separate compilation cannot directly compute these offsets and select the appropriate jump instructions. These operations are
     343needleslly burdensome also for compilers that do not do separate compilation
     344and are thus handled by the assemblers, as we decided to do.
     345
     346While introducing pseudo instructions we also introduced labels for locations
     347for jumps and for global data.
     348To specify global data via labels, we have introduced the notion of a preamble
     349before the program to hold the association of labels to sizes of reserved space.
    349350A pseudoinstruction \texttt{Mov} moves (16-bit) data stored at a label into the (16-bit) register \texttt{DPTR}.
    350 We believe this facility, of storing global data in a preamble referenced by a label, will also make any future extension considering separate compilation much simpler.
    351 
    352 Our pseudoinstructions and labels induce an assembly language similar to that of SDCC.
    353 All pseudoinstructions and labels are `assembled away', prior to program execution, using a preprocessing stage.
    354 Jumps are computed in two stages.
    355 The first stage builds a map associating memory addresses to labels, with the second stage removing pseudojumps with concrete jumps to the correct address.
     351
     352Our pseudoinstructions and labels induce an assembly language similar to that of SDCC. All pseudoinstructions and labels are `assembled away', prior to program execution, using a preprocessing stage. Jumps are computed in two stages.
     353The first stage builds a map associating memory addresses to labels, with the second stage removing pseudojumps with concrete jumps to the correct address. The algorithm currently implemented does not try to minimize the object code size by always picking the shortest possible jump instruction. The choice of an optimal algorithm is currently left as future work.
    356354
    357355%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracChangeset for help on using the changeset viewer.