aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2016-05-27 19:58:05 +0000
committerPetr Hosek <phosek@chromium.org>2016-05-27 19:58:05 +0000
commit97859ccd5194a51f0eed7f1499b4ea320001da4d (patch)
tree4bfe6a9f6926b6ca4262d7a9d101b2e418082240 /llvm/lib/MC/MCStreamer.cpp
parentd99892bdb0d2152ce15c475ca9fcfdecfbea15ed (diff)
downloadllvm-97859ccd5194a51f0eed7f1499b4ea320001da4d.zip
llvm-97859ccd5194a51f0eed7f1499b4ea320001da4d.tar.gz
llvm-97859ccd5194a51f0eed7f1499b4ea320001da4d.tar.bz2
Revert "[MC] Support symbolic expressions in assembly directives"
This reverts commit r271028, it causes the directive_fill.s to fail. llvm-svn: 271038
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 9ed5a5f..59bbc2e 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -135,18 +135,9 @@ void MCStreamer::EmitGPRel32Value(const MCExpr *Value) {
/// EmitFill - Emit NumBytes bytes worth of the value specified by
/// FillValue. This implements directives such as '.space'.
void MCStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
+ const MCExpr *E = MCConstantExpr::create(FillValue, getContext());
for (uint64_t i = 0, e = NumBytes; i != e; ++i)
- EmitIntValue(FillValue, 1);
-}
-
-void MCStreamer::emitFill(uint64_t NumValues, int64_t Size, int64_t Expr) {
- int64_t NonZeroSize = Size > 4 ? 4 : Size;
- Expr &= ~0ULL >> (64 - NonZeroSize * 8);
- for (uint64_t i = 0, e = NumValues; i != e; ++i) {
- EmitIntValue(Expr, NonZeroSize);
- if (NonZeroSize < Size)
- EmitIntValue(0, Size - NonZeroSize);
- }
+ EmitValue(E, 1);
}
/// The implementation in this class just redirects to EmitFill.
@@ -766,9 +757,6 @@ void MCStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc) {
}
void MCStreamer::EmitULEB128Value(const MCExpr *Value) {}
void MCStreamer::EmitSLEB128Value(const MCExpr *Value) {}
-void MCStreamer::emitFill(const MCExpr &NumBytes, uint64_t Value, SMLoc Loc) {}
-void MCStreamer::emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,
- SMLoc Loc) {}
void MCStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value,
unsigned ValueSize,
unsigned MaxBytesToEmit) {}