home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky sci.math:11291 comp.lang.misc:3033 comp.lang.fortran:3526 comp.std.c:2610 comp.lang.c:13554
- Newsgroups: sci.math,comp.lang.misc,comp.lang.fortran,comp.std.c,comp.lang.c
- Path: sparky!uunet!sun-barr!ames!think.com!paperboy.osf.org!meissner
- From: meissner@osf.org (Michael Meissner)
- Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
- In-Reply-To: a_rubin@dsg4.dse.beckman.com's message of 10 Sep 92 19:12:27 GMT
- Message-ID: <MEISSNER.92Sep11164441@curley.osf.org>
- Sender: news@osf.org (USENET News System)
- Organization: Open Software Foundation
- References: <92Sep1.205116edt.669@neuron.ai.toronto.edu>
- <1992Sep4.162938.29237@dscomsf.desy.de>
- <Bu2r42.5xr@mentor.cc.purdue.edu> <id.I12T.GP4@ferranti.com>
- <a_rubin.716152347@dn66>
- Date: 11 Sep 92 16:44:41
- Lines: 31
-
- In article <a_rubin.716152347@dn66> a_rubin@dsg4.dse.beckman.com
- (Arthur Rubin) writes:
-
- | Using, instead,
- |
- | c = (long)a * b;
- |
- | it becomes a "quality of implementation" issue; and using the 4/2->2,2
- | divide instruction would incorrect on 80x86 machines, as the divide
- | instruction would overflow in cases where the C operations would be legal.
-
- With most optimizing compilers, this is pretty simple to put in, since
- most optimizations are essentially pattern matching (you match the two
- converts, and long multiply). Some time ago, I put long long multiply
- code into the MIPS port of GCC for instance in about 2 minutes of
- time. The code:
-
- long long mul (long a, long b) { return (long long)a * b; }
-
- produces the following code:
-
- mul:
- mult $4,$5
- mfhi $3
- mflo $2
- j $31
- --
- Michael Meissner email: meissner@osf.org phone: 617-621-8861
- Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
-
- You are in a twisty little passage of standards, all conflicting.
-