summaryrefslogtreecommitdiff
path: root/lib/Target/BPF
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-06-23 22:52:36 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-06-23 22:52:36 +0000
commit3d8b65f712461c661bde5b3387abf6210e35e0b6 (patch)
tree6a0329fe573d570b8c60dcc2b360870f818d56a7 /lib/Target/BPF
parent51e4b46c2c6a2046bd98312d8e6f9bd976fdc8dd (diff)
ARM: move some logic from processFixupValue to applyFixup.
processFixupValue is called on every relaxation iteration. applyFixup is only called once at the very end. applyFixup is then the correct place to do last minute changes and value checks. While here, do proper range checks again for fixup_arm_thumb_bl. We used to do it, but dropped because of thumb2. We now do it again, but use the thumb2 range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/BPF')
-rw-r--r--lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp b/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp
index 2df25cce263..2595b06de2c 100644
--- a/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp
+++ b/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp
@@ -27,7 +27,8 @@ public:
: MCAsmBackend(), IsLittleEndian(IsLittleEndian) {}
~BPFAsmBackend() override = default;
- void applyFixup(const MCFixup &Fixup, MutableArrayRef<char> Data,
+ void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ const MCValue &Target, MutableArrayRef<char> Data,
uint64_t Value, bool IsPCRel, MCContext &Ctx) const override;
MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const override;
@@ -61,9 +62,10 @@ bool BPFAsmBackend::writeNopData(uint64_t Count, MCObjectWriter *OW) const {
return true;
}
-void BPFAsmBackend::applyFixup(const MCFixup &Fixup, MutableArrayRef<char> Data,
- uint64_t Value, bool IsPCRel,
- MCContext &Ctx) const {
+void BPFAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ const MCValue &Target,
+ MutableArrayRef<char> Data, uint64_t Value,
+ bool IsPCRel, MCContext &Ctx) const {
if (Fixup.getKind() == FK_SecRel_4 || Fixup.getKind() == FK_SecRel_8) {
assert(Value == 0);
} else if (Fixup.getKind() == FK_Data_4 || Fixup.getKind() == FK_Data_8) {