Article View: comp.arch
Article #11174Re: RISC assemblers question
From: Lal George
Date: Fri, 18 Dec 1992 15:39
Date: Fri, 18 Dec 1992 15:39
40 lines
1939 bytes
1939 bytes
From: masticol@cadenza.rutgers.edu (Steve Masticola) Date: 17 Dec 92 15:16:37 GMT I've met a couple of people who have attempted to write assemblers for RISC machines, who say that it's a difficult job. Can someone give me an inkling as to why? Scheduling in the presence of span dependent instructions adds an interesting twist to writing an assembler for RISC machines. This is particularly true for machines that require NOPs. For example, consider: instr ; regular instruction sdi(Label_1) ; span dependent instruction instr ; regular instruction instr ; regular instruction ... Label_1: One would like to schedule the above sequence of instruction after having expanded the instruction sdi(Label_1). Unfortunately, this presents a chicken and egg scenario. One cannot expand the instruction sdi(Label_1) unless one knows the value of the label Label_1. Further, one cannot determine the value of Label_1 unless one schedules these instructions and determines the number of NOPs required. This problem is addressed in the SML/NJ compiler and is quite easily solved. The sources are free with the SML/NJ distribution. Further, this "assembler" is derived from a machine description and is presently used in the MIPS, SPARC, HPPA, and RS6000 code generators for SML/NJ. There is every reason to believe that it will readily adapt to other RISC processors too.
Technical Details
Message-ID:
<GEORGE.92Dec18103955@kisubi.allegra.att.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!att!dptg!ulysses!ulysses!georgeReferences:
<Dec.17.10.16.36.1992.17493@cadenza.rutgers.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.arch Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!att!dptg!ulysses!ulysses!george From: george@allegra.att.com (Lal George) Subject: Re: RISC assemblers question Message-ID: <GEORGE.92Dec18103955@kisubi.allegra.att.com> In-Reply-To: masticol@cadenza.rutgers.edu's message of 17 Dec 92 15:16:37 GMT Date: Fri, 18 Dec 1992 15:39:55 GMT References: <Dec.17.10.16.36.1992.17493@cadenza.rutgers.edu> Organization: AT&T Bell Laboratories Lines: 40