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 | 875629f7131caed2308db190a0211b9a2ed75972 (patch) | |
tree | 3d3464ffcbd3fb9344a573367bb27e898eef16bc /llvm/lib | |
parent | 9a24f88a37b581e6424ead70bf6f2da848944936 (diff) | |
download | bcm5719-llvm-875629f7131caed2308db190a0211b9a2ed75972.tar.gz bcm5719-llvm-875629f7131caed2308db190a0211b9a2ed75972.zip |
ARMEB: Additional test files for ARM fixups
llvm-svn: 209200
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index 93ec46df07f..7acd9cc4d30 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/llvm/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 |