All of lore.kernel.org
 help / color / mirror / Atom feed
* arm64: Question about warnings due to unspecified ASM operand width
@ 2017-04-18  1:31 Matthias Kaehlcke
  2017-04-18 11:38 ` Catalin Marinas
  2017-04-18 14:29 ` Ard Biesheuvel
  0 siblings, 2 replies; 6+ messages in thread
From: Matthias Kaehlcke @ 2017-04-18  1:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

During my work on improving support for kernel builds with clang I
came across a bunch of warnings on arm64 builds about the width of
operands in assembly not being specified:

arch/arm64/include/asm/arch_timer.h:92:46: error: value size does
      not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths]
        asm volatile("mrs %0,   cntfrq_el0" : "=r" (val));

I understand that this is usually not a problem and might even be
desired to give the compiler more flexiblity in the use of the
available registers.

My goal is to eventually build the kernel without warnings, not
necessarily fixing all of them, warnings can also be disabled, e.g.
in case of spurious warnings or a high number of occurrences that is
too expensive to fix.

Before delving into 'fixing' these 'asm-operand-widths' warnings I'd
be interested to know if this is actually desirable or if it is
preferred to keep the operand width unspecified in certain cases.

Thanks

Matthias

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-18 19:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-18  1:31 arm64: Question about warnings due to unspecified ASM operand width Matthias Kaehlcke
2017-04-18 11:38 ` Catalin Marinas
2017-04-18 18:12   ` Matthias Kaehlcke
2017-04-18 14:29 ` Ard Biesheuvel
2017-04-18 19:23   ` Matthias Kaehlcke
2017-04-18 19:54     ` Ard Biesheuvel

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.