Article View: comp.arch
Article #20858Re: Complex Instructions
From: Barry Margolin
Date: Fri, 21 Apr 1989 16:12
Date: Fri, 21 Apr 1989 16:12
31 lines
2056 bytes
2056 bytes
In article <134@dg.dg.com> rec@dg.UUCP (Robert Cousins) writes:
>As a result of this difficulty, architects begain to build in
>instructions to handle data structures more directly. However,
>few of these instructions can be compiled since the C compilers
>have difficulty decyphering the code well enough to know when
>to use the "insert into circular queue" instruction as opposed to
>smaller operations to manipulate pointers. Also, few programmers
>are sufficiently versed in the underlying hardware to generate
>compatible data structures which could allow a very smart compiler
>to generate the instructions in the first place.
The solution to this is to hide these instructions away in subroutine
libraries and/or compiler intrinsics. In addition to making it easy
for the compiler to recognize these operations and optimize them
appropriately, it also makes it easier to port the code and still get
good performance.
This is how computer languages and processors evolve in general.
Consider floating point and trigonometric functions. Once upon a time
programmers might have been required to code these things themselves.
But this would make it difficult to use hardware which has these
operations built in. So just about every language provides them as
standard features, with provisions for open-coding them. What's the
difference between operations on floating point numbers and operations
on sophisticated data structures such as queues?
Barry Margolin
Thinking Machines Corp.
barmar@think.com
{uunet,harvard}!think!barmar
Technical Details
Message-ID:
<39609@think.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!decvax!ima!think!barmarReferences:
<57252@yale-celray.yale.UUCP> <4101@tolerant.UUCP> <134@dg.dg.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!decvax!ima!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.arch Subject: Re: Complex Instructions Message-ID: <39609@think.UUCP> Date: 21 Apr 89 16:12:36 GMT References: <57252@yale-celray.yale.UUCP> <4101@tolerant.UUCP> <134@dg.dg.com> Sender: news@think.UUCP Reply-To: barmar@sauron.think.com (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge, MA Lines: 31