Re: [PATCH v2] RISC-V: Add new relocation type for global array accesses with non-constant indices

Kito Cheng <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <CA+yXCZBteXDHZp9dD95pJbzAt1Bz54hOyJ9XFMmdMrO5RTrvaA@mail.gmail.com>
> As I noted before, I don't see any justification for using an UNSPEC in
> here.  UNSPECS are to be used when we can not reasonably describe the
> semantics of the instruction in RTL.
>
> I really don't want to see a new pass for this.  I know you indicated it
> was hard, but I'd like to see more details about why it was hard to make
> this work in the existing passes.

I played a little bit last weekend and it seems it can be done at combine pass
by adding define_split with some other changes,
(without new pass!)
I should be able to send out a version this week.

>
> Given this depends on significantly new assembler behavior, the patterns
> will need to be conditional on testing the assembler's behavior.
> Otherwise if someone were to use a new compiler with an older assembler
> they'll get errors.
>
> Is the new syntax for these instruction variants documented anywhere?

Not yet but should at least create PR at
https://github.com/riscv-non-isa/riscv-asm-manual,
 LiQin, could you create a PR to standardize that?

>
> jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.