Re: [erlang-bugs] Properly let floating-point instructions through in the BEAM compiler

Björn Gustavsson <[email protected]>
Newsgroups gmane.comp.lang.erlang.patches,gmane.comp.lang.erlang.bugs
Message-ID <CA+yh78QsnEwfp1ncHH7OfAnaRaotJARYVpL159F55VVDbqnxbg@mail.gmail.com>
On Mon, Nov 18, 2013 at 11:52 AM, Anthony Ramine <[email protected]> wrote:

> Hello,
>
> The compiler shouldn't crash when fed an already-optimised BEAM assembly
> file.
>
>         git fetch https://github.com/nox/otp.git beam-fp-insts
>
>         https://github.com/nox/otp/compare/beam-fp-insts
>         https://github.com/nox/otp/compare/beam-fp-insts.patch
>
>
I am very picky with good coverage of the compiler code. If coverage
is good to begin with, it is easy to see when the coverage gets worse
that some optimization is no longer being applied.

Suggestion: Include the following one-line change in your patch and
fix the remaining problems:

diff --git a/lib/compiler/test/compile_SUITE.erl
b/lib/compiler/test/compile_SUITE.erl
index be01ea7..4e2753d 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -794,7 +794,7 @@ do_asm(Beam, Outdir) ->
        {ok,Fd} = file:open(AsmFile, [write]),
        beam_listing:module(Fd, Asm),
        ok = file:close(Fd),
-       case compile:file(AsmFile, [from_asm,no_postopt,binary,report]) of
+       case compile:file(AsmFile, [from_asm,binary,report]) of
            {ok,M,_} ->
                ok = file:delete(AsmFile);
            Other ->

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB

_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.