llvm-capstone/clang/docs
Peter Collingbourne 3859fc653f AArch64: Switch to x20 as the shadow base register for outlined HWASan checks.
From a code size perspective it turns out to be better to use a
callee-saved register to pass the shadow base. For non-leaf functions
it avoids the need to reload the shadow base into x9 after each
function call, at the cost of an additional stack slot to save the
caller's x20. But with x9 there is also a stack size cost, either
as a result of copying x9 to a callee-saved register across calls or
by spilling it to stack, so for the non-leaf functions the change to
stack usage is largely neutral.

It is also code size (and stack size) neutral for many leaf functions.
Although they now need to save/restore x20 this can typically be
combined via LDP/STP into the x30 save/restore. In the case where
the function needs callee-saved registers or stack spills we end up
needing, on average, 8 more bytes of stack and 1 more instruction
but given the improvements to other functions this seems like the
right tradeoff.

Unfortunately we cannot change the register for the v1 (non short
granules) check because the runtime assumes that the shadow base
register is stored in x9, so the v1 check still uses x9.

Aside from that there is no change to the ABI because the choice
of shadow base register is a contract between the caller and the
outlined check function, both of which are compiler generated. We do
need to rename the v2 check functions though because the functions
are deduplicated based on their names, not on their contents, and we
need to make sure that when object files from old and new compilers
are linked together we don't end up with a function that uses x9
calling an outlined check that uses x20 or vice versa.

