Re: Subtraction + comparison in one asm instruction?

"Vincent Lefevre" <vincent+news@vinc17.org>
8 Sep 2002 22:44:20 -0400

          From comp.compilers

Related articles
Subtraction + comparison in one asm instruction? vincent+news@vinc17.org (Vincent Lefevre) (2002-08-10)
Re: Subtraction + comparison in one asm instruction? Peter-Lawrence.Montgomery@cwi.nl (Peter L. Montgomery) (2002-08-14)
Re: Subtraction + comparison in one asm instruction? iddw@hotmail.com (Dave Hansen) (2002-08-14)
Re: Subtraction + comparison in one asm instruction? walter@bytecraft.com (Walter Banks) (2002-08-23)
Re: Subtraction + comparison in one asm instruction? vincent+news@vinc17.org (Vincent Lefevre) (2002-08-23)
Re: Subtraction + comparison in one asm instruction? gdr@soliton.integrable-solutions.net (Gabriel Dos Reis) (2002-09-03)
Re: Subtraction + comparison in one asm instruction? vincent+news@vinc17.org (Vincent Lefevre) (2002-09-08)
Re: Subtraction + comparison in one asm instruction? gdr@integrable-solutions.net (Gabriel Dos Reis) (2002-09-12)
Re: Subtraction + comparison in one asm instruction? vbdis@aol.com (VBDis) (2002-09-12)
Re: Subtraction + comparison in one asm instruction? gdr@integrable-solutions.net (Gabriel Dos Reis) (2002-09-12)
Re: Subtraction + comparison in one asm instruction? vincent+news@vinc17.org (Vincent Lefevre) (2002-09-12)
Re: Subtraction + comparison in one asm instruction? anton@mips.complang.tuwien.ac.at (Anton Ertl) (2002-09-14)
Re: Subtraction + comparison in one asm instruction? vincent+news@vinc17.org (Vincent Lefevre) (2002-09-14)
[6 later articles]
| List of all articles for this month |

From: "Vincent Lefevre" <vincent+news@vinc17.org>
Newsgroups: comp.compilers
Date: 8 Sep 2002 22:44:20 -0400
Organization: a training zoo
References: 02-08-033 02-08-044 02-08-064 02-09-006
Keywords: architecture, optimize
Posted-Date: 08 Sep 2002 22:44:20 EDT

    Gabriel Dos Reis <gdr@soliton.integrable-solutions.net> wrote:


> It is quite reasonable to expect an underflow trap/exception, if such
> a thing is supported by the executing environment (e.g. conforming to
> "Language Independent Arithmetic, part 1"). In that case, I would not
> like to see the compiler deliberately suppress that expectation in my
> codes.


In all the cases I've tested, there was no support for underflow trap,
so this can't be an argument against this optimization in these cases
(gcc optimizes int f(int x) { return (x - 1) + 1; } to "return x;",
so why not other optimizations that can hide overflows under these
conditions?). If underflow/overflow traps are supported, there could
be a compiler switch to allow the user to say that he has proved that
there are no overflows in his program, so that such optimizations
could be performed for speed-critical programs.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.