[PATCH] powerpc: fix inline asm constraints for dcbz

Nathan Chancellor natechancellor at gmail.com
Sat Aug 10 06:36:45 AEST 2019


On Fri, Aug 09, 2019 at 11:21:05AM -0700, Nick Desaulniers wrote:
> The input parameter is modified, so it should be an output parameter
> with "=" to make it so that a copy of the input is not made by Clang.
> 
> Link: https://bugs.llvm.org/show_bug.cgi?id=42762
> Link: https://gcc.gnu.org/onlinedocs/gcc/Modifiers.html#Modifiers
> Link: https://github.com/ClangBuiltLinux/linux/issues/593
> Link: https://godbolt.org/z/QwhZXi
> Link: https://lore.kernel.org/lkml/20190721075846.GA97701@archlinux-threadripper/
> Fixes: 6c5875843b87 ("powerpc: slightly improve cache helpers")
> Debugged-by: Nathan Chancellor <natechancellor at gmail.com>
> Reported-by: Nathan Chancellor <natechancellor at gmail.com>
> Reported-by: kbuild test robot <lkp at intel.com>
> Suggested-by: Arnd Bergmann <arnd at arndb.de>
> Suggested-by: Nathan Chancellor <natechancellor at gmail.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers at google.com>

I applied this patch as well as a revert of the original patch and both
clang and GCC appear to generate the same code; I think a straight
revert would be better.

Crude testing script and the generated files attached.

Cheers,
Nathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp.bRmcRT0jd0.sh
Type: application/x-sh
Size: 2653 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190809/b5f2dc86/attachment-0001.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testing-output.tar.gz
Type: application/gzip
Size: 16412 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190809/b5f2dc86/attachment-0001.gz>


More information about the Linuxppc-dev mailing list