[PATCH] D21131: [mips][ias] Implement N32 case for .cpsetup.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 07:51:54 PDT 2016
dsanders added a comment.
In http://reviews.llvm.org/D21131#452342, @sdardis wrote:
> This looks ok, but it acts unconditionally. In comparison GAS requires the -mno-shared to generate these style .cpsetup expansions as the resulting code cannot be put in a shared library.
> This should only be enabled with a new command line flag -mno-shared.
I'd like to come back to the -mshared implementation later if you're ok with that. This is partly because it's not the default case (at least not on our mips-mti-linux-gnu-gcc toolchain) and we don't have the relevant option yet, but it's mostly because we don't support %hi(%neg(%gp_rel(foo))) expressions properly for N32 at the moment (only one of the three relocs is emitted). Fixing that requires further changes to our MCFixups and the handling of this nested expression. This patch currently fixes just enough for me to fix the ELFCLASS bug (N32 should be ELFCLASS32 but is currently ELFCLASS64) in a way that allows it to have cpsetup.s check for a correct output instead of having to change it to another incorrect output.
Is that ok with you?
More information about the llvm-commits