summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp
diff options
context:
space:
mode:
authorWesley Peck <peckw@wesleypeck.com>2010-10-21 03:34:22 +0000
committerWesley Peck <peckw@wesleypeck.com>2010-10-21 03:34:22 +0000
commit078db00f1d1c8bec03c00133d114507d27d870b3 (patch)
treefb4a34e40a2ad57f6883f33cf6d0fa773693336d /llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp
parent4c0ffa823f2197c655274297fbfcf8fd5bd47f6f (diff)
downloadbcm5719-llvm-078db00f1d1c8bec03c00133d114507d27d870b3.tar.gz
bcm5719-llvm-078db00f1d1c8bec03c00133d114507d27d870b3.zip
Reverting the commit 116986. It was breaking the build on llvm-x86_64-linux though it
compiles on OS X. I'll ensure that it builds on a linux machine before committing again. llvm-svn: 116991
Diffstat (limited to 'llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp')
-rw-r--r--llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp110
1 files changed, 0 insertions, 110 deletions
diff --git a/llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp b/llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp
deleted file mode 100644
index 378b5d469fb..00000000000
--- a/llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-//===-- MBlazeELFWriterInfo.cpp - ELF Writer Info for the MBlaze backend --===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements ELF writer information for the MBlaze backend.
-//
-//===----------------------------------------------------------------------===//
-
-#include "MBlazeELFWriterInfo.h"
-#include "MBlazeRelocations.h"
-#include "llvm/Function.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Target/TargetData.h"
-#include "llvm/Target/TargetMachine.h"
-
-using namespace llvm;
-
-//===----------------------------------------------------------------------===//
-// Implementation of the MBlazeELFWriterInfo class
-//===----------------------------------------------------------------------===//
-
-MBlazeELFWriterInfo::MBlazeELFWriterInfo(TargetMachine &TM)
- : TargetELFWriterInfo(TM.getTargetData()->getPointerSizeInBits() == 64,
- TM.getTargetData()->isLittleEndian()) {
-}
-
-MBlazeELFWriterInfo::~MBlazeELFWriterInfo() {}
-
-unsigned MBlazeELFWriterInfo::getRelocationType(unsigned MachineRelTy) const {
- switch(MachineRelTy) {
- case MBlaze::reloc_pcrel_word:
- return R_MICROBLAZE_64_PCREL;
- case MBlaze::reloc_absolute_word:
- return R_MICROBLAZE_NONE;
- default:
- llvm_unreachable("unknown mblaze machine relocation type");
- }
- return 0;
-}
-
-long int MBlazeELFWriterInfo::getDefaultAddendForRelTy(unsigned RelTy,
- long int Modifier) const {
- switch(RelTy) {
- case R_MICROBLAZE_32_PCREL:
- return Modifier - 4;
- case R_MICROBLAZE_32:
- return Modifier;
- default:
- llvm_unreachable("unknown mblaze relocation type");
- }
- return 0;
-}
-
-unsigned MBlazeELFWriterInfo::getRelocationTySize(unsigned RelTy) const {
- // FIXME: Most of these sizes are guesses based on the name
- switch(RelTy) {
- case R_MICROBLAZE_32:
- case R_MICROBLAZE_32_PCREL:
- case R_MICROBLAZE_32_PCREL_LO:
- case R_MICROBLAZE_32_LO:
- case R_MICROBLAZE_SRO32:
- case R_MICROBLAZE_SRW32:
- case R_MICROBLAZE_32_SYM_OP_SYM:
- case R_MICROBLAZE_GOTOFF_32:
- return 32;
-
- case R_MICROBLAZE_64_PCREL:
- case R_MICROBLAZE_64:
- case R_MICROBLAZE_GOTPC_64:
- case R_MICROBLAZE_GOT_64:
- case R_MICROBLAZE_PLT_64:
- case R_MICROBLAZE_GOTOFF_64:
- return 64;
- }
-
- return 0;
-}
-
-bool MBlazeELFWriterInfo::isPCRelativeRel(unsigned RelTy) const {
- // FIXME: Most of these are guesses based on the name
- switch(RelTy) {
- case R_MICROBLAZE_32_PCREL:
- case R_MICROBLAZE_64_PCREL:
- case R_MICROBLAZE_32_PCREL_LO:
- case R_MICROBLAZE_GOTPC_64:
- return true;
- }
-
- return false;
-}
-
-unsigned MBlazeELFWriterInfo::getAbsoluteLabelMachineRelTy() const {
- return MBlaze::reloc_absolute_word;
-}
-
-long int MBlazeELFWriterInfo::computeRelocation(unsigned SymOffset,
- unsigned RelOffset,
- unsigned RelTy) const {
- if (RelTy == R_MICROBLAZE_32_PCREL || R_MICROBLAZE_64_PCREL)
- return SymOffset - (RelOffset + 4);
- else
- assert("computeRelocation unknown for this relocation type");
-
- return 0;
-}
OpenPOWER on IntegriCloud