linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jan Beulich <JBeulich@suse.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Andy Lutomirski <luto@kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vsyscall: use __iter_div_u64_rem()
Date: Mon, 22 Jul 2019 12:48:08 +0200	[thread overview]
Message-ID: <CAK8P3a0_rEkWYgH_Tc7jwpYOYMy5wA+X0zchQcsXYi62kUG61A@mail.gmail.com> (raw)
In-Reply-To: <8f01be52-3235-644d-4afc-df979bfce25e@suse.com>

On Mon, Jul 22, 2019 at 12:39 PM Jan Beulich <JBeulich@suse.com> wrote:
> On 22.07.2019 12:10, Thomas Gleixner wrote:
> > On Thu, 11 Jul 2019, Arnd Bergmann wrote:
> "q" was used in that commit exclusively for byte sized operands, simply
> because that _is_ the constraint to use in such cases. Using "r" is
> wrong on 32-bit, as it would include inaccessible byte portions of %sp,
> %bp, %si, and %di. This is how it's described in gcc sources / docs:
>
>   "Any register accessible as @code{@var{r}l}.  In 32-bit mode, @code{a},
>    @code{b}, @code{c}, and @code{d}; in 64-bit mode, any integer register."
>
> What I'm struggling with is why clang would evaluate that asm() in the
> first place when a 64-bit field (perf_ctr_virt_mask) is being accessed.

clang does the optimization and warning checking in a different order,
in this case the argument type checks for the inline assembly is done
before it eliminates the dead code.

        Arnd

      reply	other threads:[~2019-07-22 10:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 13:01 [PATCH] vsyscall: use __iter_div_u64_rem() Arnd Bergmann
2019-07-10 15:22 ` [tip:timers/urgent] timekeeping/vsyscall: Use __iter_div_u64_rem() tip-bot for Arnd Bergmann
2019-07-10 16:56 ` [PATCH] vsyscall: use __iter_div_u64_rem() Nathan Chancellor
2019-07-10 18:43 ` [tip:timers/urgent] timekeeping/vsyscall: Use __iter_div_u64_rem() tip-bot for Arnd Bergmann
2019-07-11 12:14 ` [PATCH] vsyscall: use __iter_div_u64_rem() Vincenzo Frascino
2019-07-11 12:28   ` Arnd Bergmann
2019-07-11 13:08     ` Vincenzo Frascino
2019-07-11 17:14     ` Nick Desaulniers
2019-07-11 20:55       ` Arnd Bergmann
2019-07-22 10:10     ` Thomas Gleixner
2019-07-22 10:38       ` Jan Beulich
2019-07-22 10:48         ` Arnd Bergmann [this message]

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=CAK8P3a0_rEkWYgH_Tc7jwpYOYMy5wA+X0zchQcsXYi62kUG61A@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=JBeulich@suse.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).