home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6788 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.2 KB  |  67 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: netnews.upenn.edu!dsinc!scala!news
  3. From: dave.haynie@scala.com (Dave Haynie)
  4. Subject: Re: 680X0 -> PPC translator?
  5. Sender: news@scala.scala.com (Usenet administrator)
  6. Message-ID: <1996Apr2.230841.8275@scala.scala.com>
  7. Date: Tue, 2 Apr 1996 23:08:41 GMT
  8. Reply-To: dave.haynie@scala.com (Dave Haynie)
  9. References: <31499F8E.26A9@netvision.net.il> <volker.0fw1@vb.franken.de> <315800D7.1854@sapiens.com> <volker.0g32@vb.franken.de> <315C198B.49C2@netvision.net.il> <volker.0g5w@vb.franken.de>
  10. Nntp-Posting-Host: gator
  11. Organization: Scala Computer Television, US Research Center
  12.  
  13. In <volker.0g5w@vb.franken.de>, volker@vb.franken.de (Volker Barthelmann) writes:
  14. >Jack (avilev@netvision.net.il) wrote:
  15.  
  16. >: know. you might actually be convinced that 680x0 -> PPC is possible. ;-)
  17.  
  18. >I doubt that. :-)
  19.  
  20. >: i don't seem to care about that, get it through your head, i'm NOT
  21. >: going to intervene with what the program does with any memory area,
  22. >: just as long as this memory area is not later being used for code
  23.  
  24. >Unfortunately You have to know about all other memory areas as well,
  25. >because otherwise You cannot determine what is code and what is data.
  26.  
  27. Sure you can. The practical binary translators that exist today (and
  28. there are some, which work very well) do this very simply. They work
  29. in conjunction with an emulator, and the emulator keeps track of what
  30. runs and what doesn't. Anything that's executed is code, and such a
  31. chunk can itself be translated based on static analysis. Anything that
  32. doesn't run might not be code. So you don't translate it; if it's
  33. data, you're safe. If it's code, and it never runs, there's no point
  34. in translating it. If it does run later, you translate it later. 
  35.  
  36. >Think about: The program writes a value somwhere. Then copies it around,
  37. >shifts it, moves it again etc. and than sometimes it reads it from where
  38. >it is now, loads it in a0 and does a jmp (a0) or so.
  39.  
  40. The AmigaOS and the 680x0 don't support self-modifying code. So you
  41. can't really do any data to instruction transforms, except in very
  42. controlled situations (LoadSeg(), for instance), and expect it to work
  43. on anything much beyond a vanilla 68000. 
  44.  
  45. >Still I claim You can't even reliably decide what is code and what is data.
  46. >Even if self-modifying code is forbidden.
  47.  
  48. You can, using dynamic flow analysis. DEC does this, quite
  49. successfully, under Windows NT for the Alpha. They get about 70% of
  50. native performance out of 80x86 binaries, once the translation is done
  51. for the active parts of a program. You can never get 100%, since the
  52. translated code will still have to mimic what the foreign code does,
  53. which is unlikely to be optimal for anything but that foreign
  54. processor. But it's still a long ways from the 1/10th or so
  55. performance you're likely to get with pure emulation. 
  56.  
  57. So basically, stop the arguments, I'm offering an existance proof. It
  58. exists, it works very well, and it could for 680x0 to PowerPC
  59. binaries, given enough work.
  60.  
  61. Dave Haynie          | ex-Commodore Engineering |   for DiskSalv 3 &
  62. Sr. Systems Engineer |  Hardwired Media Company | "The Deathbed Vigil"
  63. Scala Inc., US R&D   |    Ki No Kawa Aikido     |     info@iam.com
  64.  
  65.          "Feeling ... Pretty ... Psyched" -R.E.M.
  66.  
  67.