All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Denys Vlasenko <dvlasenk@redhat.com>
Subject: Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings
Date: Thu, 2 Mar 2017 15:46:39 +0100	[thread overview]
Message-ID: <20170302144639.GA8969@gmail.com> (raw)
In-Reply-To: <20170302140830.6cryk3uepqnrrqef@treble>


* 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

  reply	other threads:[~2017-03-02 14:49 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 12:56 [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann
2016-10-10 20:23 ` Josh Poimboeuf
2016-10-11  8:08   ` Arnd Bergmann
2016-10-11 12:20     ` Josh Poimboeuf
2016-10-11 13:30       ` Arnd Bergmann
2016-10-11 15:05         ` Josh Poimboeuf
2016-10-11 15:51           ` Josh Poimboeuf
2016-10-11 20:38             ` Arnd Bergmann
2016-10-12 13:01               ` Josh Poimboeuf
2016-10-13 12:46               ` Another gcc corruption bug (was Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings) Josh Poimboeuf
2016-10-13 17:57                 ` Denys Vlasenko
2016-10-13 20:15                   ` Josh Poimboeuf
2017-03-01  9:34               ` [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann
2017-03-01  9:45                 ` Arnd Bergmann
2017-03-01 14:40                   ` Josh Poimboeuf
2017-03-01 15:27                     ` Arnd Bergmann
2017-03-01 16:53                       ` Josh Poimboeuf
2017-03-01 22:05                         ` Arnd Bergmann
2017-03-01 22:42                         ` Arnd Bergmann
2017-03-02  1:03                           ` Josh Poimboeuf
2017-03-02  6:31                             ` Ingo Molnar
2017-03-02 12:49                               ` Josh Poimboeuf
2017-03-02 13:46                                 ` Ingo Molnar
2017-03-02 14:08                                   ` Josh Poimboeuf
2017-03-02 14:46                                     ` Ingo Molnar [this message]
2017-03-02 22:49                             ` Arnd Bergmann
2017-03-02 23:05                               ` Josh Poimboeuf
2017-03-03  8:58                                 ` Arnd Bergmann
2017-03-03 11:27                                   ` Arnd Bergmann
2017-03-01 14:31                 ` Josh Poimboeuf
2017-03-01 15:21                   ` Arnd Bergmann
2017-03-02 18:25                     ` Josh Poimboeuf
2017-03-02 22:43                       ` Arnd Bergmann
2017-03-02 22:57                         ` [PATCH] objtool: fix another gcc jump table detection issue Josh Poimboeuf
2017-03-02 23:01                           ` Arnd Bergmann
2016-10-11  1:53 ` [PATCH] objtool: support '-mtune=atom' stack frame setup instruction Josh Poimboeuf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170302144639.GA8969@gmail.com \
    --to=mingo@kernel.org \
    --cc=arnd@arndb.de \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.