diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-23 18:44:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-23 18:44:31 +0000 |
commit | ec167fd98779a5d93d98c01b000d17b8b3896aff (patch) | |
tree | 692bf6c6a2703024fa570b51c54b60864a41f976 | |
parent | 5294af000ab8b868630f5905be19d7f4dbe58b70 (diff) |
genericize MCAsmStreamer::EmitCodeAlignment to support other targets
so that it doesn't break them when the code generator starts using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96966 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 07a9553ff1..66a0a24bed 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -518,8 +518,9 @@ void MCAsmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, void MCAsmStreamer::EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit) { - // FIXME: a hack for now to only work for x86 using the 0x90 nop opcode. - EmitValueToAlignment(ByteAlignment, 0x90, 1, MaxBytesToEmit); + // Emit with a text fill value. + EmitValueToAlignment(ByteAlignment, MAI.getTextAlignFillValue(), + 1, MaxBytesToEmit); } void MCAsmStreamer::EmitValueToOffset(const MCExpr *Offset, |