Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1591148

Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings
Date 2017-03-02 15:50 +0100
Message-ID <tgAdl-3As-27@gated-at.bofh.it> (permalink)
References (5 earlier) <tgnzr-34a-7@gated-at.bofh.it> <tgsz7-6IB-1@gated-at.bofh.it> <tgzqV-2ZE-3@gated-at.bofh.it> <tgzqV-2ZE-1@gated-at.bofh.it> <tgzTY-3s2-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Josh Poimboeuf <jpoimboe@redhat.com> wrote:

> > > > Well, technically an invalid opcode is shorter code than generating an 
> > > > (integer) division by zero exception, right?
> > > 
> > > What does that matter if it's the wrong behavior?
> > 
> > Well, both terminate the program, and it's obvious if you look at it with a 
> > debugger what happened, right?
> 
> If it were obvious, we wouldn't be having this discussion :-)

Touche ;-)

> The only thing obvious to me was that gcc mysteriously removed a bunch of code 
> and replaced it with a 'ud2' instruction in the middle of the function for no 
> apparent reason.

I don't know what their motivation was, but if it's not a bug, if it was done 
intentionally, then I'd guess it's roughly the argument I made: in simple 
testcases it can be argued to be a code size improvement, plus it's probably 
allowed by the letter of the compiler standards (program termination behavior is 
notoriously platform dependent and thus vaguely specified) - but for real-life 
code I very much agree that it's a step backward in generated code quality...

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-01 10:40 +0100
  Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-01 11:00 +0100
    Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-01 15:50 +0100
      Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-01 18:30 +0100
        Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-01 23:10 +0100
        Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-01 23:50 +0100
          Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-02 02:20 +0100
            Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Ingo Molnar <mingo@kernel.org> - 2017-03-02 07:40 +0100
              Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Ingo Molnar <mingo@kernel.org> - 2017-03-02 15:00 +0100
                Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-02 15:30 +0100
                Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Ingo Molnar <mingo@kernel.org> - 2017-03-02 15:50 +0100
              Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-02 15:10 +0100
            Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-03 00:20 +0100
              Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-03 01:00 +0100
                Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-03 10:30 +0100
                Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-03 16:40 +0100
  Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-01 16:30 +0100
    Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-02 19:40 +0100
      Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann <arnd@arndb.de> - 2017-03-03 00:00 +0100
        Re: [PATCH] objtool: fix another gcc jump table detection issue Arnd Bergmann <arnd@arndb.de> - 2017-03-03 00:10 +0100
        [PATCH] objtool: fix another gcc jump table detection issue Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-03 04:20 +0100
  Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-01 16:30 +0100

csiph-web