mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 04:43:52 -04:00
4c9a93800121e90484cd07c8e5bde70e31cdb996
- Use "+" constraint modifier,
simplify inputs and output lists,
delete dummy variables with meaningless names,
"&" only makes sense in complex assembly creating constraints on
intermediate registers. But 1 instruction assemblies don't have
inner body so to speak.
- Write "rep stos*" on one line:
Rep prefix is integral part of x86 instruction. I'm not sure why
people separate "rep" with newline.
Uros Bizjak adds context: "some archaic assemblers rejected 'rep
insn' on one line. I have checked that the minimum required
binutils-2.25 assembles this without problems."
- Use __auto_type for maximum copy pasta experience,
- Reformat a bit to make everything looks nicer.
Note that "memory" clobber is too much if "n" is known at compile time.
However,
"=m" (*(T(*)[n])s)
doesn't work because -Wvla even if "n" is compile time constant:
if (BCP(n)) {
rep stos
: "=m" (*(T(*)[n])s)
} else {
rep stosw
: "memory"
}
The above doesn't work.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lore.kernel.org/r/20240314165715.31831-1-adobriyan@gmail.com
…
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the ReStructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
Languages
C
96.9%
Assembly
0.9%
Rust
0.6%
Shell
0.6%
Python
0.5%
Other
0.3%