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