If the RHS is a MCConstantExpr and we are subtracting it, we switch the MCBinaryExpr to be the
addition of the negated RHS MCConstantExpr with the unchanged LHS.
Details
Details
- Reviewers
dsanders
Diff Detail
Diff Detail
Event Timeline
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
2573–2584 | At first glance, this doesn't seem like the right thing to do. Could you explain why we can't support 'Sym - Constant'? I suspect you may be trying to work around problems caused by the broken code on lines 2530-2555. If that's the case then we should fix the root cause instead. | |
test/MC/Mips/mips-expansions.s | ||
44–59 | The expression should be the same for both %hi and %lo. What happens when a carry bit crosses between bit 16 and bit 15? |
At first glance, this doesn't seem like the right thing to do. Could you explain why we can't support 'Sym - Constant'?
I suspect you may be trying to work around problems caused by the broken code on lines 2530-2555. If that's the case then we should fix the root cause instead.