Fixed some bugs.
[llvm/zpu.git] / lib / MC / MCCodeEmitter.cpp
blobd513237855412b1b7bf842e262a96a8ef5fb054e
1 //===-- MCCodeEmitter.cpp - Instruction Encoding --------------------------===//
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 //===----------------------------------------------------------------------===//
10 #include "llvm/MC/MCCodeEmitter.h"
12 using namespace llvm;
14 MCCodeEmitter::MCCodeEmitter() {
17 MCCodeEmitter::~MCCodeEmitter() {
20 const MCFixupKindInfo &MCCodeEmitter::getFixupKindInfo(MCFixupKind Kind) const {
21 static const MCFixupKindInfo Builtins[] = {
22 { "FK_Data_1", 0, 8, 0 },
23 { "FK_Data_2", 0, 16, 0 },
24 { "FK_Data_4", 0, 32, 0 },
25 { "FK_Data_8", 0, 64, 0 }
28 assert(Kind <= 3 && "Unknown fixup kind");
29 return Builtins[Kind];