From 9f6ad4974012c5223931a0172d5d6b51753dd15f Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Thu, 12 Nov 2015 13:33:00 +0000 Subject: Implement .reloc (constant offset only) with support for R_MIPS_NONE and R_MIPS_32. Summary: Support for R_MIPS_NONE allows us to parse MIPS16's usage of .reloc. R_MIPS_32 was included to be able to better test the directive. Targets can add their relocations by overriding MCAsmBackend::getFixupKind(). Subscribers: grosbach, rafael, majnemer, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D13659 llvm-svn: 252888 --- llvm/lib/MC/MCAsmBackend.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/MC/MCAsmBackend.cpp') diff --git a/llvm/lib/MC/MCAsmBackend.cpp b/llvm/lib/MC/MCAsmBackend.cpp index 36c65b7bcd4..fcf139b7253 100644 --- a/llvm/lib/MC/MCAsmBackend.cpp +++ b/llvm/lib/MC/MCAsmBackend.cpp @@ -16,6 +16,10 @@ MCAsmBackend::MCAsmBackend() : HasDataInCodeSupport(false) {} MCAsmBackend::~MCAsmBackend() {} +bool MCAsmBackend::getFixupKind(StringRef Name, MCFixupKind &MappedKind) const { + return false; +} + const MCFixupKindInfo &MCAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { static const MCFixupKindInfo Builtins[] = { {"FK_Data_1", 0, 8, 0}, -- cgit v1.2.3