home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / compiler / 1283 < prev    next >
Encoding:
Text File  |  1992-07-29  |  2.1 KB  |  56 lines

  1. Newsgroups: comp.compilers
  2. Path: sparky!uunet!gatech!news.byu.edu!eff!world!iecc!compilers-sender
  3. From: Paul H J Kelly <phjk@doc.imperial.ac.uk>
  4. Subject: Software address translation - request for info
  5. Reply-To: Paul H J Kelly <phjk@doc.imperial.ac.uk>
  6. Organization: Compilers Central
  7. Date: Tue, 28 Jul 1992 22:25:54 GMT
  8. Approved: compilers@iecc.cambridge.ma.us
  9. Message-ID: <92-07-104@comp.compilers>
  10. Keywords: architecture, question
  11. Sender: compilers-sender@iecc.cambridge.ma.us
  12. Lines: 42
  13.  
  14. We need a way of applying a non-trivial mapping to every data address
  15. issued by a C program.
  16.  
  17. One reason why we need this is to simulate the effect of a page table so
  18. we can run VM programs (in particular prototypes of an operating system)
  19. on machines without memory management hardware.
  20.  
  21. The mapping we want to apply varies:
  22.  - sometimes just adding each address to a base value (which might 
  23.    change during execution),
  24.  - more generally indirecting through a full address translation
  25.    table.
  26.  
  27. We have considered several approaches:
  28.  1) Post-process the assembler and intercept all loads and store
  29.     instructions.
  30.  2) modify the back end of a retargetable compiler (e.g. gcc) to
  31.     generate C instead of assembler, so we can then redefine
  32.     a couple of macros used in the generated C to change the mapping,
  33.  3) Write a front-end preprocessor, which modifies the C concrete or
  34.     abstract syntax to introduce the mapping,
  35.  4) Run standard binary as emitted by the C compiler, under a
  36.     simulator (e.g. spim) - then modify spim to perform address 
  37.     translation.
  38.  
  39. These all have different advantages and disadvantages.  My favourite is
  40. (2), as it seems most flexible.
  41.  
  42. Can anyone provide me with any pointers to existing tools which can help
  43. us?  Surely we're not the first with this requirement!
  44.  
  45. I will of course try to produce a summary of responses.
  46.  
  47. Yours with many thanks,
  48.  
  49.         Paul Kelly
  50.  
  51.  Dept. of Computing, Imperial College, 180 Queen's Gate, London SW7 2BZ, UK
  52.  (telephone (+44 71) 589 5111 extension 5028, fax: +44 71 581 8024)
  53. -- 
  54. Send compilers articles to compilers@iecc.cambridge.ma.us or
  55. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  56.