Software address translation - request for info

Paul H J Kelly <phjk@doc.imperial.ac.uk>
Tue, 28 Jul 1992 22:25:54 GMT

          From comp.compilers

Related articles
Software address translation - request for info phjk@doc.imperial.ac.uk (Paul H J Kelly) (1992-07-28)
Re: Software address translation - request for info macrakis@osf.org (1992-07-30)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Paul H J Kelly <phjk@doc.imperial.ac.uk>
Organization: Compilers Central
Date: Tue, 28 Jul 1992 22:25:54 GMT
Keywords: architecture, question

We need a way of applying a non-trivial mapping to every data address
issued by a C program.


One reason why we need this is to simulate the effect of a page table so
we can run VM programs (in particular prototypes of an operating system)
on machines without memory management hardware.


The mapping we want to apply varies:
  - sometimes just adding each address to a base value (which might
      change during execution),
  - more generally indirecting through a full address translation
      table.


We have considered several approaches:
  1) Post-process the assembler and intercept all loads and store
        instructions.
  2) modify the back end of a retargetable compiler (e.g. gcc) to
        generate C instead of assembler, so we can then redefine
        a couple of macros used in the generated C to change the mapping,
  3) Write a front-end preprocessor, which modifies the C concrete or
        abstract syntax to introduce the mapping,
  4) Run standard binary as emitted by the C compiler, under a
        simulator (e.g. spim) - then modify spim to perform address
        translation.


These all have different advantages and disadvantages. My favourite is
(2), as it seems most flexible.


Can anyone provide me with any pointers to existing tools which can help
us? Surely we're not the first with this requirement!


I will of course try to produce a summary of responses.


Yours with many thanks,


                Paul Kelly


  Dept. of Computing, Imperial College, 180 Queen's Gate, London SW7 2BZ, UK
  (telephone (+44 71) 589 5111 extension 5028, fax: +44 71 581 8024)
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.