[all-commits] [llvm/llvm-project] 869ffc: [CodeGen][i386] Move -mregparm storage earlier and...
Kees Cook via All-commits
all-commits at lists.llvm.org
Mon Apr 29 14:54:32 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 869ffcf3f6ca74c8a0ec6eb250d45e6ea0680c81
https://github.com/llvm/llvm-project/commit/869ffcf3f6ca74c8a0ec6eb250d45e6ea0680c81
Author: Kees Cook <keescook at chromium.org>
Date: 2024-04-29 (Mon, 29 Apr 2024)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/test/CodeGen/regparm-flag.c
M llvm/include/llvm/Transforms/Utils/BuildLibCalls.h
M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
Log Message:
-----------
[CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (#89707)
When building the Linux kernel for i386, the -mregparm=3 option is
enabled. Crashes were observed in the sanitizer handler functions, and
the problem was found to be mismatched calling convention.
As was fixed in commit c167c0a4dcdb ("[BuildLibCalls] infer inreg param
attrs from NumRegisterParameters"), call arguments need to be marked as
"in register" when -mregparm is set. Use the same helper developed there
to update the function arguments.
Since CreateRuntimeFunction() is actually part of CodeGenModule, storage
of the -mregparm value is also moved to the constructor, as doing this
in Release() is too late.
Fixes: https://github.com/llvm/llvm-project/issues/89670
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list