MC parser and PPC variants on constants
Ulrich Weigand
Ulrich.Weigand at de.ibm.com
Mon Jul 22 06:30:19 PDT 2013
Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> On Sat, Jul 13, 2013 at 08:10:56PM +0200, Joerg Sonnenberger wrote:
> > PowerPC assembler supports expressions like "1234 at l". This doesn't with
> > MC right now, because the constant expression never reaches the target
> > layer. I wonder if it is really that useful to refactor this ATM,
> > especially since it likely makes sense to share the variant codes at
> > some point as many RISC platforms have similar needs in this area.
>
> New version with Target hook.
Thanks for working on this!
A couple of comments:
+ // XXX Duplicates MCTargetExpr::EvaluateAsRelocatableImpl
Now that this is PPC-specific code, we don't need to duplicate
this any more. We can simply create an appropriate PPCMCExpr
here, and leave the evaluation of EvaluateAsRelocatableImpl
later.
+ switch (Variant) {
+ default:
+ llvm_unreachable("Invalid kind!");
Since this can be triggered by user input (e.g. 123 at got),
it should result in a regular error, not a failed assertion.
Bye,
Ulrich
More information about the llvm-commits
mailing list