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
This commit is contained in:
Chris Lattner 2010-02-23 18:44:31 +00:00
parent 5294af000a
commit ec167fd987

View File

@ -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,