aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-02-03 04:33:00 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-02-03 04:33:00 +0000
commit6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760 (patch)
treea4ccd8fe12fbd58b2ca6fb64601acc7d41d71f38 /lib/CodeGen/MachineFunction.cpp
parentaab219110994cc4d848fae5f50166a2f70ccc812 (diff)
downloadexternal_llvm-6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760.zip
external_llvm-6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760.tar.gz
external_llvm-6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760.tar.bz2
Add a new MachineJumpTableInfo entry type, EK_GPRel64BlockAddress, which is
needed to emit a 64-bit gp-relative relocation entry. Make changes necessary for emitting jump tables which have entries with directive .gpdword. This patch does not implement the parts needed for direct object emission or JIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149668 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index 3aaae85..8195f9f 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -530,6 +530,8 @@ unsigned MachineJumpTableInfo::getEntrySize(const TargetData &TD) const {
switch (getEntryKind()) {
case MachineJumpTableInfo::EK_BlockAddress:
return TD.getPointerSize();
+ case MachineJumpTableInfo::EK_GPRel64BlockAddress:
+ return 8;
case MachineJumpTableInfo::EK_GPRel32BlockAddress:
case MachineJumpTableInfo::EK_LabelDifference32:
case MachineJumpTableInfo::EK_Custom32:
@@ -549,6 +551,8 @@ unsigned MachineJumpTableInfo::getEntryAlignment(const TargetData &TD) const {
switch (getEntryKind()) {
case MachineJumpTableInfo::EK_BlockAddress:
return TD.getPointerABIAlignment();
+ case MachineJumpTableInfo::EK_GPRel64BlockAddress:
+ return TD.getABIIntegerTypeAlignment(64);
case MachineJumpTableInfo::EK_GPRel32BlockAddress:
case MachineJumpTableInfo::EK_LabelDifference32:
case MachineJumpTableInfo::EK_Custom32: