This matches the behavior of GNU assembler which supports symbolic
expressions in absolute expressions used in assembly directives.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This is a reland of D20656, I believe the test failure was caused by the truncateToSize invocation at MCAsmStreamer.cpp:844. The second argument is number of bytes and not number of bits to truncate to, so the original version which contained truncateToSize(Expr, 32) was obviously wrong.
Unfortunately, I haven't managed to replicate the test failure on my machines (both x86-64 Linux and OS X)—even the original version passed check-all locally but failed on bots—so I don't know if this was the only issue but I haven't spotted anything obviously wrong after going through the entire patch.
I've managed to replicate the failure in Release+Asserts build (I was using Debug previously) and I've fixed one other issue in the test, now all the tests should be passing (hopefully everywhere).
Cool, go for it.
Unless there is a substantial change in the patch I don't think you
need a second review.
Cheers,
Rafael
Just noticed with gcc: Please add the missing emitFill overload to MCObjectStreamer too:
virtual void emitFill(uint64_t NumValues, int64_t Size, int64_t Expr);