[mc] Clean up emission of byte sequences

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2015-04-17 11:12:43 +00:00
parent eea5a135ff
commit 1e5490b167
7 changed files with 7 additions and 26 deletions

View File

@@ -394,12 +394,7 @@ bool MipsAsmBackend::writeNopData(uint64_t Count, MCObjectWriter *OW) const {
// If the count is not 4-byte aligned, we must be writing data into the text
// section (otherwise we have unaligned instructions, and thus have far
// bigger problems), so just write zeros instead.
for (uint64_t i = 0, e = Count % 4; i != e; ++i)
OW->Write8(0);
uint64_t NumNops = Count / 4;
for (uint64_t i = 0; i != NumNops; ++i)
OW->Write32(0);
OW->WriteZeros(Count);
return true;
}