We can now reference symbols directly in operands, like this:
s_mov_b32 s0, global
Details
Diff Detail
Event Timeline
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | ||
---|---|---|
149 | It's not redundant, because Expr could be any of the MCExpr sub-classes. For example in the added tests case, Expr is sometimes an MCBinaryExpr. |
Please address comment about simple tests and go ahead.
test/MC/AMDGPU/global-expr.s | ||
---|---|---|
7–8 | I woudl be nice to add also tests for simple absolute expressions, like .set foo 4 s_mov_b32 s0, foo+2 // should load 6 to s0 |
There was an unrelated bug with these expression, so I've added the test with D21236, which also fixes the bug.
It seems that labels in branches were not anticipated in this patch.
The quickfix is under review, http://reviews.llvm.org/D22133.
Shall we try another approach for this feature; this one looks like a hack?..
Another problem (different story, but newertheless):
.set foo 40 s_branch foo
Branch offset will be something like (40-PC) but correct one should be +40, I guess. Shall we differentiate between labels and other kinds of symbols?
This looks redundant with the cast<>