[PATCH] D128958: Add assembler plumbing for sanitize_memtag
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 11:21:15 PDT 2022
hctim marked 2 inline comments as done.
hctim added a comment.
In D128958#3624192 <https://reviews.llvm.org/D128958#3624192>, @MaskRay wrote:
> This needs a discussion on https://github.com/ARM-software/abi-aa/ . There are not many STO_ bits and I am not sure the usage is worth reserving one bit for it.
Reworked: no longer uses st_other bits to signal to the linker to do work - instead, it uses a new android-specific section type filled with R_AARCH64_NONE relocations.
================
Comment at: llvm/lib/MC/MCSymbolELF.cpp:204
+
+void MCSymbolELF::setTagged(bool Tagged) {
+ uint32_t OtherFlags = getFlags() & ~(0x1 << ELF_IsMemoryTagged);
----------------
fmayer wrote:
> Consider turning this into explicit branches, which I think is easier to understand. Up to you though.
>
>
> ```
> uint32_t NewFlags;
> if (Tagged)
> NewFlags = getFlags() | (1x << ELF_IsMemoryTagged);
> else
> NewFlags = getFlags() & ~(1x << ELF_IsMemoryTagged);
> ```
sure, done, but slightly differently.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128958/new/
https://reviews.llvm.org/D128958
More information about the llvm-commits
mailing list