Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MC] Add 'G' to augmentation string for MTE instrumented functions
This was agreed on in https://lists.llvm.org/pipermail/llvm-dev/2020-May/141345.html The thread proposed two options * add a character to augmentation string and handle in libuwind * use a separate personality function. It was determined that this is the simpler and better option. This is part of ARM's Aarch64 ABI: https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst#id22 The next step after this is teaching libunwind to untag when this augmentation character is set. Reviewed By: MaskRay, eugenis Differential Revision: https://reviews.llvm.org/D127007
- Loading branch information
Showing
13 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
; RUN: llc < %s -mtriple=aarch64 -mattr=+mte | FileCheck %s | ||
|
||
declare void @use32(ptr) | ||
|
||
define void @WithUnwind() sanitize_memtag { | ||
entry: | ||
; CHECK-LABEL: WithUnwind: | ||
; CHECK: .cfi_mte_tagged_frame | ||
; CHECK: stg | ||
%x = alloca i32, align 4 | ||
call void @use32(i32* %x) | ||
ret void | ||
} | ||
|
||
define void @NoUnwind() sanitize_memtag nounwind { | ||
entry: | ||
; CHECK-LABEL: NoUnwind: | ||
; CHECK-NOT: .cfi_mte_tagged_frame | ||
; CHECK: stg | ||
%x = alloca i32, align 4 | ||
call void @use32(i32* %x) | ||
ret void | ||
} | ||
|
||
define void @NoUnwindUwTable() sanitize_memtag nounwind uwtable { | ||
entry: | ||
; CHECK-LABEL: NoUnwindUwTable: | ||
; CHECK: .cfi_mte_tagged_frame | ||
; CHECK: stg | ||
%x = alloca i32, align 4 | ||
call void @use32(i32* %x) | ||
ret void | ||
} | ||
|
||
define void @NoMemtag() { | ||
entry: | ||
; CHECK-LABEL: NoMemtag: | ||
; CHECK-NOT: .cfi_mte_tagged_frame | ||
; CHECK-NOT: stg | ||
%x = alloca i32, align 4 | ||
call void @use32(i32* %x) | ||
ret void | ||
} |