aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-06-15 18:44:08 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-06-15 18:44:08 +0000
commitc63244daa19971760aed20a40d938ff592ad3574 (patch)
treede4416d659f970f83bb3a4c8330bac7a7932b9c8 /llvm/lib/MC/MCObjectFileInfo.cpp
parent2d869b230b482c6a7972d8cd4948ef2b96e389d8 (diff)
downloadllvm-c63244daa19971760aed20a40d938ff592ad3574.zip
llvm-c63244daa19971760aed20a40d938ff592ad3574.tar.gz
llvm-c63244daa19971760aed20a40d938ff592ad3574.tar.bz2
[CodeGen] Introduce a FAULTING_LOAD_OP pseudo-op.
Summary: This instruction encodes a loading operation that may fault, and a label to branch to if the load page-faults. The locations of potentially faulting loads and their "handler" destinations are recorded in a FaultMap section, meant to be consumed by LLVM's clients. Nothing generates FAULTING_LOAD_OP instructions yet, but they will be used in a future change. The documentation (FaultMaps.rst) needs improvement and I will update this diff with a more expanded version shortly. Depends on D10196 Reviewers: rnk, reames, AndyAyers, ab, atrick, pgavlin Reviewed By: atrick, pgavlin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10197 llvm-svn: 239740
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 83a08e2..3ef87b5 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -238,6 +238,9 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(Triple T) {
StackMapSection = Ctx->getMachOSection("__LLVM_STACKMAPS", "__llvm_stackmaps",
0, SectionKind::getMetadata());
+ FaultMapSection = Ctx->getMachOSection("__LLVM_FAULTMAPS", "__llvm_faultmaps",
+ 0, SectionKind::getMetadata());
+
TLSExtraDataSection = TLSTLVSection;
}
@@ -518,6 +521,9 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(Triple T) {
StackMapSection =
Ctx->getELFSection(".llvm_stackmaps", ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
+
+ FaultMapSection =
+ Ctx->getELFSection(".llvm_faultmaps", ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
}
void MCObjectFileInfo::initCOFFMCObjectFileInfo(Triple T) {