lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] vsyscall: use __iter_div_u64_rem()
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

\
 
 \ /
  Last update: 2019-07-22 12:48    [W:0.069 / U:5.660 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site