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

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!netcomsv!metaflow!rschnapp
  3. From: rschnapp@metaflow.com (Russ Schnapp)
  4. Subject: Re: RISC assemblers question
  5. Message-ID: <BzGvF4.LAD@metaflow.com>
  6. Sender: usenet@metaflow.com
  7. Nntp-Posting-Host: habu
  8. Organization: Metaflow Technologies Inc.
  9. References: <1992Dec17.173930.3235@meiko.com> <lj2h6hINNikj@exodus.Eng.Sun.COM>
  10. Date: Fri, 18 Dec 1992 18:01:51 GMT
  11. Lines: 51
  12.  
  13. In article <lj2h6hINNikj@exodus.Eng.Sun.COM>, nand@not-and.Eng.Sun.COM (Nand Mulchandani) writes:
  14. |> A couple of things make it a *little* harder :
  15. |> 
  16. |> 1) Branches with delay slots (you have to be able to represent them and
  17. |>    deal with them).
  18.  
  19. Well, actually, the assembler doesn't *have* to know about delay slots.
  20. It's a nice frill if it knows about them well enough to warn you when you
  21. do something unusual in a delay slot, such as a multi-instruction macro.
  22.  
  23. In general, I don't like "smart" assemblers, trying to fill delay slots
  24. for me.  If I want "smart", I'll use a compiler, thank you.
  25.  
  26. |> 2) In general, chip workarounds are done in the assembler, and this code
  27. |>    is just yuckier to deal with
  28.  
  29. This has always really ticked me off.  The SPARC assembler, for instance,
  30. has workarounds (read KLUGEs) for all sorts of stupid things.  When I try
  31. to code a test for a processor that doesn't need the damned kluges, I get
  32. them anyway.  In the sort of tests that I write, I want only the instruction
  33. I'm asking for, no more, and no less.  With the SPARC assembler, so far as
  34. I know, I can't even disable the damned kluges.  So, I have to regress to
  35. the level of machine language programming, and fool the assembler by
  36. inserting an instruction as if it were a data word (can you say manual
  37. assembly?).  Ick!
  38.  
  39. |> 3) branches have limited scope (on SPARC, you get only 22 bits in the branch
  40. |>    instruction). It is reasonable to leave a check in the assembler to detect
  41. |>    branches to targets that are larger than the displacement will allow.
  42.  
  43. Yes, but this is true of nearly all microprocessors.  Nothing special about
  44. RISC here.
  45.  
  46. |> 4) Code to check architectural correctness (try doing something illegal
  47. |>    with the SPARC assembler - if it sqawks, then someone had to write the code 
  48. |>    to do the check). This is very important, because the machine will not always
  49. |>    execute "arbitrary assembly language". 
  50.  
  51. Again, I consider this sort of thing to be a frill.  
  52.  
  53.  
  54.  
  55. In general, an assembler is an assembler is an assembler.  They're pretty
  56. easy to do, unless you are planning to get too fancy.  I like plain, vanilla
  57. assemblers, perhaps with a simple macro preprocessor.  
  58. -- 
  59.  
  60. ...Russ Schnapp
  61. BIX: rschnapp           Email: netcom!metaflow!rschnapp or rschnapp@metaflow.com
  62. Metaflow Technologies   Voice: 619/452-6608x230;  FAX: 619/452-0401
  63. La Jolla, California    Unless otw specified, I`m speaking only for myself!
  64.