home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / arch / 11764 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.8 KB  |  52 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!att!dptg!ulysses!ulysses!george
  3. From: george@allegra.att.com (Lal George)
  4. Subject: Re: RISC assemblers question
  5. Message-ID: <GEORGE.92Dec18103955@kisubi.allegra.att.com>
  6. In-Reply-To: masticol@cadenza.rutgers.edu's message of 17 Dec 92 15:16:37 GMT
  7. Date: Fri, 18 Dec 1992 15:39:55 GMT
  8. References: <Dec.17.10.16.36.1992.17493@cadenza.rutgers.edu>
  9. Organization: AT&T Bell Laboratories
  10. Lines: 40
  11.  
  12.    From: masticol@cadenza.rutgers.edu (Steve Masticola)
  13.    Date: 17 Dec 92 15:16:37 GMT
  14.  
  15.    I've met a couple of people who have attempted to write assemblers for
  16.    RISC machines, who say that it's a difficult job. Can someone give me
  17.    an inkling as to why?
  18.  
  19.  
  20. Scheduling in the presence of span dependent instructions adds 
  21. an interesting twist to writing an assembler for RISC machines.
  22. This is particularly true for machines that require NOPs.
  23.  
  24. For example, consider:
  25.         
  26.         instr        ; regular instruction
  27.         sdi(Label_1)    ; span dependent instruction
  28.         instr        ; regular instruction
  29.         instr        ; regular instruction
  30.     
  31.         ...
  32.     Label_1:
  33.  
  34. One would like to schedule the above sequence of instruction after
  35. having expanded the instruction sdi(Label_1). Unfortunately, this
  36. presents a chicken and egg scenario. One cannot expand the instruction
  37. sdi(Label_1) unless one knows the value of the label Label_1. Further,
  38. one cannot determine the value of Label_1 unless one schedules these
  39. instructions and determines the number of NOPs required.
  40.  
  41. This problem is addressed in the SML/NJ compiler and is quite easily
  42. solved. The sources are free with the SML/NJ distribution. Further,
  43. this "assembler" is derived from a machine description and is
  44. presently used in the MIPS, SPARC, HPPA, and RS6000 code generators
  45. for SML/NJ. There is every reason to believe that it will readily
  46. adapt to other RISC processors too.
  47.  
  48.  
  49.  
  50.  
  51.         
  52.