[PATCH] D140689: [llvm][dfsan] Enable loongarch64 and add `zeroext` attribute
Youling Tang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 27 03:47:42 PST 2022
tangyouling created this revision.
tangyouling added reviewers: Sanitizers, browneee, kcc, SixWeining, xen0n, xry111, MaskRay, XiaodongLoong.
Herald added subscribers: Enna1, StephenFan, hiraditya.
Herald added a project: All.
tangyouling requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Enable loongarch64 and add `zeroext` attribute for below callbacks'
first parameter to conform ABI calling convention.
- __dfsan_load_callback
- __dfsan_store_callback
- __dfsan_cmp_callback
- __dfsan_conditional_callback
- __dfsan_conditional_callback_origin
- __dfsan_reaches_function_callback
- __dfsan_reaches_function_callback_origin
The type of these callbacks' first parameter is `u8` (see the
definition of `dfsan_label`). LoongArch ABI (at least the lp64d)
requires unsigned integer data types (except unsigned int) are
zero-extended when stored in general-purpose register. So we need to
add the `zeroext` attribute when declaring and calling them.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140689
Files:
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
llvm/test/Instrumentation/DataFlowSanitizer/callback-loongarch64.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140689.485366.patch
Type: text/x-patch
Size: 8274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221227/a05de2bc/attachment.bin>
More information about the llvm-commits
mailing list