Article View: comp.arch
Article #10655Re: Compilers, architecture, efficiency, and HR
From: Chip Salzenberg
Date: Mon, 06 May 1991 17:19
Date: Mon, 06 May 1991 17:19
40 lines
2217 bytes
2217 bytes
According to hrubin@pop.stat.purdue.edu (Herman Rubin):
>In article <282002D1.EA1@tct.com>, chip@tct.com (Chip Salzenberg) writes:
>> Give us a spec, and we'll have something to discuss. Why spend all
>> this time yammering about a hypothetical compiler, when that same
>> effort expended in spec-writing could produce a REAL IMPLEMENTATION?
>
>I have several times responded to this type of posting in email, and
>have not even received clarification of my questions.
Rubin-san has not E-Mailed me on this subject -- but no matter; he
chooses to carry on his correspondence in comp.arch.
>1. I am not quite sure what you mean by a specification.
A detailed and precise description of the desired compiler features
and input format. It would tell me what I need to know to write a
HROL (Herman Rubin Oriented Language) compiler.
Let me give a tiny example.
To define a binary operator <op> to be supported by a machine
instruction <inst>, code the following:
OPERATOR "<op>" ;
{ BINARY | UNARY } ;
PRECEDENCE { AFTER | BEFORE | SAME } <other-op> ;
ARGUMENT 1 (<type>, ...) [ IN ("reg1",...) ] ;
[ ARGUMENT 2 (<type>, ...) [ IN ("reg2",...) ] ; ]
INSTRUCTION "<inst> ARG1,ARG2" ;
RESULT (<type>) IN ("reg") ;
Of course, this tiny example doesn't address indirection, or processor
addressing modes, etc, etc. But it does give the flavor of what I mean
by "specification".
Got the picture yet?
--
Brand X Industries Sentient and Semi-Sentient Being Resources Department:
Because Sometimes, "Human" Just Isn't Good Enough [tm]
Chip Salzenberg <chip@tct.com>, <uunet!pdn!tct!chip>
Technical Details
Message-ID:
<2825903D.1B48@tct.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!spool.mu.edu!uunet!pdn!tscs!tct!chipReferences:
<41279@genrad.UUCP> <282002D1.EA1@tct.com> <11813@mentor.cc.purdue.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!spool.mu.edu!uunet!pdn!tscs!tct!chip From: chip@tct.com (Chip Salzenberg) Newsgroups: comp.arch Subject: Re: Compilers, architecture, efficiency, and HR Message-ID: <2825903D.1B48@tct.com> Date: 6 May 91 17:19:57 GMT Article-I.D.: tct.2825903D.1B48 References: <41279@genrad.UUCP> <282002D1.EA1@tct.com> <11813@mentor.cc.purdue.edu> Organization: Teltronics/TCT, Sarasota, FL Lines: 40