aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-05-06 16:11:12 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-05-06 16:11:12 +0000
commite96e43f9a4a8e213fdb843858f26f86eb8d2ba51 (patch)
treec76a8b9f04cd6a3414b06b16e1a35a491706ba0d /lib/MC
parent1218bc4fe627ae4d60491ea89124965302815f1f (diff)
downloadexternal_llvm-e96e43f9a4a8e213fdb843858f26f86eb8d2ba51.zip
external_llvm-e96e43f9a4a8e213fdb843858f26f86eb8d2ba51.tar.gz
external_llvm-e96e43f9a4a8e213fdb843858f26f86eb8d2ba51.tar.bz2
[SystemZ] Define DWARF encoding
This is another patch in preparation for adding the SystemZ target. It defines the appropriate values for DWARF encodings; the intent is to be compatible with what GCC currently does on the target. Patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCObjectFileInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp
index 79ebad1..3ac5333 100644
--- a/lib/MC/MCObjectFileInfo.cpp
+++ b/lib/MC/MCObjectFileInfo.cpp
@@ -295,6 +295,15 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8;
TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
dwarf::DW_EH_PE_udata8;
+ } else if (T.getArch() == Triple::systemz) {
+ // All currently-defined code models guarantee that 4-byte PC-relative
+ // values will be in range.
+ PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
+ dwarf::DW_EH_PE_sdata4;
+ LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+ FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+ TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
+ dwarf::DW_EH_PE_sdata4;
}
// Solaris requires different flags for .eh_frame to seemingly every other