Daniel Dunbar | e7bd886 | 2010-02-21 21:53:53 +0000 | [diff] [blame] | 1 | //===-- TargetAsmBackend.cpp - Target Assembly Backend ---------------------==// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "llvm/Target/TargetAsmBackend.h" |
| 11 | using namespace llvm; |
| 12 | |
Rafael Espindola | fd46797 | 2010-11-26 04:24:21 +0000 | [diff] [blame] | 13 | TargetAsmBackend::TargetAsmBackend() |
Daniel Dunbar | 7b62afa | 2010-12-17 02:06:08 +0000 | [diff] [blame] | 14 | : HasReliableSymbolDifference(false) |
Daniel Dunbar | e7bd886 | 2010-02-21 21:53:53 +0000 | [diff] [blame] | 15 | { |
| 16 | } |
| 17 | |
| 18 | TargetAsmBackend::~TargetAsmBackend() { |
| 19 | } |
Daniel Dunbar | 2761fc4 | 2010-12-16 03:20:06 +0000 | [diff] [blame] | 20 | |
| 21 | const MCFixupKindInfo & |
| 22 | TargetAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { |
| 23 | static const MCFixupKindInfo Builtins[] = { |
| 24 | { "FK_Data_1", 0, 8, 0 }, |
| 25 | { "FK_Data_2", 0, 16, 0 }, |
| 26 | { "FK_Data_4", 0, 32, 0 }, |
| 27 | { "FK_Data_8", 0, 64, 0 }, |
| 28 | { "FK_PCRel_1", 0, 8, MCFixupKindInfo::FKF_IsPCRel }, |
| 29 | { "FK_PCRel_2", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, |
| 30 | { "FK_PCRel_4", 0, 32, MCFixupKindInfo::FKF_IsPCRel } |
| 31 | }; |
| 32 | |
| 33 | assert(Kind <= sizeof(Builtins) / sizeof(Builtins[0]) && |
| 34 | "Unknown fixup kind"); |
| 35 | return Builtins[Kind]; |
| 36 | } |