summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-04-17 11:12:43 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-04-17 11:12:43 +0000
commit97fbdd5a39cf2a3298b8ac0d4ebb07e7bffd5fef (patch)
treeb15d5c6e1ef81c75f96ddbcaeefb091f6cf274dd /llvm/lib/Target/AArch64
parent62fc15875c8496f6740a08e650cf190b27d559e3 (diff)
downloadbcm5719-llvm-97fbdd5a39cf2a3298b8ac0d4ebb07e7bffd5fef.tar.gz
bcm5719-llvm-97fbdd5a39cf2a3298b8ac0d4ebb07e7bffd5fef.zip
[mc] Clean up emission of byte sequences
No functional change intended. llvm-svn: 235178
Diffstat (limited to 'llvm/lib/Target/AArch64')
-rw-r--r--llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
index e5eb90c6d04..31fceb653a1 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
@@ -247,10 +247,7 @@ bool AArch64AsmBackend::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.
- if ((Count & 3) != 0) {
- for (uint64_t i = 0, e = (Count & 3); i != e; ++i)
- OW->Write8(0);
- }
+ OW->WriteZeros(Count % 4);
// We are properly aligned, so write NOPs as requested.
Count /= 4;
OpenPOWER on IntegriCloud