With this change code size of /system/lib64/*.so in an Android build
with HWASan goes from 200066976 bytes to 194085912 bytes, or a 3%
decrease.

Differential Revision: https://reviews.llvm.org/D90422
2020-10-30 12:51:30 -07:00
..
analyzer [NFC][Docs] fix clang-docs compilation 2020-09-24 13:13:38 +02:00
CommandGuide [clang][docs] Fix documentation of -O 2020-09-17 13:44:01 +01:00
tools [ASTMatchers] Enhanced support for matchers taking Regex arguments 2020-07-02 14:52:25 +01:00
AddressSanitizer.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
APINotes.rst docs: add documentation describing API Notes 2020-10-05 18:29:13 +00:00
AutomaticReferenceCounting.rst Rewrite the non-trivial structs section of the ARC spec. 2020-03-06 02:51:45 -05:00
Block-ABI-Apple.rst Fix the type of the invoke function in the block ABI documentation 2020-09-04 10:29:09 -07:00
Block-ABI-Apple.txt
BlockLanguageSpec.rst
ClangCheck.rst
ClangCommandLineReference.rst [AMDGPU] Update AMD GPU documentation 2020-10-29 20:12:47 +00:00
ClangFormat.rst Add -Wno-error=unknown flag to clang-format. 2020-09-19 10:17:57 +02:00
ClangFormatStyleOptions.rst [clang-format] Add a SpaceAroundPointerQualifiers style option 2020-10-18 18:17:50 +01:00
ClangFormattedStatus.rst [clang-format] NFC 1% improvement in the overall clang-formatted status 2020-06-27 12:18:23 +01:00
ClangPlugins.rst Add an attribute plugin example 2020-03-25 14:33:44 +00:00
ClangStaticAnalyzer.rst [analyzer]Add user docs rst 2019-07-10 14:49:53 +00:00
ClangTools.rst Fix some sphinx doc errors. 2019-02-01 17:06:41 +00:00
CMakeLists.txt fix comment typo to cycle bots 2020-04-06 18:58:27 -04:00
conf.py Bump the trunk major version to 12 2020-07-15 12:05:05 +02:00
ConstantInterpreter.rst [docs] Fix warnings in ConstantInterpreter 2020-05-23 19:36:05 +00:00
ControlFlowIntegrity.rst [docs] Update ControlFlowIntegrity.rst. 2020-10-02 12:01:05 -07:00
ControlFlowIntegrityDesign.rst Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
CrossCompilation.rst
DataFlowSanitizer.rst [docs] Add missing semicolon to example. 2020-08-14 13:46:05 -07:00
DataFlowSanitizerDesign.rst
DiagnosticsReference.rst [WebAssembly] Handle exception specifications 2020-05-19 01:16:09 -07:00
doxygen-mainpage.dox
doxygen.cfg.in [NFC] Remove LLVM_ALIGNAS 2019-07-31 03:22:08 +00:00
DriverArchitecture.png
DriverInternals.rst
ExternalClangExamples.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
FAQ.rst
HardwareAssistedAddressSanitizerDesign.rst AArch64: Switch to x20 as the shadow base register for outlined HWASan checks. 2020-10-30 12:51:30 -07:00
HowToSetupToolingForLLVM.rst Don't call anyone lazy in the documentation. 2020-03-17 16:33:28 -04:00
index.rst [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project 2020-05-29 20:27:56 +01:00
InternalsManual.rst Add ParsedAttrInfo::handleDeclAttribute 2020-03-23 13:23:11 +00:00
IntroductionToTheClangAST.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
ItaniumMangleAbiTags.rst
JSONCompilationDatabase.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
LanguageExtensions.rst Revert "[SYCL] Implement __builtin_unique_stable_name." 2020-10-12 01:10:09 -04:00
LeakSanitizer.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
LibASTImporter.rst Doc: Links should use https 2020-03-22 22:49:33 +01:00
LibASTMatchers.rst
LibASTMatchersReference.html [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs 2020-10-11 18:52:38 +03:00
LibASTMatchersTutorial.rst fix a doc typo to cycle bots 2019-12-20 21:39:01 -05:00
LibFormat.rst [clang-format][docfix] Update predefined styles in docs 2020-05-20 20:03:53 -04:00
LibTooling.rst [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
LTOVisibility.rst [Docs] Document --lto-whole-program-visibility 2020-08-25 19:44:54 -07:00
make.bat
Makefile.sphinx
MatrixTypes.rst typo fixes to cycle bots 2020-07-01 19:20:05 -04:00
MemorySanitizer.rst [ReleaseNotes] MemorySanitizer support of ASLR on FreeBSD 2019-08-27 10:04:03 +00:00
Modules.rst [Implicit Modules] Add -cc1 option -fmodules-strict-context-hash which includes search paths and diagnostics. 2019-10-21 22:51:13 +00:00
MSVCCompatibility.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
ObjectiveCLiterals.rst
OpenCLSupport.rst [OpenCL] Add doc to describe OpenCL support 2019-10-17 12:56:02 +00:00
OpenMPSupport.rst [OpenMP][Docs] Mark present map type modifier as done 2020-08-05 10:03:31 -04:00
PCHInternals.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
PCHLayout.graffle
PCHLayout.png
RAVFrontendAction.rst [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
README.txt
RefactoringEngine.rst
ReleaseNotes.rst [X86] Add a stub for Intel's alderlake. 2020-10-24 19:01:22 +02:00
SafeStack.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
SanitizerCoverage.rst [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list 2020-06-19 22:22:47 -07:00
SanitizerSpecialCaseList.rst
SanitizerStats.rst
ShadowCallStack.rst Delete x86_64 ShadowCallStack support 2019-03-07 18:56:36 +00:00
SourceBasedCodeCoverage.rst [profile] Add %t LLVM_PROFILE_FILE option to substitute $TMPDIR 2020-09-25 09:39:40 -07:00
ThinLTO.rst [ThinLTO][Documentation] Mention possible values for concurrency flags 2020-10-13 09:57:58 -04:00
ThreadSafetyAnalysis.rst Thread safety analysis: Improve documentation for ASSERT_CAPABILITY 2020-09-26 22:16:50 +02:00
ThreadSanitizer.rst [docs] Add some architectures into the list of supported ThreadSanitizer platforms 2019-03-05 21:10:42 +00:00
Toolchain.rst Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
Tooling.rst
UndefinedBehaviorSanitizer.rst Add an unsigned shift base sanitizer 2020-08-27 19:50:10 -07:00
UsersManual.rst [clang] Enable support for #pragma STDC FENV_ACCESS 2020-10-25 06:46:25 -07:00

See llvm/docs/README.txt