Related articles |
---|
[5 earlier articles] |
Re: Compiler Correctness danwang74@gmail.com (Daniel C. Wang) (2006-02-11) |
Re: Compiler Correctness torbenm@app-1.diku.dk (2006-02-11) |
Re: Compiler Correctness henry@spsystems.net (2006-02-11) |
Re: Compiler Correctness Sid.Touati@inria.fr (Sid Touati) (2006-02-11) |
Re: Compiler Correctness haberg@math.su.se (2006-02-11) |
Re: Compiler Correctness haberg@math.su.se (2006-02-11) |
Re: Compiler Correctness henry@spsystems.net (2006-02-11) |
Re: Compiler Correctness Xavier.Leroy@inria.fr (Xavier Leroy) (2006-02-12) |
Re: Compiler Correctness DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-02-14) |
Re: Compiler Correctness marcov@stack.nl (Marco van de Voort) (2006-02-14) |
Re: Compiler Correctness DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-02-14) |
Re: Compiler Correctness henry@spsystems.net (2006-02-17) |
Re: Compiler Correctness henry@spsystems.net (2006-02-17) |
[3 later articles] |
From: | henry@spsystems.net (Henry Spencer) |
Newsgroups: | comp.compilers |
Date: | 11 Feb 2006 17:52:19 -0500 |
Organization: | SP Systems, Toronto, Canada |
References: | 06-02-053 06-02-061 06-02-078 |
Keywords: | theory, debug |
Posted-Date: | 11 Feb 2006 17:52:19 EST |
Sid Touati <Sid.Touati@inria.fr> wrote:
>As example, suppose that the compiler executes on a 32 bits machine and
> generates a code for a 64 bits machine. If the compiler makes static
>constant propagation, it makes arithmetic computation on the 32 bit
>machine. This would not give you the same result if you generate the
>code on the 64 bits machines.
Any cross-compiler which doesn't emulate the *target* machine's arithmetic
when performing operations like constant propagation is simply broken.
Of course, if it does emulate, there is still the issue of whether it
emulates *correctly*. But this is just another case of "are there bugs in
the compiler?"; it's not a fundamental problem of missed assumptions.
>We can imagine more complex cases with floating point computations...
Emulating another machine's floating point is definitely a lot of work
(the widespread consensus on IEEE-standard floating point has helped but
doesn't entirely solve the problem). But if you signed on to write a
cross-compiler, well, you knew the job was dangerous when you took it. :-)
--
spsystems.net is temporarily off the air; | Henry Spencer
mail to henry at zoo.utoronto.ca instead. | henry@spsystems.net
Return to the
comp.compilers page.
Search the
comp.compilers archives again.