blob: 156bf19b43699e0b9e2dc469f0d1865148f77373 [file] [log] [blame]
Daniel Dunbare7bd8862010-02-21 21:53:53 +00001//===-- 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"
11using namespace llvm;
12
Rafael Espindolafd467972010-11-26 04:24:21 +000013TargetAsmBackend::TargetAsmBackend()
14 : HasReliableSymbolDifference(false),
Daniel Dunbar06829512010-03-18 00:58:53 +000015 HasScatteredSymbols(false)
Daniel Dunbare7bd8862010-02-21 21:53:53 +000016{
17}
18
19TargetAsmBackend::~TargetAsmBackend() {
20}
Daniel Dunbar2761fc42010-12-16 03:20:06 +000021
22const MCFixupKindInfo &
23TargetAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
24 static const MCFixupKindInfo Builtins[] = {
25 { "FK_Data_1", 0, 8, 0 },
26 { "FK_Data_2", 0, 16, 0 },
27 { "FK_Data_4", 0, 32, 0 },
28 { "FK_Data_8", 0, 64, 0 },
29 { "FK_PCRel_1", 0, 8, MCFixupKindInfo::FKF_IsPCRel },
30 { "FK_PCRel_2", 0, 16, MCFixupKindInfo::FKF_IsPCRel },
31 { "FK_PCRel_4", 0, 32, MCFixupKindInfo::FKF_IsPCRel }
32 };
33
34 assert(Kind <= sizeof(Builtins) / sizeof(Builtins[0]) &&
35 "Unknown fixup kind");
36 return Builtins[Kind];
37}