diff options
author | Christian Pirker <cpirker@a-bix.com> | 2014-05-20 09:24:37 +0000 |
---|---|---|
committer | Christian Pirker <cpirker@a-bix.com> | 2014-05-20 09:24:37 +0000 |
commit | 6099306cec808d4a561cf5d337ec83c501a64c92 (patch) | |
tree | 63c3fc13872d4d221c4e6e80d381275506806164 /lib | |
parent | c9ff20e8c646764f802520a5d3f1c17050123f32 (diff) | |
download | llvm-6099306cec808d4a561cf5d337ec83c501a64c92.tar.gz llvm-6099306cec808d4a561cf5d337ec83c501a64c92.tar.bz2 llvm-6099306cec808d4a561cf5d337ec83c501a64c92.tar.xz |
ARMEB: Additional test files for ARM fixups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index 93ec46df07..7acd9cc4d3 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -742,8 +742,11 @@ void ARMAsmBackend::applyFixup(const MCFixup &Fixup, char *Data, // Used to point to big endian bytes. unsigned FullSizeBytes; - if (!IsLittleEndian) + if (!IsLittleEndian) { FullSizeBytes = getFixupKindContainerSizeBytes(Fixup.getKind()); + assert((Offset + FullSizeBytes) <= DataSize && "Invalid fixup size!"); + assert(NumBytes <= FullSizeBytes && "Invalid fixup size!"); + } // For each byte of the fragment that the fixup touches, mask in the bits from // the fixup value. The Value has been "split up" into the appropriate |