diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-12-06 00:47:03 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-12-06 00:47:03 +0000 |
commit | 25b63fa117f7516e9f685f422b3ec4053d2106f9 (patch) | |
tree | 28ca52c13a928121cc3c5e972a3ea868047ff83e /llvm/lib/MC/MCAssembler.cpp | |
parent | 72d4d32cd629b41616e389ed8301a3086c6d01c1 (diff) | |
download | bcm5719-llvm-25b63fa117f7516e9f685f422b3ec4053d2106f9.tar.gz bcm5719-llvm-25b63fa117f7516e9f685f422b3ec4053d2106f9.zip |
Move target-specific logic out of generic MCAssembler.
Whether a fixup needs relaxation for the associated instruction is a
target-specific function, as the FIXME indicated. Create a hook for that
and use it.
llvm-svn: 145881
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 2de6d04f8ba..c5bf6b9f875 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -646,7 +646,7 @@ void MCAssembler::Finish() { } bool MCAssembler::fixupNeedsRelaxation(const MCFixup &Fixup, - const MCFragment *DF, + const MCInstFragment *DF, const MCAsmLayout &Layout) const { if (getRelaxAll()) return true; @@ -657,10 +657,7 @@ bool MCAssembler::fixupNeedsRelaxation(const MCFixup &Fixup, if (!evaluateFixup(Layout, Fixup, DF, Target, Value)) return true; - // Otherwise, relax if the value is too big for a (signed) i8. - // - // FIXME: This is target dependent! - return int64_t(Value) != int64_t(int8_t(Value)); + return getBackend().fixupNeedsRelaxation(Fixup, Value, DF, Layout); } bool MCAssembler::fragmentNeedsRelaxation(const MCInstFragment *IF, |