mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
[Sparc] Implement writeNopData. Emit actual NOP instruction instead of just filling with zeroes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -200,9 +200,14 @@ namespace {
|
||||
}
|
||||
|
||||
bool writeNopData(uint64_t Count, MCObjectWriter *OW) const {
|
||||
// FIXME: Zero fill for now.
|
||||
for (uint64_t i = 0; i != Count; ++i)
|
||||
OW->Write8(0);
|
||||
// Cannot emit NOP with size not multiple of 32 bits.
|
||||
if (Count % 4 != 0)
|
||||
return false;
|
||||
|
||||
uint64_t NumNops = Count / 4;
|
||||
for (uint64_t i = 0; i != NumNops; ++i)
|
||||
OW->Write32(0x01000000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user