[libc-commits] [PATCH] D72102: [libc] Add __attribute__((always_inline)) to x86_64 syscall functions.
Alex Brachet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jan 6 11:55:22 PST 2020
abrachet added inline comments.
================
Comment at: libc/config/linux/x86_64/syscall.h.inc:17
-inline long syscall(long __number) {
+__attribute__((always_inline)) inline long syscall(long __number) {
long retcode;
----------------
sivachandra wrote:
> abrachet wrote:
> > I guess `inline` isn't necessary to keep anymore?
> I do not know if its unnecessary. I have looked at examples in glibc and they seem to be using the inline keyword along with the inline attribute. But, there are also a small number of examples which only use the attribute and no keyword.
>
> If you are confident the keyword is not necessary anymore, I will remove it :)
We should just keep it then. It doesn't hurt certainly.
================
Comment at: libc/config/linux/x86_64/syscall.h.inc:90
"=a"(retcode) :
"a"(__number), "D"(__arg1), "S"(__arg2), "d"(__arg3), "r"(r10), "r"(r8), "r"(r9) :
SYSCALL_CLOBBER_LIST);
----------------
sivachandra wrote:
> abrachet wrote:
> > Ditto to `clang-format` this line is too long.
> I do run clang-format with every change. However, since the names of these files do not end in `.h`, clang-format ignores them. I will play with renaming these files just to get clang-format to look at them, and then revert to the old name. Will do so in different change.
Thats a pain. It looks like there is an `--assume-filename=<string>` flag, I haven't used this yet but maybe that would be easier? https://clang.llvm.org/docs/ClangFormat.html
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72102/new/
https://reviews.llvm.org/D72102
More information about the libc-commits
mailing list