summaryrefslogtreecommitdiff
path: root/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-12-06 00:47:03 +0000
committerJim Grosbach <grosbach@apple.com>2011-12-06 00:47:03 +0000
commit370b78d795154899a22ca2b4674e890661ff1d59 (patch)
tree212eb851e899aec47082208576f32338dbc3cd08 /lib/MC/MCAssembler.cpp
parent7c0674100443b4115d2fd6472e59cd8dcb9cc6d4 (diff)
downloadllvm-370b78d795154899a22ca2b4674e890661ff1d59.tar.gz
llvm-370b78d795154899a22ca2b4674e890661ff1d59.tar.bz2
llvm-370b78d795154899a22ca2b4674e890661ff1d59.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
-rw-r--r--lib/MC/MCAssembler.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 2de6d04f8b..c5bf6b9f87 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/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,